From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [PATCH v3 net-next 3/5] ice: switch: use a struct to pass packet template params
Date: Fri, 18 Mar 2022 13:23:21 -0700 [thread overview]
Message-ID: <6fab3fee-5177-4bc6-c8c1-355d5803441a@intel.com> (raw)
In-Reply-To: <20220318161713.680436-4-alexandr.lobakin@intel.com>
On 3/18/2022 9:17 AM, Alexander Lobakin wrote:
> 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.
> dummy_ipv4_gtpu_ipv4_packet_offsets is just moved around and renamed
> (as well as dummy_ipv6_gtp_packet_offsets) with no function changes.
Looks like there are 32 bit build issues for this patch[1]:
../drivers/net/ethernet/intel/ice/ice_switch.c:5638:16: warning: invalid
access past the end of '<noident>' (8 12)
../drivers/net/ethernet/intel/ice/ice_switch.c:5636:24: warning: invalid
access past the end of '<noident>' (8 12)
../drivers/net/ethernet/intel/ice/ice_switch.c:5632:32: warning: invalid
access past the end of '<noident>' (8 12)
../drivers/net/ethernet/intel/ice/ice_switch.c:5630:32: warning: invalid
access past the end of '<noident>' (8 12)
../drivers/net/ethernet/intel/ice/ice_switch.c:5627:32: warning: invalid
access past the end of '<noident>' (8 12)
../drivers/net/ethernet/intel/ice/ice_switch.c:5625:32: warning: invalid
access past the end of '<noident>' (8 12)
...
[1]
https://patchwork.kernel.org/project/netdevbpf/patch/20220318161713.680436-4-alexandr.lobakin at intel.com/
next prev parent reply other threads:[~2022-03-18 20:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-18 16:17 [Intel-wired-lan] [PATCH v3 net-next 0/5] ice: switch: debloat packet templates code Alexander Lobakin
2022-03-18 16:17 ` [Intel-wired-lan] [PATCH v3 net-next 1/5] ice: switch: add and use u16[] aliases to ice_adv_lkup_elem::{h, m}_u Alexander Lobakin
2022-03-18 16:17 ` [Intel-wired-lan] [PATCH v3 net-next 2/5] ice: switch: unobscurify bitops loop in ice_fill_adv_dummy_packet() Alexander Lobakin
2022-03-18 16:17 ` [Intel-wired-lan] [PATCH v3 net-next 3/5] ice: switch: use a struct to pass packet template params Alexander Lobakin
2022-03-18 20:23 ` Tony Nguyen [this message]
2022-03-18 16:17 ` [Intel-wired-lan] [PATCH v3 net-next 4/5] ice: switch: use convenience macros to declare dummy pkt templates Alexander Lobakin
2022-03-18 16:17 ` [Intel-wired-lan] [PATCH v3 net-next 5/5] ice: switch: convert packet template match code to rodata 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=6fab3fee-5177-4bc6-c8c1-355d5803441a@intel.com \
--to=anthony.l.nguyen@intel.com \
--cc=intel-wired-lan@osuosl.org \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox