From: Roi Dayan <roid@nvidia.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Amritha Nambiar <amritha.nambiar@intel.com>,
netdev@vger.kernel.org, alexander.duyck@gmail.com,
jhs@mojatatu.com, jiri@resnulli.us, xiyou.wangcong@gmail.com,
vinicius.gomes@intel.com, sridhar.samudrala@intel.com,
Maor Dickman <maord@nvidia.com>, Tariq Toukan <tariqt@nvidia.com>,
Saeed Mahameed <saeedm@nvidia.com>,
Leon Romanovsky <leon@kernel.org>,
Pablo Neira Ayuso <pablo@netfilter.org>
Subject: Re: [net-next PATCH v3 1/3] act_skbedit: skbedit queue mapping for receive queue
Date: Thu, 27 Oct 2022 10:12:37 +0300 [thread overview]
Message-ID: <56977d26-5aca-1340-baba-5ba0cdbb9701@nvidia.com> (raw)
In-Reply-To: <20221026091738.57a72c85@kernel.org>
On 26/10/2022 19:17, Jakub Kicinski wrote:
> On Wed, 26 Oct 2022 14:40:39 +0300 Roi Dayan wrote:
>> This patch broke mlx5_core TC offloads.
>> We have a generic code part going over the enum values and have a list
>> of action pointers to handle parsing each action without knowing the action.
>> The list of actions depends on being aligned with the values order of
>> the enum which I think usually new values should go to the end of the list.
>> I'm not sure if other code parts are broken from this change but at
>> least one part is.
>> New values were always inserted at the end.
>>
>> Can you make a fixup patch to move FLOW_ACTION_RX_QUEUE_MAPPING to
>> the end of the enum list?
>> i.e. right before NUM_FLOW_ACTIONS.
>
> Odd, can you point us to the exact code that got broken?
> There are no guarantees on ordering of kernel-internal enum
> and I think it's a bad idea to make such precedent.
ok. I were in the thought order is kept.
You can see our usage in drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
in function parse_tc_actions().
we loop over the actions and get a struct with function pointers
that represent the flow action and we use those function pointers
to parse whats needed without parse_tc_actions() knowing the action.
the function pointers are in drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/act.c
see static struct mlx5e_tc_act *tc_acts_fdb[NUM_FLOW_ACTIONS].
each function handling code is in a different file under that sub folder.
if order is not important i guess i'll do a function to return the ops i need
per enum value.
please let me know if to continue this road.
thanks
next prev parent reply other threads:[~2022-10-27 7:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-21 7:58 [net-next PATCH v3 0/3] Extend action skbedit to RX queue mapping Amritha Nambiar
2022-10-21 7:58 ` [net-next PATCH v3 1/3] act_skbedit: skbedit queue mapping for receive queue Amritha Nambiar
2022-10-26 11:40 ` Roi Dayan
2022-10-26 16:17 ` Jakub Kicinski
2022-10-27 7:12 ` Roi Dayan [this message]
2022-10-27 8:10 ` Roi Dayan
2022-10-28 2:48 ` Jakub Kicinski
2022-10-27 8:10 ` Saeed Mahameed
2022-10-21 7:58 ` [net-next PATCH v3 2/3] ice: Enable RX queue selection using skbedit action Amritha Nambiar
2022-10-21 7:58 ` [net-next PATCH v3 3/3] Documentation: networking: TC queue based filtering Amritha Nambiar
2022-10-25 9:00 ` [net-next PATCH v3 0/3] Extend action skbedit to RX queue mapping patchwork-bot+netdevbpf
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=56977d26-5aca-1340-baba-5ba0cdbb9701@nvidia.com \
--to=roid@nvidia.com \
--cc=alexander.duyck@gmail.com \
--cc=amritha.nambiar@intel.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=maord@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=saeedm@nvidia.com \
--cc=sridhar.samudrala@intel.com \
--cc=tariqt@nvidia.com \
--cc=vinicius.gomes@intel.com \
--cc=xiyou.wangcong@gmail.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: 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;
as well as URLs for NNTP newsgroup(s).