- veth device from CNI/CNM plugin: eth0
- tap device that connects to the VM: tap0
tc qdisc add dev eth0 ingress
tc filter add dev eth0 parent ffff: protocol all u32 match u8 0 0 action mirred egress redirect dev tap0
| def forward(self, x, timesteps=None, context=None, y=None, **kwargs): | |
| # broadcast timesteps to batch dimension | |
| timesteps = timesteps.expand(x.shape[0]) | |
| hs = [] | |
| t_emb = get_timestep_embedding(timesteps, self.model_channels) # , repeat_only=False) | |
| t_emb = t_emb.to(x.dtype) | |
| emb = self.time_embed(t_emb) | |
| assert x.shape[0] == y.shape[0], f"batch size mismatch: {x.shape[0]} != {y.shape[0]}" |
| ### PLEASE TAKE IN ACCOUNT THIS FILE IS CONFIGURED FOR BECHNMARK TESTING OF CEPH NOT PRODUCTION USE | |
| [client] | |
| rbd cache = False | |
| [client.openstack] | |
| admin socket = /var/run/openstack/$cluster-$type.$id.$pid.$cctid.asok | |
| log file = /var/log/ceph/qemu-guest-$pid.log |
| # aecho.py | |
| from socket import * | |
| import asyncio | |
| loop = asyncio.get_event_loop() | |
| async def echo_server(address): | |
| sock = socket(AF_INET, SOCK_STREAM) | |
| sock.setsockopt(SOL_SOCKET, SO_REUSEADDR, 1) |
| #To create a classic TCP listening daemon, similar to netcat -l, use a variation of the following command. | |
| socat TCP-LISTEN:8080 stdout | |
| #use remotly a command shell | |
| socat TCP4-LISTEN:1234,reuseaddr,fork 'SYSTEM:/bin/cat /home/infos.txt' | |
| #sslify a server | |
| socat OPENSSL-LISTEN:443,reuse‐addr,pf=ip4,fork,cert=server.pem,cafile=client.crt TCP4-CONNECT:localhost:80 | |