Thread (14 messages) 14 messages, 5 authors, 2012-10-04

Re: [PATCH 3/3] vxlan: virtual extensible lan

flat view

From: Stephen Hemminger <hidden>
Date: 2012-10-04 04:03:01

On Wed, 3 Oct 2012 18:54:46 -0700
Jesse Gross [off-list ref] wrote:
On Mon, Oct 1, 2012 at 3:32 PM, Stephen Hemminger [off-list ref] wrote:
quoted
--- /dev/null   1970-01-01 00:00:00.000000000 +0000
+++ b/drivers/net/vxlan.c       2012-10-01 15:08:38.024499080 -0700
+/* Transmit local packets over Vxlan
+ *
+ * Outer IP header inherits ECN and DF from inner header.
+ * Outer UDP destination is the VXLAN assigned port.
+ *           source port is based on hash of flow if available
+ *                       otherwise use a random value
+ */
+static netdev_tx_t vxlan_xmit(struct sk_buff *skb, struct net_device *dev)
[...]
quoted
+       hash = skb_get_rxhash(skb);
[...]
quoted
+       uh->dest = htons(vxlan_port);
+       uh->source = hash ? :random32();
I think this may lead to packet reordering in some cases.  If the
protocol is unknown then it may still represent part of a flow and
random source ports could lead to taking different paths.

Also, does it make sense to restrict the range of ports to, say, the
upper half of the range?
Since port is always a pair, there is no need to restrict range, unless
there was a broken firewall in the way. One bug there is that random32()
can return 0 which is not a valid port number.  A better fallback
would be a hash of the MAC header.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help