af_packet: fix the first packet offset 89/38389/3
authorMohsin Kazmi <sykazmi@cisco.com>
Fri, 3 Mar 2023 20:25:17 +0000 (20:25 +0000)
committerDamjan Marion <dmarion@0xa5.net>
Mon, 6 Mar 2023 17:51:56 +0000 (17:51 +0000)
Type: fix

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I927ba4e6f10ae4527f339a890c3a0de33a84b7eb

src/plugins/af_packet/node.c

index 0ea4b3d..8612863 100644 (file)
@@ -306,7 +306,7 @@ af_packet_v3_device_input_fn (vlib_main_t *vm, vlib_node_runtime_t *node,
       else
        {
          num_pkts = bd->hdr.bh1.num_pkts;
-         rx_frame_offset = sizeof (block_desc_t);
+         rx_frame_offset = bd->hdr.bh1.offset_to_first_pkt;
          total++;
 
          if (TP_STATUS_BLK_TMO & bd->hdr.bh1.block_status)