@@ -82,7 +82,7 @@ static void ri_tasklet(unsigned long dev)
u32 from = G_TC_FROM(skb->tc_verd);
skb->tc_verd = 0;
- skb->tc_verd = SET_TC_NCLS(skb->tc_verd);
+ skb->tc_nocls = 1;
u64_stats_update_begin(&dp->tsync);
dp->tx_packets++;
@@ -403,6 +403,7 @@ int cvm_oct_xmit(struct sk_buff *skb, struct net_device *dev)
#ifdef CONFIG_NET_SCHED
skb->tc_index = 0;
#ifdef CONFIG_NET_CLS_ACT
+ skb->tc_nocls = 0;
skb->tc_verd = 0;
#endif /* CONFIG_NET_CLS_ACT */
#endif /* CONFIG_NET_SCHED */
@@ -487,6 +487,7 @@ static inline u32 skb_mstamp_us_delta(const struct skb_mstamp *t1,
* @hash: the packet hash
* @queue_mapping: Queue mapping for multiqueue devices
* @xmit_more: More SKBs are pending for this queue
+ * @tc_nocls: skip classification on ingress
* @ndisc_nodetype: router type (from link layer)
* @ooo_okay: allow the mapping of a socket to a queue to be changed
* @l4_hash: indicate hash is a canonical 4-tuple hash over transport
@@ -566,8 +567,10 @@ struct sk_buff {
fclone:2,
peeked:1,
head_frag:1,
+#ifdef CONFIG_NET_CLS_ACT
+ tc_nocls:1,
+#endif
xmit_more:1;
- /* one bit hole */
kmemcheck_bitfield_end(flags1);
/* fields enclosed in headers_start/headers_end are copied
@@ -61,9 +61,11 @@ bits 9,10,11: redirect counter - redirect TTL. Loop avoidance
#define AT_INGRESS 0x1
#define AT_EGRESS 0x2
+#ifndef __KERNEL__
#define TC_NCLS _TC_MAKEMASK1(8)
#define SET_TC_NCLS(v) ( TC_NCLS | (v & ~TC_NCLS))
#define CLR_TC_NCLS(v) ( v & ~TC_NCLS)
+#endif
#ifndef __KERNEL__
#define S_TC_RTTL _TC_MAKE32(9)
@@ -3678,8 +3678,8 @@ another_round:
}
#ifdef CONFIG_NET_CLS_ACT
- if (skb->tc_verd & TC_NCLS) {
- skb->tc_verd = CLR_TC_NCLS(skb->tc_verd);
+ if (skb->tc_nocls) {
+ skb->tc_nocls = 0;
goto ncls;
}
#endif
@@ -384,8 +384,8 @@ int tcf_action_exec(struct sk_buff *skb, const struct list_head *actions,
const struct tc_action *a;
int ret = -1;
- if (skb->tc_verd & TC_NCLS) {
- skb->tc_verd = CLR_TC_NCLS(skb->tc_verd);
+ if (skb->tc_nocls) {
+ skb->tc_nocls = 0;
ret = TC_ACT_OK;
goto exec_done;
}
Signed-off-by: Florian Westphal <fw@strlen.de> --- drivers/net/ifb.c | 2 +- drivers/staging/octeon/ethernet-tx.c | 1 + include/linux/skbuff.h | 5 ++++- include/uapi/linux/pkt_cls.h | 2 ++ net/core/dev.c | 4 ++-- net/sched/act_api.c | 4 ++-- 6 files changed, 12 insertions(+), 6 deletions(-)