af_xdp: fix chained buffer free on failure 85/39085/2
authorBenoît Ganne <bganne@cisco.com>
Tue, 20 Jun 2023 10:03:36 +0000 (12:03 +0200)
committerDamjan Marion <dmarion@0xa5.net>
Wed, 21 Jun 2023 09:21:51 +0000 (09:21 +0000)
Type: fix

Change-Id: I7c6fb783e5200773cbd02c86d39fd241efcc39f9
Signed-off-by: Benoît Ganne <bganne@cisco.com>
src/plugins/af_xdp/output.c

index bb5d56f..a59c01c 100644 (file)
@@ -208,7 +208,7 @@ wrap_around:
            {
              af_xdp_log (VLIB_LOG_LEVEL_ERR, ad,
                          "vlib_buffer_chain_linearize failed");
-             vlib_buffer_free_one (vm, b[0]->buffer_pool_index);
+             vlib_buffer_free_one (vm, vlib_get_buffer_index (vm, b[0]));
              continue;
            }
        }