[ovs-discuss] Tunneling to the same machine

Isaku Yamahata yamahata at valinux.co.jp
Wed Jul 3 02:31:36 UTC 2013


On Wed, Jun 26, 2013 at 08:34:50AM -0700, Jesse Gross wrote:

> Let's wait to see what happens in the upstream kernel and then we can
> try to backport it as closely as possible.

The below patch has been picked up into net-next.
The changeset is 06a23fe31ca3992863721f21bdb0307af93da807

The upstream kernel won't pass skb with OTHERHOST to ovs.
So work around I think of is as follows.
What do you think?

- modify netdev_port_receive something like
  if (skb->pkt_type == OTHERHOST)
      warn once
      skb->pkt_type = HOST
- modify ovs_vport_receive similarly
- modify ovs_tnl_send
- any other?

thanks,

diff --git a/net/core/dev.c b/net/core/dev.c
index 370354a..6a93cd8 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1659,6 +1659,12 @@ int dev_forward_skb(struct net_device *dev, struct sk_buff *skb)
 	}
 	skb_scrub_packet(skb);
 	skb->protocol = eth_type_trans(skb, dev);
+
+	/* eth_type_trans() can set pkt_type.
+	 * clear pkt_type _after_ calling eth_type_trans()
+	 */
+	skb->pkt_type = PACKET_HOST;
+
 	return netif_rx(skb);
 }
 EXPORT_SYMBOL_GPL(dev_forward_skb);

-- 
yamahata



More information about the discuss mailing list