[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f1511443-c220-1012-c6b3-595285ec338c@intel.com>
Date: Fri, 14 Jul 2023 16:17:56 +0200
From: Przemek Kitszel <przemyslaw.kitszel@...el.com>
To: Alexander Lobakin <aleksander.lobakin@...el.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>
CC: Paul Menzel <pmenzel@...gen.mpg.de>,
Jesper Dangaard Brouer <hawk@...nel.org>,
Larysa Zaremba <larysa.zaremba@...el.com>,
<netdev@...r.kernel.org>, Alexander Duyck <alexanderduyck@...com>,
"Ilias Apalodimas" <ilias.apalodimas@...aro.org>,
<linux-kernel@...r.kernel.org>,
Yunsheng Lin <linyunsheng@...wei.com>,
Michal Kubiak <michal.kubiak@...el.com>,
<intel-wired-lan@...ts.osuosl.org>,
"David Christensen" <drc@...ux.vnet.ibm.com>
Subject: Re: [Intel-wired-lan] [PATCH RFC net-next v4 1/9] net: intel:
introduce Intel Ethernet common library
On 7/5/23 17:55, Alexander Lobakin wrote:
> 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.
>
> Signed-off-by: Alexander Lobakin <aleksander.lobakin@...el.com>
> ---
> MAINTAINERS | 3 +-
> drivers/net/ethernet/intel/Kconfig | 10 +
> drivers/net/ethernet/intel/Makefile | 1 +
> drivers/net/ethernet/intel/i40e/i40e_common.c | 253 --------------
> drivers/net/ethernet/intel/i40e/i40e_main.c | 1 +
> .../net/ethernet/intel/i40e/i40e_prototype.h | 7 -
> drivers/net/ethernet/intel/i40e/i40e_txrx.c | 74 +---
> drivers/net/ethernet/intel/i40e/i40e_type.h | 88 -----
> drivers/net/ethernet/intel/iavf/iavf_common.c | 253 --------------
> drivers/net/ethernet/intel/iavf/iavf_main.c | 1 +
> .../net/ethernet/intel/iavf/iavf_prototype.h | 7 -
> drivers/net/ethernet/intel/iavf/iavf_txrx.c | 70 +---
> drivers/net/ethernet/intel/iavf/iavf_type.h | 88 -----
> .../net/ethernet/intel/ice/ice_lan_tx_rx.h | 316 ------------------
> drivers/net/ethernet/intel/ice/ice_main.c | 1 +
> drivers/net/ethernet/intel/ice/ice_txrx_lib.c | 74 +---
> drivers/net/ethernet/intel/libie/Makefile | 6 +
> drivers/net/ethernet/intel/libie/rx.c | 110 ++++++
> include/linux/net/intel/libie/rx.h | 128 +++++++
> 19 files changed, 312 insertions(+), 1179 deletions(-)
> create mode 100644 drivers/net/ethernet/intel/libie/Makefile
> create mode 100644 drivers/net/ethernet/intel/libie/rx.c
> create mode 100644 include/linux/net/intel/libie/rx.h
Thanks a lot for whole effort on this series, it's refreshing to see a
move in that direction.
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@...el.com>
Powered by blists - more mailing lists