netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, jhs@mojatatu.com, xiyou.wangcong@gmail.com,
	edumazet@google.com, alexander.h.duyck@intel.com,
	stephen@networkplumber.org, daniel@iogearbox.net,
	mlxsw@mellanox.com
Subject: Re: [patch iproute2/net-next] tc: add support for TRAP action
Date: Thu, 8 Jun 2017 08:57:19 +0200	[thread overview]
Message-ID: <20170608065719.GD2238@nanopsycho> (raw)
In-Reply-To: <20170605143945.7094-1-jiri@resnulli.us>

Mon, Jun 05, 2017 at 04:39:45PM CEST, jiri@resnulli.us wrote:
>From: Jiri Pirko <jiri@mellanox.com>
>
>Signed-off-by: Jiri Pirko <jiri@mellanox.com>

Stephen, note that the kernel part was accepted in v2. Thanks.


>---
> include/linux/pkt_cls.h | 5 +++++
> tc/tc_util.c            | 3 +++
> 2 files changed, 8 insertions(+)
>
>diff --git a/include/linux/pkt_cls.h b/include/linux/pkt_cls.h
>index c6e8cf5..477ed05 100644
>--- a/include/linux/pkt_cls.h
>+++ b/include/linux/pkt_cls.h
>@@ -37,6 +37,11 @@ enum {
> #define TC_ACT_QUEUED		5
> #define TC_ACT_REPEAT		6
> #define TC_ACT_REDIRECT		7
>+#define TC_ACT_TRAP		8 /* For hw path, this means "trap to cpu",
>+				   * for sw path, this is equivalent of
>+				   * TC_ACT_STOLEN - drop the skb and act
>+				   * like everything is allright.
>+				   */
> 
> /* There is a special kind of actions called "extended actions",
>  * which need a value parameter. These have a local opcode located in
>diff --git a/tc/tc_util.c b/tc/tc_util.c
>index 4f7283d..5a0f96a 100644
>--- a/tc/tc_util.c
>+++ b/tc/tc_util.c
>@@ -430,6 +430,8 @@ static const char *action_n2a(int action)
> 		return "pipe";
> 	case TC_ACT_STOLEN:
> 		return "stolen";
>+	case TC_ACT_TRAP:
>+		return "trap";
> 	default:
> 		snprintf(buf, 64, "%d", action);
> 		buf[63] = '\0';
>@@ -462,6 +464,7 @@ static int action_a2n(char *arg, int *result, bool allow_num)
> 		{"reclassify", TC_ACT_RECLASSIFY},
> 		{"pipe", TC_ACT_PIPE},
> 		{"goto", TC_ACT_GOTO_CHAIN},
>+		{"trap", TC_ACT_TRAP},
> 		{ NULL },
> 	}, *iter;
> 
>-- 
>2.9.3
>

  reply	other threads:[~2017-06-08  6:57 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-05 14:38 [patch net-next 0/6] introduce trap control action to tc and offload it Jiri Pirko
2017-06-05 14:38 ` [patch net-next 1/6] net: sched: introduce a TRAP control action Jiri Pirko
2017-06-05 19:56   ` Andrew Lunn
2017-06-05 19:59     ` Jiri Pirko
2017-06-05 14:38 ` [patch net-next 2/6] net: sched: introduce helper to identify gact trap action Jiri Pirko
2017-06-05 14:38 ` [patch net-next 3/6] mlxsw: pci: Fix size of trap_id field in CQE Jiri Pirko
2017-06-05 14:38 ` [patch net-next 4/6] mlxsw: spectrum: Introduce ACL trap Jiri Pirko
2017-06-05 14:38 ` [patch net-next 5/6] acl: Introduce ACL trap action Jiri Pirko
2017-06-05 14:38 ` [patch net-next 6/6] spectrum_flower: Implement gact trap TC action offload Jiri Pirko
2017-06-05 14:39 ` [patch iproute2/net-next] tc: add support for TRAP action Jiri Pirko
2017-06-08  6:57   ` Jiri Pirko [this message]
2017-06-08 17:26   ` Jiri Benc
2017-06-08 18:41     ` Jiri Pirko
2017-06-08 18:03   ` Stephen Hemminger
2017-06-05 15:46 ` [patch net-next 0/6] introduce trap control action to tc and offload it Andrew Lunn
2017-06-05 19:43   ` Jiri Pirko
2017-06-05 19:56     ` Jiri Pirko

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=20170608065719.GD2238@nanopsycho \
    --to=jiri@resnulli.us \
    --cc=alexander.h.duyck@intel.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jhs@mojatatu.com \
    --cc=mlxsw@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    --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).