Remove one unused stub: netdev_dpdk_register() can't be called if DPDK is disabled at build time.
Remove unneeded #ifdef in call to free_dpdk_buf. Drop unneeded cast when calling free_dpdk_buf. Signed-off-by: David Marchand <[email protected]> --- lib/dp-packet.c | 6 +----- lib/dp-packet.h | 4 +--- lib/netdev-dpdk.h | 5 ----- 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/lib/dp-packet.c b/lib/dp-packet.c index 4538d2a614..61e405460a 100644 --- a/lib/dp-packet.c +++ b/lib/dp-packet.c @@ -134,11 +134,7 @@ dp_packet_uninit(struct dp_packet *b) if (b->source == DPBUF_MALLOC) { free(dp_packet_base(b)); } else if (b->source == DPBUF_DPDK) { -#ifdef DPDK_NETDEV - /* If this dp_packet was allocated by DPDK it must have been - * created as a dp_packet */ - free_dpdk_buf((struct dp_packet*) b); -#endif + free_dpdk_buf(b); } else if (b->source == DPBUF_AFXDP) { free_afxdp_buf(b); } diff --git a/lib/dp-packet.h b/lib/dp-packet.h index 55eeaab2ce..a8ea5b40f7 100644 --- a/lib/dp-packet.h +++ b/lib/dp-packet.h @@ -247,9 +247,7 @@ dp_packet_delete(struct dp_packet *b) { if (b) { if (b->source == DPBUF_DPDK) { - /* If this dp_packet was allocated by DPDK it must have been - * created as a dp_packet */ - free_dpdk_buf((struct dp_packet*) b); + free_dpdk_buf(b); return; } diff --git a/lib/netdev-dpdk.h b/lib/netdev-dpdk.h index 7d2f64af23..5cd95d00f5 100644 --- a/lib/netdev-dpdk.h +++ b/lib/netdev-dpdk.h @@ -150,11 +150,6 @@ netdev_dpdk_rte_flow_tunnel_item_release( #else -static inline void -netdev_dpdk_register(const struct smap *ovs_other_config OVS_UNUSED) -{ - /* Nothing */ -} static inline void free_dpdk_buf(struct dp_packet *buf OVS_UNUSED) { -- 2.37.2 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
