From: Alexander Lobakin <alexandr.lobakin@intel.com> To: Wojciech Drewek <wojciech.drewek@intel.com> Cc: Alexander Lobakin <alexandr.lobakin@intel.com>, "intel-wired-lan@lists.osuosl.org" <intel-wired-lan@lists.osuosl.org>, Maciej Fijalkowski <maciej.fijalkowski@intel.com>, Michal Swiatkowski <michal.swiatkowski@linux.intel.com>, Marcin Szycik <marcin.szycik@linux.intel.com>, Martyna Szapar-Mudlaw <martyna.szapar-mudlaw@intel.com>, "David S. Miller" <davem@davemloft.net>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, "netdev@vger.kernel.org" <netdev@vger.kernel.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org> Subject: Re: [PATCH v4 net-next 5/5] ice: switch: convert packet template match code to rodata Date: Wed, 30 Mar 2022 11:07:34 +0200 [thread overview] Message-ID: <20220330090734.2725099-1-alexandr.lobakin@intel.com> (raw) In-Reply-To: <PH0PR11MB5782637EA9771D3ED4E56012FD1E9@PH0PR11MB5782.namprd11.prod.outlook.com> From: Wojciech Drewek <wojciech.drewek@intel.com> Date: Tue, 29 Mar 2022 15:12:44 +0000 > Hi Alex, > > > -----Original Message----- > > From: Lobakin, Alexandr <alexandr.lobakin@intel.com> > > Sent: poniedzialek, 21 marca 2022 12:00 > > To: intel-wired-lan@lists.osuosl.org > > Cc: Lobakin, Alexandr <alexandr.lobakin@intel.com>; Fijalkowski, Maciej <maciej.fijalkowski@intel.com>; Michal Swiatkowski > > <michal.swiatkowski@linux.intel.com>; Drewek, Wojciech <wojciech.drewek@intel.com>; Marcin Szycik > > <marcin.szycik@linux.intel.com>; Szapar-Mudlaw, Martyna <martyna.szapar-mudlaw@intel.com>; David S. Miller > > <davem@davemloft.net>; Jakub Kicinski <kuba@kernel.org>; Paolo Abeni <pabeni@redhat.com>; netdev@vger.kernel.org; linux- > > kernel@vger.kernel.org > > Subject: [PATCH v4 net-next 5/5] ice: switch: convert packet template match code to rodata > > > > Trade text size for rodata size and replace tons of nested if-elses > > to the const mask match based structs. The almost entire > > ice_find_dummy_packet() now becomes just one plain while-increment > > loop. The order in ice_dummy_pkt_profiles[] should be same with the > > if-elses order previously, as masks become less and less strict > > through the array to follow the original code flow. > > Apart from removing 80 locs of 4-level if-elses, it brings a solid > > text size optimization: > > > > add/remove: 0/1 grow/shrink: 1/1 up/down: 2/-1058 (-1056) > > Function old new delta > > ice_fill_adv_dummy_packet 289 291 +2 > > ice_adv_add_update_vsi_list 201 - -201 > > ice_add_adv_rule 2950 2093 -857 > > Total: Before=414512, After=413456, chg -0.25% > > add/remove: 53/52 grow/shrink: 0/0 up/down: 4660/-3988 (672) > > RO Data old new delta > > ice_dummy_pkt_profiles - 672 +672 > > Total: Before=37895, After=38567, chg +1.77% > > > > Signed-off-by: Alexander Lobakin <alexandr.lobakin@intel.com> > > Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com> > > Tested-by: Marcin Szycik <marcin.szycik@linux.intel.com> > > --- > > drivers/net/ethernet/intel/ice/ice_switch.c | 215 ++++++++++---------- > > 1 file changed, 108 insertions(+), 107 deletions(-) --- 8< --- > > + ICE_PKT_PROFILE(vlan_udp, ICE_PKT_INNER_UDP | ICE_PKT_VLAN), > > + ICE_PKT_PROFILE(udp, ICE_PKT_INNER_UDP), > > + ICE_PKT_PROFILE(vlan_tcp_ipv6, ICE_PKT_INNER_IPV6 | ICE_PKT_VLAN), > > + ICE_PKT_PROFILE(tcp_ipv6, ICE_PKT_INNER_IPV6), > > I think that in both "vlan_tcp_ipv6" and "tcp_ipv6" we should use ICE_PKT_OUTER_IPV6 instead > of ICE_PKT_INNER_IPV6. We are not dealing with tunnels in those cases so inner addresses are > incorrect here. Oh, some copy'n'paste braino indeed. I'll send a fixup to Tony in a moment. > > Thanks, > Wojtek Great catch, thanks for noticing! > > > + ICE_PKT_PROFILE(vlan_tcp, ICE_PKT_VLAN), > > + ICE_PKT_PROFILE(tcp, 0), > > +}; --- 8< --- > > -- > > 2.35.1 Al
WARNING: multiple messages have this Message-ID (diff)
From: Alexander Lobakin <alexandr.lobakin@intel.com> To: intel-wired-lan@osuosl.org Subject: [Intel-wired-lan] [PATCH v4 net-next 5/5] ice: switch: convert packet template match code to rodata Date: Wed, 30 Mar 2022 11:07:34 +0200 [thread overview] Message-ID: <20220330090734.2725099-1-alexandr.lobakin@intel.com> (raw) In-Reply-To: <PH0PR11MB5782637EA9771D3ED4E56012FD1E9@PH0PR11MB5782.namprd11.prod.outlook.com> From: Wojciech Drewek <wojciech.drewek@intel.com> Date: Tue, 29 Mar 2022 15:12:44 +0000 > Hi Alex, > > > -----Original Message----- > > From: Lobakin, Alexandr <alexandr.lobakin@intel.com> > > Sent: poniedzialek, 21 marca 2022 12:00 > > To: intel-wired-lan at lists.osuosl.org > > Cc: Lobakin, Alexandr <alexandr.lobakin@intel.com>; Fijalkowski, Maciej <maciej.fijalkowski@intel.com>; Michal Swiatkowski > > <michal.swiatkowski@linux.intel.com>; Drewek, Wojciech <wojciech.drewek@intel.com>; Marcin Szycik > > <marcin.szycik@linux.intel.com>; Szapar-Mudlaw, Martyna <martyna.szapar-mudlaw@intel.com>; David S. Miller > > <davem@davemloft.net>; Jakub Kicinski <kuba@kernel.org>; Paolo Abeni <pabeni@redhat.com>; netdev at vger.kernel.org; linux- > > kernel at vger.kernel.org > > Subject: [PATCH v4 net-next 5/5] ice: switch: convert packet template match code to rodata > > > > Trade text size for rodata size and replace tons of nested if-elses > > to the const mask match based structs. The almost entire > > ice_find_dummy_packet() now becomes just one plain while-increment > > loop. The order in ice_dummy_pkt_profiles[] should be same with the > > if-elses order previously, as masks become less and less strict > > through the array to follow the original code flow. > > Apart from removing 80 locs of 4-level if-elses, it brings a solid > > text size optimization: > > > > add/remove: 0/1 grow/shrink: 1/1 up/down: 2/-1058 (-1056) > > Function old new delta > > ice_fill_adv_dummy_packet 289 291 +2 > > ice_adv_add_update_vsi_list 201 - -201 > > ice_add_adv_rule 2950 2093 -857 > > Total: Before=414512, After=413456, chg -0.25% > > add/remove: 53/52 grow/shrink: 0/0 up/down: 4660/-3988 (672) > > RO Data old new delta > > ice_dummy_pkt_profiles - 672 +672 > > Total: Before=37895, After=38567, chg +1.77% > > > > Signed-off-by: Alexander Lobakin <alexandr.lobakin@intel.com> > > Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com> > > Tested-by: Marcin Szycik <marcin.szycik@linux.intel.com> > > --- > > drivers/net/ethernet/intel/ice/ice_switch.c | 215 ++++++++++---------- > > 1 file changed, 108 insertions(+), 107 deletions(-) --- 8< --- > > + ICE_PKT_PROFILE(vlan_udp, ICE_PKT_INNER_UDP | ICE_PKT_VLAN), > > + ICE_PKT_PROFILE(udp, ICE_PKT_INNER_UDP), > > + ICE_PKT_PROFILE(vlan_tcp_ipv6, ICE_PKT_INNER_IPV6 | ICE_PKT_VLAN), > > + ICE_PKT_PROFILE(tcp_ipv6, ICE_PKT_INNER_IPV6), > > I think that in both "vlan_tcp_ipv6" and "tcp_ipv6" we should use ICE_PKT_OUTER_IPV6 instead > of ICE_PKT_INNER_IPV6. We are not dealing with tunnels in those cases so inner addresses are > incorrect here. Oh, some copy'n'paste braino indeed. I'll send a fixup to Tony in a moment. > > Thanks, > Wojtek Great catch, thanks for noticing! > > > + ICE_PKT_PROFILE(vlan_tcp, ICE_PKT_VLAN), > > + ICE_PKT_PROFILE(tcp, 0), > > +}; --- 8< --- > > -- > > 2.35.1 Al
next prev parent reply other threads:[~2022-03-30 9:10 UTC|newest] Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-03-21 10:59 [PATCH v4 net-next 0/5] ice: switch: debloat packet templates code Alexander Lobakin 2022-03-21 10:59 ` [Intel-wired-lan] " Alexander Lobakin 2022-03-21 10:59 ` [PATCH v4 net-next 1/5] ice: switch: add and use u16[] aliases to ice_adv_lkup_elem::{h,m}_u Alexander Lobakin 2022-03-21 10:59 ` [Intel-wired-lan] [PATCH v4 net-next 1/5] ice: switch: add and use u16[] aliases to ice_adv_lkup_elem::{h, m}_u Alexander Lobakin 2022-03-25 10:23 ` Penigalapati, Sandeep 2022-03-25 10:23 ` Penigalapati, Sandeep 2022-03-21 10:59 ` [PATCH v4 net-next 2/5] ice: switch: unobscurify bitops loop in ice_fill_adv_dummy_packet() Alexander Lobakin 2022-03-21 10:59 ` [Intel-wired-lan] " Alexander Lobakin 2022-03-25 10:24 ` Penigalapati, Sandeep 2022-03-25 10:24 ` Penigalapati, Sandeep 2022-03-21 10:59 ` [PATCH v4 net-next 3/5] ice: switch: use a struct to pass packet template params Alexander Lobakin 2022-03-21 10:59 ` [Intel-wired-lan] " Alexander Lobakin 2022-03-25 10:25 ` Penigalapati, Sandeep 2022-03-25 10:25 ` Penigalapati, Sandeep 2022-03-21 10:59 ` [PATCH v4 net-next 4/5] ice: switch: use convenience macros to declare dummy pkt templates Alexander Lobakin 2022-03-21 10:59 ` [Intel-wired-lan] " Alexander Lobakin 2022-03-25 10:25 ` Penigalapati, Sandeep 2022-03-25 10:25 ` Penigalapati, Sandeep 2022-03-21 10:59 ` [PATCH v4 net-next 5/5] ice: switch: convert packet template match code to rodata Alexander Lobakin 2022-03-21 10:59 ` [Intel-wired-lan] " Alexander Lobakin 2022-03-25 10:26 ` Penigalapati, Sandeep 2022-03-25 10:26 ` Penigalapati, Sandeep 2022-03-29 15:12 ` Drewek, Wojciech 2022-03-29 15:12 ` [Intel-wired-lan] " Drewek, Wojciech 2022-03-30 9:07 ` Alexander Lobakin [this message] 2022-03-30 9:07 ` Alexander Lobakin
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220330090734.2725099-1-alexandr.lobakin@intel.com \ --to=alexandr.lobakin@intel.com \ --cc=davem@davemloft.net \ --cc=intel-wired-lan@lists.osuosl.org \ --cc=kuba@kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=maciej.fijalkowski@intel.com \ --cc=marcin.szycik@linux.intel.com \ --cc=martyna.szapar-mudlaw@intel.com \ --cc=michal.swiatkowski@linux.intel.com \ --cc=netdev@vger.kernel.org \ --cc=pabeni@redhat.com \ --cc=wojciech.drewek@intel.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.