[ovs-dev] [PATCH] dpif-netdev: Allow for Ethernet and VLAN header in buffer size calculation.

Ben Pfaff blp at nicira.com
Mon Jan 24 17:03:25 UTC 2011


This is a long-standing bug--it was present in version 1.0 too.

Reported-by: Gaetano Catalli <gaetano.catalli at gmail.com>
Solution by Jesse Gross <jesse at nicira.com>
---
 lib/dpif-netdev.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index 82d7d74..391a2a7 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -950,7 +950,7 @@ dp_netdev_run(void)
     struct shash_node *node;
     struct ofpbuf packet;
 
-    ofpbuf_init(&packet, DP_NETDEV_HEADROOM + max_mtu);
+    ofpbuf_init(&packet, DP_NETDEV_HEADROOM + VLAN_ETH_HEADER_LEN + max_mtu);
     SHASH_FOR_EACH (node, &dp_netdevs) {
         struct dp_netdev *dp = node->data;
         struct dp_netdev_port *port;
-- 
1.7.1





More information about the dev mailing list