idpf: compile singleq code only under default-n CONFIG_IDPF_SINGLEQ
authorAlexander Lobakin <aleksander.lobakin@intel.com>
Thu, 20 Jun 2024 13:53:42 +0000 (15:53 +0200)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Wed, 10 Jul 2024 17:42:26 +0000 (10:42 -0700)
commitf771314d6b75181de7079c3c7d666293e4ed2b22
tree470311c40f9c3cf3f8de5973374dd04edab74382
parent14f662b43bf8c765114f73d184af2702b2280436
idpf: compile singleq code only under default-n CONFIG_IDPF_SINGLEQ

Currently, all HW supporting idpf supports the singleq model, but none
of it advertises it by default, as splitq is supported and preferred
for multiple reasons. Still, this almost dead code often times adds
hotpath branches and redundant cacheline accesses.
While it can't currently be removed, add CONFIG_IDPF_SINGLEQ and build
the singleq code only when it's enabled manually. This corresponds to
-10 Kb of object code size and a good bunch of hotpath checks.
idpf_is_queue_model_split() works as a gate and compiles out to `true`
when the config option is disabled.

Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/Kconfig
drivers/net/ethernet/intel/idpf/Kconfig [new file with mode: 0644]
drivers/net/ethernet/intel/idpf/Makefile
drivers/net/ethernet/intel/idpf/idpf.h
drivers/net/ethernet/intel/idpf/idpf_txrx.c
drivers/net/ethernet/intel/idpf/idpf_virtchnl.c