From 39edfa99bdc7b9a41e85bbb03e3c6d08b5c14e8c Mon Sep 17 00:00:00 2001 From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> Date: Fri, 13 Mar 2020 14:05:24 +0800 Subject: [PATCH] generic: refresh patch (#3774) * generic-4.19: refresh patch * generic-4.9: refresh patch cherry-pick 2515a5e from @1715173329 dalao --- .../550-loop-Report-EOPNOTSUPP-properly.patch | 2 +- ...er-discard-support-for-block-devices.patch | 12 +- ...etfilter-connmark-introduce-savedscp.patch | 135 ----------- ...lter-connmark-introduce-set-dscpmark.patch | 212 ++++++++++++++++++ .../702-phy_add_aneg_done_function.patch | 2 +- .../generic/hack-4.9/721-phy_packets.patch | 10 +- ...-linux-kernel-to-support-shortcut-fe.patch | 28 +-- ...ridge-APIs-needed-for-network-HW-acc.patch | 9 +- ...k-events-support-multiple-registrant.patch | 43 ++-- .../411-mtd-partial_eraseblock_write.patch | 3 +- ...w-NOR-driver-to-write-fewer-bytes-th.patch | 4 +- ...25p80-mx-disable-software-protection.patch | 2 +- ...or-fix-Spansion-regressions-aliased-.patch | 4 +- ...ort-limiting-4K-sectors-support-base.patch | 2 +- .../479-mtd-spi-nor-add-xtx-xt25f128b.patch | 2 +- ...T-skip-GRO-for-foreign-MAC-addresses.patch | 16 +- ...roblem-with-platfom-data-in-w1-gpio.patch} | 0 17 files changed, 267 insertions(+), 219 deletions(-) delete mode 100644 target/linux/generic/hack-4.19/645-netfilter-connmark-introduce-savedscp.patch create mode 100644 target/linux/generic/hack-4.19/645-netfilter-connmark-introduce-set-dscpmark.patch rename target/linux/generic/pending-4.9/{0931-w1-gpio-fix-problem-with-platfom-data-in-w1-gpio.patch => 931-w1-gpio-fix-problem-with-platfom-data-in-w1-gpio.patch} (100%) diff --git a/target/linux/generic/hack-4.19/550-loop-Report-EOPNOTSUPP-properly.patch b/target/linux/generic/hack-4.19/550-loop-Report-EOPNOTSUPP-properly.patch index a3046cd8d..023de0078 100644 --- a/target/linux/generic/hack-4.19/550-loop-Report-EOPNOTSUPP-properly.patch +++ b/target/linux/generic/hack-4.19/550-loop-Report-EOPNOTSUPP-properly.patch @@ -26,7 +26,7 @@ Reviewed-by: Bart Van Assche + ret = errno_to_blk_status(cmd->ret); goto end_io; } - + @@ -1904,7 +1904,10 @@ static void loop_handle_cmd(struct loop_ failed: /* complete non-aio request */ diff --git a/target/linux/generic/hack-4.19/551-loop-Better-discard-support-for-block-devices.patch b/target/linux/generic/hack-4.19/551-loop-Better-discard-support-for-block-devices.patch index 271389a4d..ac393e5f1 100644 --- a/target/linux/generic/hack-4.19/551-loop-Better-discard-support-for-block-devices.patch +++ b/target/linux/generic/hack-4.19/551-loop-Better-discard-support-for-block-devices.patch @@ -34,9 +34,9 @@ Reviewed-by: Chaitanya Kulkarni struct file *file = lo->lo_backing_file; + struct request_queue *q = lo->lo_queue; int ret; - + mode |= FALLOC_FL_KEEP_SIZE; - + - if ((!file->f_op->fallocate) || lo->lo_encrypt_key_size) { + if (!blk_queue_discard(q)) { ret = -EOPNOTSUPP; @@ -61,7 +61,7 @@ Reviewed-by: Chaitanya Kulkarni + + blk_queue_max_write_zeroes_sectors(q, + backingq->limits.max_write_zeroes_sectors); - + /* * We use punch hole to reclaim the free space used by the @@ -870,22 +886,24 @@ static void loop_config_discard(struct l @@ -78,13 +78,13 @@ Reviewed-by: Chaitanya Kulkarni - blk_queue_flag_clear(QUEUE_FLAG_DISCARD, q); - return; - } - + - q->limits.discard_granularity = inode->i_sb->s_blocksize; - q->limits.discard_alignment = 0; + } else { + q->limits.discard_granularity = inode->i_sb->s_blocksize; + q->limits.discard_alignment = 0; - + - blk_queue_max_discard_sectors(q, UINT_MAX >> 9); - blk_queue_max_write_zeroes_sectors(q, UINT_MAX >> 9); - blk_queue_flag_set(QUEUE_FLAG_DISCARD, q); @@ -97,5 +97,5 @@ Reviewed-by: Chaitanya Kulkarni + else + blk_queue_flag_clear(QUEUE_FLAG_DISCARD, q); } - + static void loop_unprepare_queue(struct loop_device *lo) diff --git a/target/linux/generic/hack-4.19/645-netfilter-connmark-introduce-savedscp.patch b/target/linux/generic/hack-4.19/645-netfilter-connmark-introduce-savedscp.patch deleted file mode 100644 index 0c4ef92c0..000000000 --- a/target/linux/generic/hack-4.19/645-netfilter-connmark-introduce-savedscp.patch +++ /dev/null @@ -1,135 +0,0 @@ -From f171924dcf1d0b31fb7bd1cff113d7a1f7f05ec2 Mon Sep 17 00:00:00 2001 -From: Kevin Darbyshire-Bryant -Date: Sat, 23 Mar 2019 09:29:49 +0000 -Subject: [PATCH] netfilter: connmark: introduce savedscp - -savedscp is a method of storing the DSCP of an ip packet into conntrack -mark. In combination with a suitable tc filter action (act_ctinfo) DSCP -values are able to be stored in the mark on egress and restored on -ingress across links that otherwise alter or bleach DSCP. - -This is useful for qdiscs such as CAKE which are able to shape according -to policies based on DSCP. - -Ingress classification is traditionally a challenging task since -iptables rules haven't yet run and tc filter/eBPF programs are pre-NAT -lookups, hence are unable to see internal IPv4 addresses as used on the -typical home masquerading gateway. - -x_tables CONNMARK savedscp action solves the problem of storing the DSCP -to the conntrack mark in a way suitable for the new act_ctinfo tc action -to restore. - -The savedsp option accepts 2 parameters, a 32bit 'dscpmask' and a 32bit -'statemask'. The dscp mask must be a minimum of 6 contiguous bits and -represents the area where the DSCP will be stored in the connmark. The -state mask is a minimum 1 bit length mask that must not overlap with the -dscpmask. It represents a flag which is set when the DSCP has been -stored in the conntrack mark. This is useful to implement a 'one shot' -iptables based classification where the 'complicated' iptables rules are -only run once to classify the connection on initial (egress) packet and -subsequent packets are all marked/restored with the same DSCP. A state -mask of zero disables the setting of a status bit/s. - -example syntax with a suitably modified iptables user space application: - -iptables -A QOS_MARK_eth0 -t mangle -j CONNMARK --savedscp-mark 0xfc000000/0x01000000 - -Would store the DSCP in the top 6 bits of the 32bit mark field, and use -the LSB of the top byte as the 'DSCP has been stored' marker. - -|----0xFC----conntrack mark----000000---| -| Bits 31-26 | bit 25 | bit24 |~~~ Bit 0| -| DSCP | unused | flag |unused | -|-----------------------0x01---000000---| - ^ ^ - | | - ---| Conditional flag - | set this when dscp -|-ip diffserv-| stored in mark -| 6 bits | -|-------------| - -an identically configured tc action to restore looks like: - -tc filter show dev eth0 ingress -filter parent ffff: protocol all pref 10 u32 chain 0 -filter parent ffff: protocol all pref 10 u32 chain 0 fh 800: ht divisor 1 -filter parent ffff: protocol all pref 10 u32 chain 0 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:1 not_in_hw - match 00000000/00000000 at 0 - action order 1: ctinfo zone 0 pipe - index 2 ref 1 bind 1 dscp 0xfc000000/0x1000000 - - action order 2: mirred (Egress Redirect to device ifb4eth0) stolen - index 1 ref 1 bind 1 - -|----0xFC----conntrack mark----000000---| -| Bits 31-26 | bit 25 | bit24 |~~~ Bit 0| -| DSCP | unused | flag |unused | -|-----------------------0x01---000000---| - | | - | | - ---| Conditional flag - v only restore if set -|-ip diffserv-| -| 6 bits | -|-------------| - -Signed-off-by: Kevin Darbyshire-Bryant ---- - include/uapi/linux/netfilter/xt_connmark.h | 3 ++- - net/netfilter/xt_connmark.c | 17 +++++++++++++++++ - 2 files changed, 19 insertions(+), 1 deletion(-) - ---- a/include/uapi/linux/netfilter/xt_connmark.h -+++ b/include/uapi/linux/netfilter/xt_connmark.h -@@ -16,7 +16,8 @@ - enum { - XT_CONNMARK_SET = 0, - XT_CONNMARK_SAVE, -- XT_CONNMARK_RESTORE -+ XT_CONNMARK_RESTORE, -+ XT_CONNMARK_SAVEDSCP - }; - - enum { ---- a/net/netfilter/xt_connmark.c -+++ b/net/netfilter/xt_connmark.c -@@ -42,6 +42,7 @@ connmark_tg_shift(struct sk_buff *skb, c - u_int32_t new_targetmark; - struct nf_conn *ct; - u_int32_t newmark; -+ u_int8_t dscp; - - ct = nf_ct_get(skb, &ctinfo); - if (ct == NULL) -@@ -74,6 +75,21 @@ connmark_tg_shift(struct sk_buff *skb, c - nf_conntrack_event_cache(IPCT_MARK, ct); - } - break; -+ case XT_CONNMARK_SAVEDSCP: -+ if (skb->protocol == htons(ETH_P_IP)) -+ dscp = ipv4_get_dsfield(ip_hdr(skb)) >> 2; -+ else if (skb->protocol == htons(ETH_P_IPV6)) -+ dscp = ipv6_get_dsfield(ipv6_hdr(skb)) >> 2; -+ else /* protocol doesn't have diffserv */ -+ break; -+ -+ newmark = (ct->mark & ~info->ctmark) | -+ (info->ctmask | (dscp << info->shift_bits)); -+ if (ct->mark != newmark) { -+ ct->mark = newmark; -+ nf_conntrack_event_cache(IPCT_MARK, ct); -+ } -+ break; - case XT_CONNMARK_RESTORE: - new_targetmark = (ct->mark & info->ctmask); - if (info->shift_dir == D_SHIFT_RIGHT) -@@ -86,6 +102,7 @@ connmark_tg_shift(struct sk_buff *skb, c - skb->mark = newmark; - break; - } -+out: - return XT_CONTINUE; - } - diff --git a/target/linux/generic/hack-4.19/645-netfilter-connmark-introduce-set-dscpmark.patch b/target/linux/generic/hack-4.19/645-netfilter-connmark-introduce-set-dscpmark.patch new file mode 100644 index 000000000..ca9818705 --- /dev/null +++ b/target/linux/generic/hack-4.19/645-netfilter-connmark-introduce-set-dscpmark.patch @@ -0,0 +1,212 @@ +From eda40b8c8c82e0f2789d6bc8bf63846dce2e8f32 Mon Sep 17 00:00:00 2001 +From: Kevin Darbyshire-Bryant +Date: Sat, 23 Mar 2019 09:29:49 +0000 +Subject: [PATCH] netfilter: connmark: introduce set-dscpmark + +set-dscpmark is a method of storing the DSCP of an ip packet into +conntrack mark. In combination with a suitable tc filter action +(act_ctinfo) DSCP values are able to be stored in the mark on egress and +restored on ingress across links that otherwise alter or bleach DSCP. + +This is useful for qdiscs such as CAKE which are able to shape according +to policies based on DSCP. + +Ingress classification is traditionally a challenging task since +iptables rules haven't yet run and tc filter/eBPF programs are pre-NAT +lookups, hence are unable to see internal IPv4 addresses as used on the +typical home masquerading gateway. + +x_tables CONNMARK set-dscpmark target solves the problem of storing the +DSCP to the conntrack mark in a way suitable for the new act_ctinfo tc +action to restore. + +The set-dscpmark option accepts 2 parameters, a 32bit 'dscpmask' and a +32bit 'statemask'. The dscp mask must be 6 contiguous bits and +represents the area where the DSCP will be stored in the connmark. The +state mask is a minimum 1 bit length mask that must not overlap with the +dscpmask. It represents a flag which is set when the DSCP has been +stored in the conntrack mark. This is useful to implement a 'one shot' +iptables based classification where the 'complicated' iptables rules are +only run once to classify the connection on initial (egress) packet and +subsequent packets are all marked/restored with the same DSCP. A state +mask of zero disables the setting of a status bit/s. + +example syntax with a suitably modified iptables user space application: + +iptables -A QOS_MARK_eth0 -t mangle -j CONNMARK --set-dscpmark 0xfc000000/0x01000000 + +Would store the DSCP in the top 6 bits of the 32bit mark field, and use +the LSB of the top byte as the 'DSCP has been stored' marker. + +|----0xFC----conntrack mark----000000---| +| Bits 31-26 | bit 25 | bit24 |~~~ Bit 0| +| DSCP | unused | flag |unused | +|-----------------------0x01---000000---| + ^ ^ + | | + ---| Conditional flag + | set this when dscp +|-ip diffserv-| stored in mark +| 6 bits | +|-------------| + +an identically configured tc action to restore looks like: + +tc filter show dev eth0 ingress +filter parent ffff: protocol all pref 10 u32 chain 0 +filter parent ffff: protocol all pref 10 u32 chain 0 fh 800: ht divisor 1 +filter parent ffff: protocol all pref 10 u32 chain 0 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1: not_in_hw + match 00000000/00000000 at 0 + action order 1: ctinfo zone 0 pipe + index 2 ref 1 bind 1 dscp 0xfc000000/0x1000000 + + action order 2: mirred (Egress Redirect to device ifb4eth0) stolen + index 1 ref 1 bind 1 + +|----0xFC----conntrack mark----000000---| +| Bits 31-26 | bit 25 | bit24 |~~~ Bit 0| +| DSCP | unused | flag |unused | +|-----------------------0x01---000000---| + | | + | | + ---| Conditional flag + v only restore if set +|-ip diffserv-| +| 6 bits | +|-------------| + +Signed-off-by: Kevin Darbyshire-Bryant +--- + include/uapi/linux/netfilter/xt_connmark.h | 10 ++++ + net/netfilter/xt_connmark.c | 55 ++++++++++++++++++---- + 2 files changed, 57 insertions(+), 8 deletions(-) + +--- a/include/uapi/linux/netfilter/xt_connmark.h ++++ b/include/uapi/linux/netfilter/xt_connmark.h +@@ -20,6 +20,11 @@ enum { + }; + + enum { ++ XT_CONNMARK_VALUE = (1 << 0), ++ XT_CONNMARK_DSCP = (1 << 1) ++}; ++ ++enum { + D_SHIFT_LEFT = 0, + D_SHIFT_RIGHT, + }; +@@ -34,6 +39,11 @@ struct xt_connmark_tginfo2 { + __u8 shift_dir, shift_bits, mode; + }; + ++struct xt_connmark_tginfo3 { ++ __u32 ctmark, ctmask, nfmask; ++ __u8 shift_dir, shift_bits, mode, func; ++}; ++ + struct xt_connmark_mtinfo1 { + __u32 mark, mask; + __u8 invert; +--- a/net/netfilter/xt_connmark.c ++++ b/net/netfilter/xt_connmark.c +@@ -36,12 +36,13 @@ MODULE_ALIAS("ipt_connmark"); + MODULE_ALIAS("ip6t_connmark"); + + static unsigned int +-connmark_tg_shift(struct sk_buff *skb, const struct xt_connmark_tginfo2 *info) ++connmark_tg_shift(struct sk_buff *skb, const struct xt_connmark_tginfo3 *info) + { + enum ip_conntrack_info ctinfo; + u_int32_t new_targetmark; + struct nf_conn *ct; + u_int32_t newmark; ++ u_int8_t dscp; + + ct = nf_ct_get(skb, &ctinfo); + if (ct == NULL) +@@ -49,12 +50,24 @@ connmark_tg_shift(struct sk_buff *skb, c + + switch (info->mode) { + case XT_CONNMARK_SET: +- newmark = (ct->mark & ~info->ctmask) ^ info->ctmark; +- if (info->shift_dir == D_SHIFT_RIGHT) +- newmark >>= info->shift_bits; +- else +- newmark <<= info->shift_bits; ++ newmark = ct->mark; ++ if (info->func & XT_CONNMARK_VALUE) { ++ newmark = (newmark & ~info->ctmask) ^ info->ctmark; ++ if (info->shift_dir == D_SHIFT_RIGHT) ++ newmark >>= info->shift_bits; ++ else ++ newmark <<= info->shift_bits; ++ } else if (info->func & XT_CONNMARK_DSCP) { ++ if (skb->protocol == htons(ETH_P_IP)) ++ dscp = ipv4_get_dsfield(ip_hdr(skb)) >> 2; ++ else if (skb->protocol == htons(ETH_P_IPV6)) ++ dscp = ipv6_get_dsfield(ipv6_hdr(skb)) >> 2; ++ else /* protocol doesn't have diffserv */ ++ break; + ++ newmark = (newmark & ~info->ctmark) | ++ (info->ctmask | (dscp << info->shift_bits)); ++ } + if (ct->mark != newmark) { + ct->mark = newmark; + nf_conntrack_event_cache(IPCT_MARK, ct); +@@ -93,20 +106,36 @@ static unsigned int + connmark_tg(struct sk_buff *skb, const struct xt_action_param *par) + { + const struct xt_connmark_tginfo1 *info = par->targinfo; +- const struct xt_connmark_tginfo2 info2 = { ++ const struct xt_connmark_tginfo3 info3 = { + .ctmark = info->ctmark, + .ctmask = info->ctmask, + .nfmask = info->nfmask, + .mode = info->mode, ++ .func = XT_CONNMARK_VALUE + }; + +- return connmark_tg_shift(skb, &info2); ++ return connmark_tg_shift(skb, &info3); + } + + static unsigned int + connmark_tg_v2(struct sk_buff *skb, const struct xt_action_param *par) + { + const struct xt_connmark_tginfo2 *info = par->targinfo; ++ const struct xt_connmark_tginfo3 info3 = { ++ .ctmark = info->ctmark, ++ .ctmask = info->ctmask, ++ .nfmask = info->nfmask, ++ .mode = info->mode, ++ .func = XT_CONNMARK_VALUE ++ }; ++ ++ return connmark_tg_shift(skb, &info3); ++} ++ ++static unsigned int ++connmark_tg_v3(struct sk_buff *skb, const struct xt_action_param *par) ++{ ++ const struct xt_connmark_tginfo3 *info = par->targinfo; + + return connmark_tg_shift(skb, info); + } +@@ -177,6 +206,16 @@ static struct xt_target connmark_tg_reg[ + .targetsize = sizeof(struct xt_connmark_tginfo2), + .destroy = connmark_tg_destroy, + .me = THIS_MODULE, ++ }, ++ { ++ .name = "CONNMARK", ++ .revision = 3, ++ .family = NFPROTO_UNSPEC, ++ .checkentry = connmark_tg_check, ++ .target = connmark_tg_v3, ++ .targetsize = sizeof(struct xt_connmark_tginfo3), ++ .destroy = connmark_tg_destroy, ++ .me = THIS_MODULE, + } + }; + diff --git a/target/linux/generic/hack-4.19/702-phy_add_aneg_done_function.patch b/target/linux/generic/hack-4.19/702-phy_add_aneg_done_function.patch index fe295906e..a0e6484be 100644 --- a/target/linux/generic/hack-4.19/702-phy_add_aneg_done_function.patch +++ b/target/linux/generic/hack-4.19/702-phy_add_aneg_done_function.patch @@ -1,6 +1,6 @@ --- a/include/linux/phy.h +++ b/include/linux/phy.h -@@ -548,6 +548,12 @@ struct phy_driver { +@@ -555,6 +555,12 @@ struct phy_driver { /* Determines the negotiated speed and duplex */ int (*read_status)(struct phy_device *phydev); diff --git a/target/linux/generic/hack-4.9/721-phy_packets.patch b/target/linux/generic/hack-4.9/721-phy_packets.patch index e1ad675a7..db4c06733 100644 --- a/target/linux/generic/hack-4.9/721-phy_packets.patch +++ b/target/linux/generic/hack-4.9/721-phy_packets.patch @@ -56,7 +56,7 @@ Signed-off-by: Felix Fietkau */ --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h -@@ -2340,6 +2340,10 @@ static inline int pskb_trim(struct sk_bu +@@ -2359,6 +2359,10 @@ static inline int pskb_trim(struct sk_bu return (len < skb->len) ? __pskb_trim(skb, len) : 0; } @@ -67,7 +67,7 @@ Signed-off-by: Felix Fietkau /** * pskb_trim_unique - remove end from a paged unique (not cloned) buffer * @skb: buffer to alter -@@ -2460,16 +2464,6 @@ static inline struct sk_buff *dev_alloc_ +@@ -2479,16 +2483,6 @@ static inline struct sk_buff *dev_alloc_ } @@ -101,8 +101,8 @@ Signed-off-by: Felix Fietkau help --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -2972,10 +2972,20 @@ static int xmit_one(struct sk_buff *skb, - if (!list_empty(&ptype_all) || !list_empty(&dev->ptype_all)) +@@ -2980,10 +2980,20 @@ static int xmit_one(struct sk_buff *skb, + #endif dev_queue_xmit_nit(skb, dev); - len = skb->len; @@ -136,7 +136,7 @@ Signed-off-by: Felix Fietkau #include #include -@@ -533,6 +534,22 @@ skb_fail: +@@ -614,6 +615,22 @@ skb_fail: } EXPORT_SYMBOL(__napi_alloc_skb); diff --git a/target/linux/generic/hack-4.9/950-net-patch-linux-kernel-to-support-shortcut-fe.patch b/target/linux/generic/hack-4.9/950-net-patch-linux-kernel-to-support-shortcut-fe.patch index e7844effd..69b53ca99 100644 --- a/target/linux/generic/hack-4.9/950-net-patch-linux-kernel-to-support-shortcut-fe.patch +++ b/target/linux/generic/hack-4.9/950-net-patch-linux-kernel-to-support-shortcut-fe.patch @@ -24,13 +24,11 @@ Signed-off-by: Murat Sezgin net/netfilter/nf_conntrack_proto_tcp.c | 10 ++++++++++ 4 files changed, 41 insertions(+) -diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h -index 9a0c945..56f4007 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h -@@ -738,6 +738,9 @@ struct sk_buff { - #endif +@@ -753,6 +753,9 @@ struct sk_buff { __u8 ipvs_property:1; + __u8 inner_protocol_type:1; +#ifdef CONFIG_SHORTCUT_FE + __u8 fast_forwarded:1; @@ -38,8 +36,6 @@ index 9a0c945..56f4007 100644 __u8 remcsum_offload:1; #ifdef CONFIG_NET_SWITCHDEV __u8 offload_fwd_mark:1; -diff --git a/net/Kconfig b/net/Kconfig -index b4621e1..6ba72cf 100644 --- a/net/Kconfig +++ b/net/Kconfig @@ -444,3 +444,6 @@ config HAVE_CBPF_JIT @@ -49,11 +45,9 @@ index b4621e1..6ba72cf 100644 + +config SHORTCUT_FE + bool "Enables kernel network stack path for Shortcut Forwarding Engine" -diff --git a/net/core/dev.c b/net/core/dev.c -index ca39cd2..74cd937 100644 --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -2929,8 +2929,17 @@ static int xmit_one(struct sk_buff *skb, struct net_device *dev, +@@ -2972,6 +2972,12 @@ static int xmit_one(struct sk_buff *skb, unsigned int len; int rc; @@ -63,7 +57,12 @@ index ca39cd2..74cd937 100644 + */ + if (!skb->fast_forwarded) { +#endif + #if defined(CONFIG_IMQ) || defined(CONFIG_IMQ_MODULE) + if ((!list_empty(&ptype_all) || !list_empty(&dev->ptype_all)) && + !(skb->imq_flags & IMQ_F_ENQUEUE)) +@@ -2979,6 +2985,9 @@ static int xmit_one(struct sk_buff *skb, if (!list_empty(&ptype_all) || !list_empty(&dev->ptype_all)) + #endif dev_queue_xmit_nit(skb, dev); +#ifdef CONFIG_SHORTCUT_FE + } @@ -71,7 +70,7 @@ index ca39cd2..74cd937 100644 #ifdef CONFIG_ETHERNET_PACKET_MANGLE if (!dev->eth_mangle_tx || -@@ -4061,6 +4070,11 @@ void netdev_rx_handler_unregister(struct net_device *dev) +@@ -4130,6 +4139,11 @@ void netdev_rx_handler_unregister(struct } EXPORT_SYMBOL_GPL(netdev_rx_handler_unregister); @@ -83,7 +82,7 @@ index ca39cd2..74cd937 100644 /* * Limit the use of PFMEMALLOC reserves to those protocols that implement * the special handling of PFMEMALLOC skbs. -@@ -4108,6 +4122,9 @@ static int __netif_receive_skb_core(struct sk_buff *skb, bool pfmemalloc) +@@ -4177,6 +4191,9 @@ static int __netif_receive_skb_core(stru bool deliver_exact = false; int ret = NET_RX_DROP; __be16 type; @@ -93,7 +92,7 @@ index ca39cd2..74cd937 100644 net_timestamp_check(!netdev_tstamp_prequeue, skb); -@@ -4134,6 +4151,14 @@ static int __netif_receive_skb_core(struct sk_buff *skb, bool pfmemalloc) +@@ -4203,6 +4220,14 @@ another_round: goto out; } @@ -108,8 +107,6 @@ index ca39cd2..74cd937 100644 #ifdef CONFIG_NET_CLS_ACT if (skb->tc_verd & TC_NCLS) { skb->tc_verd = CLR_TC_NCLS(skb->tc_verd); -diff --git a/net/netfilter/nf_conntrack_proto_tcp.c b/net/netfilter/nf_conntrack_proto_tcp.c -index f24b626..4581481 100644 --- a/net/netfilter/nf_conntrack_proto_tcp.c +++ b/net/netfilter/nf_conntrack_proto_tcp.c @@ -34,12 +34,22 @@ @@ -135,6 +132,3 @@ index f24b626..4581481 100644 /* If it is set to zero, we disable picking up already established connections. */ --- -2.7.4 - diff --git a/target/linux/generic/hack-4.9/951-bridge-Add-new-bridge-APIs-needed-for-network-HW-acc.patch b/target/linux/generic/hack-4.9/951-bridge-Add-new-bridge-APIs-needed-for-network-HW-acc.patch index 5cc7dabad..b576ad91b 100644 --- a/target/linux/generic/hack-4.9/951-bridge-Add-new-bridge-APIs-needed-for-network-HW-acc.patch +++ b/target/linux/generic/hack-4.9/951-bridge-Add-new-bridge-APIs-needed-for-network-HW-acc.patch @@ -24,8 +24,6 @@ Signed-off-by: Murat Sezgin net/bridge/br_if.c | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+) -diff --git a/include/linux/if_bridge.h b/include/linux/if_bridge.h -index 0911c8c..4473f62 100644 --- a/include/linux/if_bridge.h +++ b/include/linux/if_bridge.h @@ -52,6 +52,7 @@ struct br_ip_list { @@ -36,11 +34,9 @@ index 0911c8c..4473f62 100644 typedef int br_should_route_hook_t(struct sk_buff *skb); extern br_should_route_hook_t __rcu *br_should_route_hook; -diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c -index ed0dd33..342b2d9 100644 --- a/net/bridge/br_if.c +++ b/net/bridge/br_if.c -@@ -655,3 +655,28 @@ void br_port_flags_change(struct net_bridge_port *p, unsigned long mask) +@@ -654,3 +654,28 @@ void br_port_flags_change(struct net_bri if (mask & BR_AUTO_MASK) nbp_update_port_count(br); } @@ -69,6 +65,3 @@ index ed0dd33..342b2d9 100644 + u64_stats_update_end(&stats->syncp); +} +EXPORT_SYMBOL_GPL(br_dev_update_stats); --- -2.7.4 - diff --git a/target/linux/generic/hack-4.9/952-net-conntrack-events-support-multiple-registrant.patch b/target/linux/generic/hack-4.9/952-net-conntrack-events-support-multiple-registrant.patch index a898c4a69..85407f18d 100644 --- a/target/linux/generic/hack-4.9/952-net-conntrack-events-support-multiple-registrant.patch +++ b/target/linux/generic/hack-4.9/952-net-conntrack-events-support-multiple-registrant.patch @@ -20,8 +20,6 @@ Signed-off-by: Zhi Chen net/netfilter/nf_conntrack_netlink.c | 19 ++++++ 6 files changed, 139 insertions(+), 1 deletion(-) -diff --git a/include/net/netfilter/nf_conntrack_ecache.h b/include/net/netfilter/nf_conntrack_ecache.h -index 12d967b..c2b98b6 100644 --- a/include/net/netfilter/nf_conntrack_ecache.h +++ b/include/net/netfilter/nf_conntrack_ecache.h @@ -70,6 +70,10 @@ struct nf_ct_event { @@ -35,7 +33,7 @@ index 12d967b..c2b98b6 100644 struct nf_ct_event_notifier { int (*fcn)(unsigned int events, struct nf_ct_event *item); }; -@@ -78,6 +82,7 @@ int nf_conntrack_register_notifier(struct net *net, +@@ -78,6 +82,7 @@ int nf_conntrack_register_notifier(struc struct nf_ct_event_notifier *nb); void nf_conntrack_unregister_notifier(struct net *net, struct nf_ct_event_notifier *nb); @@ -43,7 +41,7 @@ index 12d967b..c2b98b6 100644 void nf_ct_deliver_cached_events(struct nf_conn *ct); int nf_conntrack_eventmask_report(unsigned int eventmask, struct nf_conn *ct, -@@ -86,11 +91,13 @@ int nf_conntrack_eventmask_report(unsigned int eventmask, struct nf_conn *ct, +@@ -86,11 +91,13 @@ int nf_conntrack_eventmask_report(unsign static inline void nf_conntrack_event_cache(enum ip_conntrack_events event, struct nf_conn *ct) { @@ -71,7 +69,7 @@ index 12d967b..c2b98b6 100644 return nf_conntrack_eventmask_report(1 << event, ct, portid, report); } -@@ -114,10 +123,12 @@ nf_conntrack_event_report(enum ip_conntrack_events event, struct nf_conn *ct, +@@ -114,10 +123,12 @@ nf_conntrack_event_report(enum ip_conntr static inline int nf_conntrack_event(enum ip_conntrack_events event, struct nf_conn *ct) { @@ -84,8 +82,6 @@ index 12d967b..c2b98b6 100644 return nf_conntrack_eventmask_report(1 << event, ct, 0, 0); } -diff --git a/include/net/netns/conntrack.h b/include/net/netns/conntrack.h -index e469e85..1d31db8 100644 --- a/include/net/netns/conntrack.h +++ b/include/net/netns/conntrack.h @@ -86,7 +86,11 @@ struct netns_ct { @@ -100,8 +96,6 @@ index e469e85..1d31db8 100644 struct nf_exp_event_notifier __rcu *nf_expect_event_cb; struct nf_ip_net nf_ct_proto; #if defined(CONFIG_NF_CONNTRACK_LABELS) -diff --git a/net/netfilter/Kconfig b/net/netfilter/Kconfig -index 63073be..08d7aab 100644 --- a/net/netfilter/Kconfig +++ b/net/netfilter/Kconfig @@ -136,6 +136,14 @@ config NF_CONNTRACK_TIMEOUT @@ -119,11 +113,9 @@ index 63073be..08d7aab 100644 config NF_CONNTRACK_TIMESTAMP bool 'Connection tracking timestamping' depends on NETFILTER_ADVANCED -diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c -index 6bd1508..9b81c7c 100644 --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c -@@ -1998,6 +1998,10 @@ int nf_conntrack_init_net(struct net *net) +@@ -2077,6 +2077,10 @@ int nf_conntrack_init_net(struct net *ne ret = nf_conntrack_proto_pernet_init(net); if (ret < 0) goto err_proto; @@ -134,8 +126,6 @@ index 6bd1508..9b81c7c 100644 return 0; err_proto: -diff --git a/net/netfilter/nf_conntrack_ecache.c b/net/netfilter/nf_conntrack_ecache.c -index da9df2d..e0e2a8f 100644 --- a/net/netfilter/nf_conntrack_ecache.c +++ b/net/netfilter/nf_conntrack_ecache.c @@ -18,6 +18,9 @@ @@ -148,7 +138,7 @@ index da9df2d..e0e2a8f 100644 #include #include #include -@@ -117,6 +120,38 @@ static void ecache_work(struct work_struct *work) +@@ -117,6 +120,38 @@ static void ecache_work(struct work_stru schedule_delayed_work(&ctnet->ecache_dwork, delay); } @@ -187,7 +177,7 @@ index da9df2d..e0e2a8f 100644 int nf_conntrack_eventmask_report(unsigned int eventmask, struct nf_conn *ct, u32 portid, int report) { -@@ -171,10 +206,52 @@ int nf_conntrack_eventmask_report(unsigned int eventmask, struct nf_conn *ct, +@@ -171,10 +206,52 @@ out_unlock: rcu_read_unlock(); return ret; } @@ -240,7 +230,7 @@ index da9df2d..e0e2a8f 100644 void nf_ct_deliver_cached_events(struct nf_conn *ct) { struct net *net = nf_ct_net(ct); -@@ -225,6 +302,7 @@ void nf_ct_deliver_cached_events(struct nf_conn *ct) +@@ -225,6 +302,7 @@ void nf_ct_deliver_cached_events(struct out_unlock: rcu_read_unlock(); } @@ -248,7 +238,7 @@ index da9df2d..e0e2a8f 100644 EXPORT_SYMBOL_GPL(nf_ct_deliver_cached_events); void nf_ct_expect_event_report(enum ip_conntrack_expect_events event, -@@ -257,6 +335,12 @@ void nf_ct_expect_event_report(enum ip_conntrack_expect_events event, +@@ -257,6 +335,12 @@ out_unlock: rcu_read_unlock(); } @@ -261,7 +251,7 @@ index da9df2d..e0e2a8f 100644 int nf_conntrack_register_notifier(struct net *net, struct nf_ct_event_notifier *new) { -@@ -277,8 +361,15 @@ int nf_conntrack_register_notifier(struct net *net, +@@ -277,8 +361,15 @@ out_unlock: mutex_unlock(&nf_ct_ecache_mutex); return ret; } @@ -277,16 +267,14 @@ index da9df2d..e0e2a8f 100644 void nf_conntrack_unregister_notifier(struct net *net, struct nf_ct_event_notifier *new) { -@@ -291,6 +382,7 @@ void nf_conntrack_unregister_notifier(struct net *net, +@@ -292,6 +383,7 @@ void nf_conntrack_unregister_notifier(st RCU_INIT_POINTER(net->ct.nf_conntrack_event_cb, NULL); - mutex_unlock(&nf_ct_ecache_mutex); + /* synchronize_rcu() is called from ctnetlink_exit. */ } +#endif EXPORT_SYMBOL_GPL(nf_conntrack_unregister_notifier); int nf_ct_expect_register_notifier(struct net *net, -diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c -index 04111c1..8c741f7 100644 --- a/net/netfilter/nf_conntrack_netlink.c +++ b/net/netfilter/nf_conntrack_netlink.c @@ -28,6 +28,11 @@ @@ -299,9 +287,9 @@ index 04111c1..8c741f7 100644 +#endif + #include + #include - #include -@@ -615,14 +620,22 @@ static size_t ctnetlink_nlmsg_size(const struct nf_conn *ct) +@@ -618,14 +623,22 @@ static size_t ctnetlink_nlmsg_size(const ; } @@ -324,7 +312,7 @@ index 04111c1..8c741f7 100644 struct nf_conn *ct = item->ct; struct sk_buff *skb; unsigned int type; -@@ -3260,9 +3273,15 @@ static int ctnetlink_stat_exp_cpu(struct net *net, struct sock *ctnl, +@@ -3288,9 +3301,15 @@ static int ctnetlink_stat_exp_cpu(struct } #ifdef CONFIG_NF_CONNTRACK_EVENTS @@ -340,6 +328,3 @@ index 04111c1..8c741f7 100644 static struct nf_exp_event_notifier ctnl_notifier_exp = { .fcn = ctnetlink_expect_event, --- -2.7.4 - diff --git a/target/linux/generic/pending-4.19/411-mtd-partial_eraseblock_write.patch b/target/linux/generic/pending-4.19/411-mtd-partial_eraseblock_write.patch index bf9822fda..f3a314ae0 100644 --- a/target/linux/generic/pending-4.19/411-mtd-partial_eraseblock_write.patch +++ b/target/linux/generic/pending-4.19/411-mtd-partial_eraseblock_write.patch @@ -114,8 +114,7 @@ Signed-off-by: Felix Fietkau + slave->mtd.erasesize = slave->mtd.size; } -- tmp = part_absolute_offset(parent) + slave->mtd.size; -+ tmp = part_absolute_offset(parent) + slave->offset + slave->mtd.size; + tmp = part_absolute_offset(parent) + slave->offset + slave->mtd.size; remainder = do_div(tmp, wr_alignment); if ((slave->mtd.flags & MTD_WRITEABLE) && remainder) { - slave->mtd.flags &= ~MTD_WRITEABLE; diff --git a/target/linux/generic/pending-4.19/450-mtd-spi-nor-allow-NOR-driver-to-write-fewer-bytes-th.patch b/target/linux/generic/pending-4.19/450-mtd-spi-nor-allow-NOR-driver-to-write-fewer-bytes-th.patch index 6981c6d94..4d64fca90 100644 --- a/target/linux/generic/pending-4.19/450-mtd-spi-nor-allow-NOR-driver-to-write-fewer-bytes-th.patch +++ b/target/linux/generic/pending-4.19/450-mtd-spi-nor-allow-NOR-driver-to-write-fewer-bytes-th.patch @@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -1457,7 +1457,7 @@ static int spi_nor_write(struct mtd_info +@@ -1459,7 +1459,7 @@ static int spi_nor_write(struct mtd_info write_enable(nor); ret = nor->write(nor, addr, page_remain, buf + i); @@ -20,7 +20,7 @@ Signed-off-by: Felix Fietkau goto write_err; written = ret; -@@ -1466,13 +1466,6 @@ static int spi_nor_write(struct mtd_info +@@ -1468,13 +1468,6 @@ static int spi_nor_write(struct mtd_info goto write_err; *retlen += written; i += written; diff --git a/target/linux/generic/pending-4.19/465-m25p80-mx-disable-software-protection.patch b/target/linux/generic/pending-4.19/465-m25p80-mx-disable-software-protection.patch index 0c5d6cfa6..3172c223f 100644 --- a/target/linux/generic/pending-4.19/465-m25p80-mx-disable-software-protection.patch +++ b/target/linux/generic/pending-4.19/465-m25p80-mx-disable-software-protection.patch @@ -8,7 +8,7 @@ Signed-off-by: Felix Fietkau --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -2735,6 +2735,7 @@ static int spi_nor_init(struct spi_nor * +@@ -2737,6 +2737,7 @@ static int spi_nor_init(struct spi_nor * */ if (JEDEC_MFR(nor->info) == SNOR_MFR_ATMEL || JEDEC_MFR(nor->info) == SNOR_MFR_INTEL || diff --git a/target/linux/generic/pending-4.19/466-Revert-mtd-spi-nor-fix-Spansion-regressions-aliased-.patch b/target/linux/generic/pending-4.19/466-Revert-mtd-spi-nor-fix-Spansion-regressions-aliased-.patch index fb6ae7df7..f6a98af6a 100644 --- a/target/linux/generic/pending-4.19/466-Revert-mtd-spi-nor-fix-Spansion-regressions-aliased-.patch +++ b/target/linux/generic/pending-4.19/466-Revert-mtd-spi-nor-fix-Spansion-regressions-aliased-.patch @@ -17,7 +17,7 @@ Signed-off-by: Matthias Schiffer --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -2737,6 +2737,7 @@ static int spi_nor_init(struct spi_nor * +@@ -2739,6 +2739,7 @@ static int spi_nor_init(struct spi_nor * JEDEC_MFR(nor->info) == SNOR_MFR_INTEL || JEDEC_MFR(nor->info) == SNOR_MFR_MACRONIX || JEDEC_MFR(nor->info) == SNOR_MFR_SST || @@ -25,7 +25,7 @@ Signed-off-by: Matthias Schiffer nor->info->flags & SPI_NOR_HAS_LOCK) { write_enable(nor); write_sr(nor, 0); -@@ -2873,7 +2874,8 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -2875,7 +2876,8 @@ int spi_nor_scan(struct spi_nor *nor, co /* NOR protection support for STmicro/Micron chips and similar */ if (JEDEC_MFR(info) == SNOR_MFR_MICRON || diff --git a/target/linux/generic/pending-4.19/470-mtd-spi-nor-support-limiting-4K-sectors-support-base.patch b/target/linux/generic/pending-4.19/470-mtd-spi-nor-support-limiting-4K-sectors-support-base.patch index 12d785856..695c38cf0 100644 --- a/target/linux/generic/pending-4.19/470-mtd-spi-nor-support-limiting-4K-sectors-support-base.patch +++ b/target/linux/generic/pending-4.19/470-mtd-spi-nor-support-limiting-4K-sectors-support-base.patch @@ -39,7 +39,7 @@ Signed-off-by: Felix Fietkau depends on ARCH_AT91 || (ARM && COMPILE_TEST && !ARCH_EBSA110) --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -2649,10 +2649,12 @@ static int spi_nor_select_erase(struct s +@@ -2651,10 +2651,12 @@ static int spi_nor_select_erase(struct s #ifdef CONFIG_MTD_SPI_NOR_USE_4K_SECTORS /* prefer "small sector" erase if possible */ diff --git a/target/linux/generic/pending-4.19/479-mtd-spi-nor-add-xtx-xt25f128b.patch b/target/linux/generic/pending-4.19/479-mtd-spi-nor-add-xtx-xt25f128b.patch index 664837928..da60939bb 100644 --- a/target/linux/generic/pending-4.19/479-mtd-spi-nor-add-xtx-xt25f128b.patch +++ b/target/linux/generic/pending-4.19/479-mtd-spi-nor-add-xtx-xt25f128b.patch @@ -30,7 +30,7 @@ Signed-off-by: Daniel Golle --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -1273,6 +1273,9 @@ static const struct flash_info spi_nor_i +@@ -1275,6 +1275,9 @@ static const struct flash_info spi_nor_i /* XMC (Wuhan Xinxin Semiconductor Manufacturing Corp.) */ { "XM25QH64A", INFO(0x207017, 0, 64 * 1024, 128, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, { "XM25QH128A", INFO(0x207018, 0, 64 * 1024, 256, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, diff --git a/target/linux/generic/pending-4.9/680-NET-skip-GRO-for-foreign-MAC-addresses.patch b/target/linux/generic/pending-4.9/680-NET-skip-GRO-for-foreign-MAC-addresses.patch index e7e1a3a3b..7a80f349e 100644 --- a/target/linux/generic/pending-4.9/680-NET-skip-GRO-for-foreign-MAC-addresses.patch +++ b/target/linux/generic/pending-4.9/680-NET-skip-GRO-for-foreign-MAC-addresses.patch @@ -22,7 +22,7 @@ Signed-off-by: Felix Fietkau #endif --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h -@@ -747,7 +747,8 @@ struct sk_buff { +@@ -757,7 +757,8 @@ struct sk_buff { #ifdef CONFIG_NET_SWITCHDEV __u8 offload_fwd_mark:1; #endif @@ -30,11 +30,11 @@ Signed-off-by: Felix Fietkau + __u8 gro_skip:1; + /* 1, 3 or 4 bit hole */ - #ifdef CONFIG_NET_SCHED - __u16 tc_index; /* traffic control index */ + #if defined(CONFIG_IMQ) || defined(CONFIG_IMQ_MODULE) + __u8 imq_flags:IMQ_F_BITS; --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -4572,6 +4572,9 @@ static enum gro_result dev_gro_receive(s +@@ -4582,6 +4582,9 @@ static enum gro_result dev_gro_receive(s enum gro_result ret; int grow; @@ -44,7 +44,7 @@ Signed-off-by: Felix Fietkau if (!(skb->dev->features & NETIF_F_GRO)) goto normal; -@@ -5867,6 +5870,48 @@ static void __netdev_adjacent_dev_unlink +@@ -5877,6 +5880,48 @@ static void __netdev_adjacent_dev_unlink &upper_dev->adj_list.lower); } @@ -93,7 +93,7 @@ Signed-off-by: Felix Fietkau static int __netdev_upper_dev_link(struct net_device *dev, struct net_device *upper_dev, bool master, void *upper_priv, void *upper_info) -@@ -5939,6 +5984,7 @@ static int __netdev_upper_dev_link(struc +@@ -5877,6 +5880,48 @@ static void __netdev_adjacent_dev_unlink goto rollback_lower_mesh; } @@ -101,7 +101,7 @@ Signed-off-by: Felix Fietkau ret = call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, dev, &changeupper_info.info); ret = notifier_to_errno(ret); -@@ -6065,6 +6111,7 @@ void netdev_upper_dev_unlink(struct net_ +@@ -6075,6 +6121,7 @@ void netdev_upper_dev_unlink(struct net_ list_for_each_entry(i, &upper_dev->all_adj_list.upper, list) __netdev_adjacent_dev_unlink(dev, i->dev, i->ref_nr); @@ -109,7 +109,7 @@ Signed-off-by: Felix Fietkau call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, dev, &changeupper_info.info); } -@@ -6668,6 +6715,7 @@ int dev_set_mac_address(struct net_devic +@@ -6678,6 +6725,7 @@ int dev_set_mac_address(struct net_devic if (err) return err; dev->addr_assign_type = NET_ADDR_SET; diff --git a/target/linux/generic/pending-4.9/0931-w1-gpio-fix-problem-with-platfom-data-in-w1-gpio.patch b/target/linux/generic/pending-4.9/931-w1-gpio-fix-problem-with-platfom-data-in-w1-gpio.patch similarity index 100% rename from target/linux/generic/pending-4.9/0931-w1-gpio-fix-problem-with-platfom-data-in-w1-gpio.patch rename to target/linux/generic/pending-4.9/931-w1-gpio-fix-problem-with-platfom-data-in-w1-gpio.patch -- GitLab