[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9deb3115-eb04-4b18-90de-c884b91dc101@intel.com>
Date: Wed, 7 Feb 2024 15:07:23 +0100
From: Alexander Lobakin <aleksander.lobakin@...el.com>
To: Lukasz Plachno <lukasz.plachno@...el.com>
CC: <intel-wired-lan@...ts.osuosl.org>, <pmenzel@...gen.mpg.de>,
<brett.creeley@....com>, <netdev@...r.kernel.org>, Jakub Buchocki
<jakubx.buchocki@...el.com>, <horms@...nel.org>, Mateusz Pacuszka
<mateuszx.pacuszka@...el.com>, Przemek Kitszel <przemyslaw.kitszel@...el.com>
Subject: Re: [Intel-wired-lan] [PATCH iwl-next v5 2/2] ice: Implement
'flow-type ether' rules
From: Lukasz Plachno <lukasz.plachno@...el.com>
Date: Tue, 6 Feb 2024 17:33:37 +0100
> From: Jakub Buchocki <jakubx.buchocki@...el.com>
>
> Add support for 'flow-type ether' Flow Director rules via ethtool.
>
> Create packet segment info for filter configuration based on ethtool
> command parameters. Reuse infrastructure already created for
> ipv4 and ipv6 flows to convert packet segment into
> extraction sequence, which is later used to program the filter
> inside Flow Director block of the Rx pipeline.
[...]
> diff --git a/drivers/net/ethernet/intel/ice/ice_fdir.c b/drivers/net/ethernet/intel/ice/ice_fdir.c
> index 1f7b26f38818..5fe0bad00fd7 100644
> --- a/drivers/net/ethernet/intel/ice/ice_fdir.c
> +++ b/drivers/net/ethernet/intel/ice/ice_fdir.c
> @@ -4,6 +4,8 @@
> #include "ice_common.h"
>
> /* These are training packet headers used to program flow director filters. */
> +static const u8 ice_fdir_eth_pkt[22] = {0};
I believe this zeroing is not needed, just declare it and the compiler
will zero it automatically.
[...]
> @@ -97,6 +100,12 @@ struct ice_rx_flow_userdef {
> u16 flex_fltr;
> };
>
> +struct ice_fdir_eth {
> + u8 dst[ETH_ALEN];
> + u8 src[ETH_ALEN];
> + __be16 type;
> +};
This is clearly `struct ethhdr`, please remove this duplicating
definition and just use the generic structure.
Thanks,
Olek
Powered by blists - more mailing lists