All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vlad Buslov <vladbu@nvidia.com>
To: Simon Horman <simon.horman@corigine.com>
Cc: <netdev@vger.kernel.org>, Cong Wang <xiyou.wangcong@gmail.com>,
	"Dan Carpenter" <dan.carpenter@oracle.com>,
	Ido Schimmel <idosch@nvidia.com>,
	Jamal Hadi Salim <jhs@mojatatu.com>,
	Jiri Pirko <jiri@resnulli.us>, "Oz Shlomo" <ozsh@nvidia.com>,
	Roi Dayan <roid@nvidia.com>,
	Baowen Zheng <baowen.zheng@corigine.com>,
	Louis Peens <louis.peens@corigine.com>,
	<oss-drivers@corigine.com>
Subject: Re: [PATCH v6 net-next 00/12] allow user to offload tc action to net device
Date: Mon, 13 Dec 2021 21:21:54 +0200	[thread overview]
Message-ID: <ygnhzgp4nwdp.fsf@nvidia.com> (raw)
In-Reply-To: <20211209092806.12336-1-simon.horman@corigine.com>

On Thu 09 Dec 2021 at 11:27, Simon Horman <simon.horman@corigine.com> wrote:
> Baowen Zheng says:
>
> Allow use of flow_indr_dev_register/flow_indr_dev_setup_offload to offload
> tc actions independent of flows.
>
> The motivation for this work is to prepare for using TC police action
> instances to provide hardware offload of OVS metering feature - which calls
> for policers that may be used by multiple flows and whose lifecycle is
> independent of any flows that use them.
>
> This patch includes basic changes to offload drivers to return EOPNOTSUPP
> if this feature is used - it is not yet supported by any driver.
>
> Tc cli command to offload and quote an action:
>
>  # tc qdisc del dev $DEV ingress && sleep 1 || true
>  # tc actions delete action police index 200 || true
>
>  # tc qdisc add dev $DEV ingress
>  # tc qdisc show dev $DEV ingress
>
>  # tc actions add action police rate 100mbit burst 10000k index 200 skip_sw
>  # tc -s -d actions list action police
>  total acts 1
>
>          action order 0:  police 0xc8 rate 100Mbit burst 10000Kb mtu 2Kb action reclassify 
>          overhead 0b linklayer ethernet
>          ref 1 bind 0  installed 142 sec used 0 sec
>          Action statistics:
>          Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
>          backlog 0b 0p requeues 0
>          skip_sw in_hw in_hw_count 1
>          used_hw_stats delayed
>
>  # tc filter add dev $DEV protocol ip parent ffff: \
>          flower skip_sw ip_proto tcp action police index 200
>  # tc -s -d filter show dev $DEV protocol ip parent ffff:
>  filter pref 49152 flower chain 0
>  filter pref 49152 flower chain 0 handle 0x1
>    eth_type ipv4
>    ip_proto tcp
>    skip_sw
>    in_hw in_hw_count 1
>          action order 1:  police 0xc8 rate 100Mbit burst 10000Kb mtu 2Kb action 
>          reclassify overhead 0b linklayer ethernet
>          ref 2 bind 1  installed 300 sec used 0 sec
>          Action statistics:
>          Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
>          backlog 0b 0p requeues 0
>          skip_sw in_hw in_hw_count 1
>          used_hw_stats delayed
>
>  # tc filter add dev $DEV protocol ipv6 parent ffff: \
>          flower skip_sw ip_proto tcp action police index 200
>  # tc -s -d filter show dev $DEV protocol ipv6 parent ffff:
>    filter pref 49151 flower chain 0
>    filter pref 49151 flower chain 0 handle 0x1
>    eth_type ipv6
>    ip_proto tcp
>    skip_sw
>    in_hw in_hw_count 1
>          action order 1:  police 0xc8 rate 100Mbit burst 10000Kb mtu 2Kb action 
>          reclassify overhead 0b linklayer ethernet
>          ref 3 bind 2  installed 761 sec used 0 sec
>          Action statistics:
>          Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
>          backlog 0b 0p requeues 0
>          skip_sw in_hw in_hw_count 1
>          used_hw_stats delayed
>
>  # tc -s -d actions list action police
>  total acts 1
>
>           action order 0:  police 0xc8 rate 100Mbit burst 10000Kb mtu 2Kb action reclassify overhead 0b linklayer ethernet
>           ref 3 bind 2  installed 917 sec used 0 sec
>           Action statistics:
>           Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
>           backlog 0b 0p requeues 0
>           skip_sw in_hw in_hw_count 1
>          used_hw_stats delayed
>
> Changes compared to v5 patches:
> * Fix issue reported by Dan Carpenter found using Smatch.

Hi,

Sorry for late response to this and previous version. From my side
series LGTM besides points raised by Jamal and Roi.

Regards,
Vlad

[...]


  parent reply	other threads:[~2021-12-13 19:22 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-09  9:27 [PATCH v6 net-next 00/12] allow user to offload tc action to net device Simon Horman
2021-12-09  9:27 ` [PATCH v6 net-next 01/12] flow_offload: fill flags to action structure Simon Horman
2021-12-11 19:05   ` Jamal Hadi Salim
2021-12-09  9:27 ` [PATCH v6 net-next 02/12] flow_offload: reject to offload tc actions in offload drivers Simon Horman
2021-12-11 19:07   ` Jamal Hadi Salim
2021-12-09  9:27 ` [PATCH v6 net-next 03/12] flow_offload: add index to flow_action_entry structure Simon Horman
2021-12-11 19:09   ` Jamal Hadi Salim
2021-12-12  8:41     ` Baowen Zheng
2021-12-09  9:27 ` [PATCH v6 net-next 04/12] flow_offload: return EOPNOTSUPP for the unsupported mpls action type Simon Horman
2021-12-11 19:10   ` Jamal Hadi Salim
2021-12-12 12:41   ` Roi Dayan
2021-12-13 14:49     ` Simon Horman
2021-12-09  9:27 ` [PATCH v6 net-next 05/12] flow_offload: add ops to tc_action_ops for flow action setup Simon Horman
2021-12-11 19:31   ` Jamal Hadi Salim
2021-12-12  8:52     ` Baowen Zheng
2021-12-09  9:28 ` [PATCH v6 net-next 06/12] flow_offload: allow user to offload tc action to net device Simon Horman
2021-12-11 19:42   ` Jamal Hadi Salim
2021-12-12  9:22     ` Baowen Zheng
2021-12-14 12:03       ` Jamal Hadi Salim
2021-12-09  9:28 ` [PATCH v6 net-next 07/12] flow_offload: add skip_hw and skip_sw to control if offload the action Simon Horman
2021-12-11 19:48   ` Jamal Hadi Salim
2021-12-16 13:50   ` [flow_offload] 42adbf37c1: kernel-selftests.tc-testing.d4cd.Add_skbedit_action_with_valid_mark_and_mask.fail kernel test robot
2021-12-16 13:50     ` kernel test robot
2021-12-17  8:32     ` Baowen Zheng
2021-12-17  8:32     ` Baowen Zheng
2021-12-17  8:32       ` Baowen Zheng
2021-12-09  9:28 ` [PATCH v6 net-next 08/12] flow_offload: add process to update action stats from hardware Simon Horman
2021-12-11 19:52   ` Jamal Hadi Salim
2021-12-12  9:00     ` Baowen Zheng
2021-12-14 12:01       ` Jamal Hadi Salim
2021-12-14 13:43         ` Baowen Zheng
2021-12-14 14:29           ` Jamal Hadi Salim
2021-12-09  9:28 ` [PATCH v6 net-next 09/12] net: sched: save full flags for tc action Simon Horman
2021-12-11 19:54   ` Jamal Hadi Salim
2021-12-09  9:28 ` [PATCH v6 net-next 10/12] flow_offload: add reoffload process to update hw_count Simon Horman
2021-12-09  9:28 ` [PATCH v6 net-next 11/12] flow_offload: validate flags of filter and actions Simon Horman
2021-12-11 19:55   ` Jamal Hadi Salim
2021-12-09  9:28 ` [PATCH v6 net-next 12/12] selftests: tc-testing: add action offload selftest for action and filter Simon Horman
2021-12-11 19:57   ` Jamal Hadi Salim
2021-12-12  9:04     ` Baowen Zheng
2021-12-09 10:41 ` [PATCH v6 net-next 00/12] allow user to offload tc action to net device Simon Horman
2021-12-11 19:04 ` Jamal Hadi Salim
2021-12-13  9:16   ` Simon Horman
2021-12-13 19:21 ` Vlad Buslov [this message]
2021-12-14  7:55   ` Simon Horman

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=ygnhzgp4nwdp.fsf@nvidia.com \
    --to=vladbu@nvidia.com \
    --cc=baowen.zheng@corigine.com \
    --cc=dan.carpenter@oracle.com \
    --cc=idosch@nvidia.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=louis.peens@corigine.com \
    --cc=netdev@vger.kernel.org \
    --cc=oss-drivers@corigine.com \
    --cc=ozsh@nvidia.com \
    --cc=roid@nvidia.com \
    --cc=simon.horman@corigine.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 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.