[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <MW3PR11MB45544D0038C2B56448258AB79C379@MW3PR11MB4554.namprd11.prod.outlook.com>
Date: Fri, 18 Feb 2022 05:19:45 +0000
From: "Penigalapati, Sandeep" <sandeep.penigalapati@...el.com>
To: "Lobakin, Alexandr" <alexandr.lobakin@...el.com>,
"intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>
CC: "Szapar-Mudlaw, Martyna" <martyna.szapar-mudlaw@...el.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Jakub Kicinski <kuba@...nel.org>,
"David S. Miller" <davem@...emloft.net>
Subject: RE: [Intel-wired-lan] [PATCH v2 net-next 3/4] ice: switch: use a
struct to pass packet template params
>-----Original Message-----
>From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf Of
>Alexander Lobakin
>Sent: Thursday, January 27, 2022 9:10 PM
>To: intel-wired-lan@...ts.osuosl.org
>Cc: Szapar-Mudlaw, Martyna <martyna.szapar-mudlaw@...el.com>;
>netdev@...r.kernel.org; linux-kernel@...r.kernel.org; Jakub Kicinski
><kuba@...nel.org>; David S. Miller <davem@...emloft.net>
>Subject: [Intel-wired-lan] [PATCH v2 net-next 3/4] ice: switch: use a struct to
>pass packet template params
>
>ice_find_dummy_packet() contains a lot of boilerplate code and a nice room
>for copy-paste mistakes.
>Instead of passing 3 separate pointers back and forth to get packet template
>(dummy) params, directly return a structure containing them. Then, use a
>macro to compose compound literals and avoid code duplication on return
>path.
>Now, dummy packet type/name is needed only once to return a full correct
>triple pkt-pkt_len-offsets, and those are all one-liners.
>
>Signed-off-by: Alexander Lobakin <alexandr.lobakin@...el.com>
>---
> drivers/net/ethernet/intel/ice/ice_switch.c | 173 +++++++-------------
> 1 file changed, 62 insertions(+), 111 deletions(-)
>
Tested-by: Sandeep Penigalapati <sandeep.penigalapati@...el.com>
Powered by blists - more mailing lists