aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2023-03-23 10:08:51 +0100
committerFelix Fietkau <nbd@nbd.name>2023-03-23 17:54:18 +0100
commit07b550890c5ecbc003ab0419b321dbdd65bdd4bd (patch)
tree7bc6f19790fc0b190b1f35653a5d333234f71c18 /target
parentf7c1631155d2ba1a0962bc1cc603c40180b4e9a2 (diff)
downloadupstream-07b550890c5ecbc003ab0419b321dbdd65bdd4bd.tar.gz
upstream-07b550890c5ecbc003ab0419b321dbdd65bdd4bd.tar.bz2
upstream-07b550890c5ecbc003ab0419b321dbdd65bdd4bd.zip
kernel: update flow offload fix based on upstream suggestions
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'target')
-rw-r--r--target/linux/generic/pending-5.15/735-net-ethernet-mtk_eth_soc-fix-flow_offload-related-re.patch40
1 files 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@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;