af_packet: clear bitmap entries when processing input 88/788/2
authorPeter Lei <[email protected]>
Thu, 10 Mar 2016 09:03:36 +0000 (04:03 -0500)
committerGerrit Code Review <[email protected]>
Fri, 15 Apr 2016 15:04:48 +0000 (15:04 +0000)
Need to clear the bitmap entry when processing each input file
descriptor.

This becomes an issue on interface deletion. A crash occurs due
to assertion in a debug image

https://gerrit.fd.io/r/#/c/615/ - removed the code when this was set
again, but the bitmap needs to be cleared

Change-Id: I7cccb9bf8b9b2eb5a7f60ecda7530784a9512116
Signed-off-by: Peter Lei <[email protected]>
vnet/vnet/devices/af_packet/node.c

index 9c1c4a3..ceb89ef 100644 (file)
@@ -260,6 +260,7 @@ af_packet_input_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
 
   clib_bitmap_foreach (i, apm->pending_input_bitmap,
     ({
+      clib_bitmap_set (apm->pending_input_bitmap, i, 0);
       n_rx_packets += af_packet_device_input_fn(vm, node, frame, i);
     }));