Using #ifdef is the convention in DPDK, like in the Linux Kernel. The way to disable it is to outcomment it like this: /* RTE_ETHDEV_RXTX_CALLBACKS is not set */ E.g.: https://elixir.bootlin.com/dpdk/v24.03/source/config/rte_config.h#L60