[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1548748926-23822-6-git-send-email-paulb@mellanox.com>
Date: Tue, 29 Jan 2019 10:02:05 +0200
From: Paul Blakey <paulb@...lanox.com>
To: Guy Shattah <sguy@...lanox.com>,
Marcelo Leitner <mleitner@...hat.com>,
Aaron Conole <aconole@...hat.com>,
John Hurley <john.hurley@...ronome.com>,
Simon Horman <simon.horman@...ronome.com>,
Justin Pettit <jpettit@....org>,
Gregory Rose <gvrose8192@...il.com>,
Eelco Chaudron <echaudro@...hat.com>,
Flavio Leitner <fbl@...hat.com>,
Florian Westphal <fwestpha@...hat.com>,
Jiri Pirko <jiri@...nulli.us>, Rashid Khan <rkhan@...hat.com>,
Sushil Kulkarni <sukulkar@...hat.com>,
Andy Gospodarek <andrew.gospodarek@...adcom.com>,
Roi Dayan <roid@...lanox.com>,
Yossi Kuperman <yossiku@...lanox.com>,
Or Gerlitz <ogerlitz@...lanox.com>,
Rony Efraim <ronye@...lanox.com>,
"davem@...emloft.net" <davem@...emloft.net>, netdev@...r.kernel.org
Cc: Paul Blakey <paulb@...lanox.com>
Subject: [RFC PATCH net-next 5/6 v2] net/sched: em_meta: add match on tc recirc id skb extension
Signed-off-by: Paul Blakey <paulb@...lanox.com>
---
include/uapi/linux/tc_ematch/tc_em_meta.h | 1 +
net/sched/em_meta.c | 8 ++++++++
2 files changed, 9 insertions(+)
diff --git a/include/uapi/linux/tc_ematch/tc_em_meta.h b/include/uapi/linux/tc_ematch/tc_em_meta.h
index cf30b5b..25a6fb8 100644
--- a/include/uapi/linux/tc_ematch/tc_em_meta.h
+++ b/include/uapi/linux/tc_ematch/tc_em_meta.h
@@ -81,6 +81,7 @@ enum {
TCF_META_ID_SK_WRITE_PENDING,
TCF_META_ID_VLAN_TAG,
TCF_META_ID_RXHASH,
+ TCF_META_ID_TCRECIRC,
__TCF_META_ID_MAX
};
#define TCF_META_ID_MAX (__TCF_META_ID_MAX - 1)
diff --git a/net/sched/em_meta.c b/net/sched/em_meta.c
index d6e9711..041e0b3 100644
--- a/net/sched/em_meta.c
+++ b/net/sched/em_meta.c
@@ -245,6 +245,13 @@ static inline int var_dev(struct net_device *dev, struct meta_obj *dst)
dst->value = skb->tc_index;
}
+META_COLLECTOR(int_tcrecirc)
+{
+ uint32_t *recirc = skb_ext_find(skb, SKB_EXT_TC_RECIRC_ID);
+
+ dst->value = recirc? *recirc : 0;
+}
+
/**************************************************************************
* Routing
**************************************************************************/
@@ -638,6 +645,7 @@ struct meta_ops {
[META_ID(MACLEN)] = META_FUNC(int_maclen),
[META_ID(NFMARK)] = META_FUNC(int_mark),
[META_ID(TCINDEX)] = META_FUNC(int_tcindex),
+ [META_ID(TCRECIRC)] = META_FUNC(int_tcrecirc),
[META_ID(RTCLASSID)] = META_FUNC(int_rtclassid),
[META_ID(RTIIF)] = META_FUNC(int_rtiif),
[META_ID(SK_FAMILY)] = META_FUNC(int_sk_family),
--
1.8.3.1
Powered by blists - more mailing lists