mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
76 lines
2.2 KiB
Diff
76 lines
2.2 KiB
Diff
From 03a9fdd468ba3635b26477ca80a1599c29341aed Mon Sep 17 00:00:00 2001
|
|
From: Simon Casey <simon501098c@gmail.com>
|
|
Date: Wed, 2 Feb 2022 19:35:35 +0100
|
|
Subject: [PATCH] Update
|
|
603-net-core-Flag-to-identify-ingress-shaping-done-for-e.patch for kernel
|
|
5.15
|
|
|
|
Also combined with 604-net-core-Replace-nss-keyword-with-offload.patch that just changes
|
|
variable names created with 603.
|
|
---
|
|
include/linux/skbuff.h | 2 ++
|
|
include/net/sch_generic.h | 34 ++++++++++++++++++++++++++++++++++
|
|
2 files changed, 36 insertions(+)
|
|
|
|
--- a/include/linux/skbuff.h
|
|
+++ b/include/linux/skbuff.h
|
|
@@ -652,6 +652,7 @@ typedef unsigned char *sk_buff_data_t;
|
|
* @offload_fwd_mark: Packet was L2-forwarded in hardware
|
|
* @offload_l3_fwd_mark: Packet was L3-forwarded in hardware
|
|
* @tc_skip_classify: do not classify packet. set by IFB device
|
|
+ * @tc_skip_classify_offload: do not classify packet set by offload IFB device
|
|
* @tc_at_ingress: used within tc_classify to distinguish in/egress
|
|
* @redirected: packet was redirected by packet classifier
|
|
* @from_ingress: packet was redirected from the ingress path
|
|
@@ -867,6 +868,7 @@ struct sk_buff {
|
|
#ifdef CONFIG_NET_CLS_ACT
|
|
__u8 tc_skip_classify:1;
|
|
__u8 tc_at_ingress:1;
|
|
+ __u8 tc_skip_classify_offload:1;
|
|
#endif
|
|
__u8 redirected:1;
|
|
#ifdef CONFIG_NET_REDIRECT
|
|
--- a/include/net/sch_generic.h
|
|
+++ b/include/net/sch_generic.h
|
|
@@ -739,6 +739,40 @@ static inline bool skb_skip_tc_classify(
|
|
return false;
|
|
}
|
|
|
|
+/*
|
|
+ * Set skb classify bit field.
|
|
+ */
|
|
+static inline void skb_set_tc_classify_offload(struct sk_buff *skb)
|
|
+{
|
|
+#ifdef CONFIG_NET_CLS_ACT
|
|
+ skb->tc_skip_classify_offload = 1;
|
|
+#endif
|
|
+}
|
|
+
|
|
+/*
|
|
+ * Clear skb classify bit field.
|
|
+ */
|
|
+static inline void skb_clear_tc_classify_offload(struct sk_buff *skb)
|
|
+{
|
|
+#ifdef CONFIG_NET_CLS_ACT
|
|
+ skb->tc_skip_classify_offload = 0;
|
|
+#endif
|
|
+}
|
|
+
|
|
+/*
|
|
+ * Skip skb processing if sent from ifb dev.
|
|
+ */
|
|
+static inline bool skb_skip_tc_classify_offload(struct sk_buff *skb)
|
|
+{
|
|
+#ifdef CONFIG_NET_CLS_ACT
|
|
+ if (skb->tc_skip_classify_offload) {
|
|
+ skb_clear_tc_classify_offload(skb);
|
|
+ return true;
|
|
+ }
|
|
+#endif
|
|
+ return false;
|
|
+}
|
|
+
|
|
/* Reset all TX qdiscs greater than index of a device. */
|
|
static inline void qdisc_reset_all_tx_gt(struct net_device *dev, unsigned int i)
|
|
{
|