If a packet arrives on a tunnel port and is again transmitted on a tunnel
port, the packet needs to be encapsulated.
Eg:
Sample flow which arrives on a tunnel port and gets encapsulated again.
eth(src=00:15:5d:ae:b7:b1,dst=ff:ff:ff:ff:ff:ff),in_port(5),eth_type(0x0806),
arp(sip=192.168.1.12,tip=192.168.1.78,op=1,sha=00:15:5d:ae:b7:b1,tha=00:00:00:00:00:00),
tunnel(tun_id=0x5b88,dst=192.165.226.191,src=192.166.255.253,tos=0,ttl=63,
geneve({class=0x104,type=0x80,len=4,0x11680100}),flags(key))
actions:set(tunnel(tun_id=0x5b88,dst=192.165.226.190,ttl=64,
geneve({class=0x104,type=0x80,len=4,0x1680100}),flags(df|csum|key))),5,4
Signed-off-by: Sairam Venugopal <vsairam@vmware.com>
Acked-by: Nithin Raju <nithin@vmware.com>
Signed-off-by: Gurucharan Shetty <guru@ovn.org>
* - a VIF port
* - a bridge-internal port (packets generated from userspace)
* - no port.
- *
+ * - tunnel port
* If the packet will not be encapsulated, consume the tunnel context
* by clearing it.
*/
if (!vport ||
(vport->ovsType != OVS_VPORT_TYPE_NETDEV &&
- !OvsIsBridgeInternalVport(vport))) {
+ !OvsIsBridgeInternalVport(vport) &&
+ !OvsIsTunnelVportType(vport->ovsType))) {
ovsFwdCtx->tunKey.dst = 0;
}
}