[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <13f494c9-e7f0-2fbb-89f9-b1500432a2f6@mojatatu.com>
Date: Thu, 22 Jul 2021 09:33:09 -0400
From: Jamal Hadi Salim <jhs@...atatu.com>
To: Vlad Buslov <vladbu@...dia.com>,
Simon Horman <simon.horman@...igine.com>
Cc: David Miller <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Cong Wang <xiyou.wangcong@...il.com>,
Jiri Pirko <jiri@...lanox.com>, netdev@...r.kernel.org,
oss-drivers@...igine.com, Baowen Zheng <baowen.zheng@...igine.com>,
Louis Peens <louis.peens@...igine.com>
Subject: Re: [PATCH net-next 1/3] flow_offload: allow user to offload tc
action to net device
On 2021-07-22 9:29 a.m., Vlad Buslov wrote:
> On Thu 22 Jul 2021 at 12:19, Simon Horman <simon.horman@...igine.com> wrote:
>> From: Baowen Zheng <baowen.zheng@...igine.com>
>>
>> Use flow_indr_dev_register/flow_indr_dev_setup_offload to
>> offload tc action.
>>
>> We offload the tc action mainly for ovs meter configuration.
>> Make some basic changes for different vendors to return EOPNOTSUPP.
>>
>> We need to call tc_cleanup_flow_action to clean up tc action entry since
>> in tc_setup_action, some actions may hold dev refcnt, especially the mirror
>> action.
>>
>> As per review from the RFC, the kernel test robot will fail to run, so
>> we add CONFIG_NET_CLS_ACT control for the action offload.
>>
>> Signed-off-by: Baowen Zheng <baowen.zheng@...igine.com>
>> Signed-off-by: Louis Peens <louis.peens@...igine.com>
>> Signed-off-by: Simon Horman <simon.horman@...igine.com>
>> ---
>> drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c | 2 +-
>> .../ethernet/mellanox/mlx5/core/en/rep/tc.c | 3 ++
>> void *data,
>> void (*cleanup)(struct flow_block_cb *block_cb))
>> {
>> + if (!netdev)
>> + return -EOPNOTSUPP;
>> +
>> switch (type) {
>> case TC_SETUP_BLOCK:
>> return mlx5e_rep_indr_setup_block(netdev, sch, cb_priv, type_data,
>> diff --git a/drivers/net/ethernet/netronome/nfp/flower/offload.c b/drivers/net/ethernet/netronome/nfp/flower/offload.c
[..]
>>
>> + /* offload actions to hardware if possible */
>> + tcf_action_offload_cmd(actions, extack);
>> +
>
> I think this has already been suggested for RFC, but some sort of
> visibility for offload status of action would be extremely welcome.
> Perhaps "IN_HW" flag and counter, similar to what we have for offloaded
> filters.
>
Also showing a tc command line in the cover letter on how one would
ask for a specific action to be offloaded.
cheers,
jamal
Powered by blists - more mailing lists