generic: 6.1: manually refresh hack patches

Refresh hack patches for kernel 6.1.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This commit is contained in:
Christian Marangi
2022-10-18 23:43:43 +02:00
parent 92a0cc7c61
commit 19a246bb65
28 changed files with 225 additions and 489 deletions

View File

@@ -19,34 +19,23 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1679,6 +1679,10 @@ enum netdev_priv_flags {
@@ -1655,6 +1655,7 @@ enum netdev_priv_flags {
IFF_LIVE_RENAME_OK = 1<<30,
IFF_TX_SKB_NO_LINEAR = BIT_ULL(31),
IFF_CHANGE_PROTO_DOWN = BIT_ULL(32),
+ IFF_NO_IP_ALIGN = BIT_ULL(33),
};
+enum netdev_extra_priv_flags {
+ IFF_NO_IP_ALIGN = 1<<0,
+};
+
#define IFF_802_1Q_VLAN IFF_802_1Q_VLAN
#define IFF_EBRIDGE IFF_EBRIDGE
#define IFF_BONDING IFF_BONDING
@@ -1711,6 +1715,7 @@ enum netdev_priv_flags {
@@ -1687,6 +1691,7 @@ enum netdev_priv_flags {
#define IFF_L3MDEV_RX_HANDLER IFF_L3MDEV_RX_HANDLER
#define IFF_LIVE_RENAME_OK IFF_LIVE_RENAME_OK
#define IFF_TX_SKB_NO_LINEAR IFF_TX_SKB_NO_LINEAR
+#define IFF_NO_IP_ALIGN IFF_NO_IP_ALIGN
+#define IFF_NO_IP_ALIGN IFF_NO_IP_ALIGN
/* Specifies the type of the struct net_device::ml_priv pointer */
enum netdev_ml_priv_type {
@@ -2012,6 +2017,7 @@ struct net_device {
/* Read-mostly cache-line for fast-path access */
unsigned int flags;
unsigned int priv_flags;
+ unsigned int extra_priv_flags;
const struct net_device_ops *netdev_ops;
int ifindex;
unsigned short gflags;
@@ -2072,6 +2078,11 @@ struct net_device {
@@ -2048,6 +2054,11 @@ struct net_device {
const struct tlsdev_ops *tlsdev_ops;
#endif
@@ -58,7 +47,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
const struct header_ops *header_ops;
unsigned char operstate;
@@ -2146,6 +2157,10 @@ struct net_device {
@@ -2122,6 +2133,10 @@ struct net_device {
struct mctp_dev __rcu *mctp_ptr;
#endif
@@ -71,7 +60,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
*/
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -2855,6 +2855,10 @@ static inline int pskb_trim(struct sk_bu
@@ -2816,6 +2816,10 @@ static inline int pskb_trim(struct sk_bu
return (len < skb->len) ? __pskb_trim(skb, len) : 0;
}
@@ -82,7 +71,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
/**
* pskb_trim_unique - remove end from a paged unique (not cloned) buffer
* @skb: buffer to alter
@@ -3005,16 +3009,6 @@ static inline struct sk_buff *dev_alloc_
@@ -2966,16 +2970,6 @@ static inline struct sk_buff *dev_alloc_
}
@@ -126,8 +115,8 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
+#endif
+
len = skb->len;
PRANDOM_ADD_NOISE(skb, dev, txq, len + jiffies);
trace_net_dev_start_xmit(skb, dev);
rc = netdev_start_xmit(skb, dev, txq, more);
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -61,6 +61,7 @@
@@ -148,7 +137,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
+ struct sk_buff *skb = __netdev_alloc_skb(dev, length + NET_IP_ALIGN, gfp);
+
+#ifdef CONFIG_ETHERNET_PACKET_MANGLE
+ if (dev && (dev->extra_priv_flags & IFF_NO_IP_ALIGN))
+ if (dev && (dev->priv_flags & IFF_NO_IP_ALIGN))
+ return skb;
+#endif
+