mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 04:38:03 +00:00
306ec721d0
Not a secret there's a ton of code duplication between two and more Intel ethernet modules. Before introducing new changes, which would need to be copied over again, start decoupling the already existing duplicate functionality into a new module, which will be shared between several Intel Ethernet drivers. Add the lookup table which converts 8/10-bit hardware packet type into a parsed bitfield structure for easy checking packet format parameters, such as payload level, IP version, etc. This is currently used by i40e, ice and iavf and it's all the same in all three drivers. The only difference introduced in this implementation is that instead of defining a 256 (or 1024 in case of ice) element array, add unlikely() condition to limit the input to 154 (current maximum non-reserved packet type). There's no reason to waste 600 (or even 3600) bytes only to not hurt very unlikely exception packets. The hash computation function now takes payload level directly as a pkt_hash_type. There's a couple cases when non-IP ptypes are marked as L3 payload and in the previous versions their hash level would be 2, not 3. But skb_set_hash() only sees difference between L4 and non-L4, thus this won't change anything at all. The module is behind the hidden Kconfig symbol, which the drivers will select when needed. The exports are behind 'LIBIE' namespace to limit the scope of the functions. Not that non-HW-specific symbols will live in yet another module, libeth. This is done to easily distinguish pretty generic code ready for reusing by any other vendor and/or for moving the layer up from the code useful in Intel's 1-100G drivers only. Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
22 lines
529 B
Makefile
22 lines
529 B
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
#
|
|
# Makefile for the Intel network device drivers.
|
|
#
|
|
|
|
obj-$(CONFIG_LIBETH) += libeth/
|
|
obj-$(CONFIG_LIBIE) += libie/
|
|
|
|
obj-$(CONFIG_E100) += e100.o
|
|
obj-$(CONFIG_E1000) += e1000/
|
|
obj-$(CONFIG_E1000E) += e1000e/
|
|
obj-$(CONFIG_IGB) += igb/
|
|
obj-$(CONFIG_IGC) += igc/
|
|
obj-$(CONFIG_IGBVF) += igbvf/
|
|
obj-$(CONFIG_IXGBE) += ixgbe/
|
|
obj-$(CONFIG_IXGBEVF) += ixgbevf/
|
|
obj-$(CONFIG_I40E) += i40e/
|
|
obj-$(CONFIG_IAVF) += iavf/
|
|
obj-$(CONFIG_FM10K) += fm10k/
|
|
obj-$(CONFIG_ICE) += ice/
|
|
obj-$(CONFIG_IDPF) += idpf/
|