[openwrt/openwrt] kernel: update flow offload fix based on upstream suggestions

LEDE Commits lede-commits at lists.infradead.org
Thu Mar 23 09:54:46 PDT 2023


nbd pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/07b550890c5ecbc003ab0419b321dbdd65bdd4bd

commit 07b550890c5ecbc003ab0419b321dbdd65bdd4bd
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Thu Mar 23 10:08:51 2023 +0100

    kernel: update flow offload fix based on upstream suggestions
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 ...t-mtk_eth_soc-fix-flow_offload-related-re.patch | 40 ++++------------------
 1 file changed, 6 insertions(+), 34 deletions(-)

diff --git a/target/linux/generic/pending-5.15/735-net-ethernet-mtk_eth_soc-fix-flow_offload-related-re.patch b/target/linux/generic/pending-5.15/735-net-ethernet-mtk_eth_soc-fix-flow_offload-related-re.patch
index acbdec2159..b7304906c0 100644
--- a/target/linux/generic/pending-5.15/735-net-ethernet-mtk_eth_soc-fix-flow_offload-related-re.patch
+++ b/target/linux/generic/pending-5.15/735-net-ethernet-mtk_eth_soc-fix-flow_offload-related-re.patch
@@ -14,43 +14,15 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
 +++ b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
-@@ -561,6 +561,7 @@ mtk_eth_setup_tc_block(struct net_device
- 	struct mtk_eth *eth = mac->hw;
- 	static LIST_HEAD(block_cb_list);
- 	struct flow_block_cb *block_cb;
-+	bool register_block = false;
- 	flow_setup_cb_t *cb;
+@@ -583,6 +583,7 @@ mtk_eth_setup_tc_block(struct net_device
+ 		if (IS_ERR(block_cb))
+ 			return PTR_ERR(block_cb);
  
- 	if (!eth->soc->offload_version)
-@@ -575,23 +576,27 @@ mtk_eth_setup_tc_block(struct net_device
- 	switch (f->command) {
- 	case FLOW_BLOCK_BIND:
- 		block_cb = flow_block_cb_lookup(f->block, cb, dev);
--		if (block_cb) {
--			flow_block_cb_incref(block_cb);
--			return 0;
-+		if (!block_cb) {
-+			block_cb = flow_block_cb_alloc(cb, dev, dev, NULL);
-+			if (IS_ERR(block_cb))
-+				return PTR_ERR(block_cb);
-+
-+			register_block = true;
- 		}
--		block_cb = flow_block_cb_alloc(cb, dev, dev, NULL);
--		if (IS_ERR(block_cb))
--			return PTR_ERR(block_cb);
- 
--		flow_block_cb_add(block_cb, f);
--		list_add_tail(&block_cb->driver_list, &block_cb_list);
 +		flow_block_cb_incref(block_cb);
-+
-+		if (register_block) {
-+			flow_block_cb_add(block_cb, f);
-+			list_add_tail(&block_cb->driver_list, &block_cb_list);
-+		}
+ 		flow_block_cb_add(block_cb, f);
+ 		list_add_tail(&block_cb->driver_list, &block_cb_list);
  		return 0;
- 	case FLOW_BLOCK_UNBIND:
- 		block_cb = flow_block_cb_lookup(f->block, cb, dev);
+@@ -591,7 +592,7 @@ mtk_eth_setup_tc_block(struct net_device
  		if (!block_cb)
  			return -ENOENT;
  




More information about the lede-commits mailing list