--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
-@@ -1618,6 +1618,7 @@ enum netdev_priv_flags {
- IFF_FAILOVER_SLAVE = 1<<28,
- IFF_L3MDEV_RX_HANDLER = 1<<29,
- IFF_LIVE_RENAME_OK = 1<<30,
-+ IFF_NO_IP_ALIGN = 1<<31,
+@@ -1669,6 +1669,10 @@ enum netdev_priv_flags {
+ IFF_TX_SKB_NO_LINEAR = BIT_ULL(31),
};
++enum netdev_extra_priv_flags {
++ IFF_NO_IP_ALIGN = 1<<0,
++};
++
#define IFF_802_1Q_VLAN IFF_802_1Q_VLAN
-@@ -1650,6 +1651,7 @@ enum netdev_priv_flags {
- #define IFF_FAILOVER_SLAVE IFF_FAILOVER_SLAVE
+ #define IFF_EBRIDGE IFF_EBRIDGE
+ #define IFF_BONDING IFF_BONDING
+@@ -1701,6 +1705,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
/* Specifies the type of the struct net_device::ml_priv pointer */
enum netdev_ml_priv_type {
-@@ -1990,6 +1992,11 @@ struct net_device {
+@@ -2002,6 +2007,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;
+@@ -2062,6 +2068,11 @@ struct net_device {
const struct tlsdev_ops *tlsdev_ops;
#endif
+
const struct header_ops *header_ops;
- unsigned int flags;
-@@ -2080,6 +2087,10 @@ struct net_device {
- struct mpls_dev __rcu *mpls_ptr;
+ unsigned char operstate;
+@@ -2136,6 +2147,10 @@ struct net_device {
+ struct mctp_dev __rcu *mctp_ptr;
#endif
+#ifdef CONFIG_ETHERNET_PACKET_MANGLE
*/
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
-@@ -2710,6 +2710,10 @@ static inline int pskb_trim(struct sk_bu
+@@ -2854,6 +2854,10 @@ static inline int pskb_trim(struct sk_bu
return (len < skb->len) ? __pskb_trim(skb, len) : 0;
}
/**
* pskb_trim_unique - remove end from a paged unique (not cloned) buffer
* @skb: buffer to alter
-@@ -2841,16 +2845,6 @@ static inline struct sk_buff *dev_alloc_
+@@ -3004,16 +3008,6 @@ static inline struct sk_buff *dev_alloc_
}
help
--- a/net/core/dev.c
+++ b/net/core/dev.c
-@@ -3646,6 +3646,11 @@ static int xmit_one(struct sk_buff *skb,
+@@ -3588,6 +3588,11 @@ static int xmit_one(struct sk_buff *skb,
if (dev_nit_active(dev))
dev_queue_xmit_nit(skb, dev);
trace_net_dev_start_xmit(skb, dev);
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
-@@ -60,6 +60,7 @@
- #include <linux/prefetch.h>
+@@ -61,6 +61,7 @@
#include <linux/if_vlan.h>
#include <linux/mpls.h>
+ #include <linux/kcov.h>
+#include <linux/if.h>
#include <net/protocol.h>
#include <net/dst.h>
-@@ -553,6 +554,22 @@ skb_fail:
+@@ -602,6 +603,22 @@ skb_fail:
}
EXPORT_SYMBOL(__napi_alloc_skb);
+ struct sk_buff *skb = __netdev_alloc_skb(dev, length + NET_IP_ALIGN, gfp);
+
+#ifdef CONFIG_ETHERNET_PACKET_MANGLE
-+ if (dev && (dev->priv_flags & IFF_NO_IP_ALIGN))
++ if (dev && (dev->extra_priv_flags & IFF_NO_IP_ALIGN))
+ return skb;
+#endif
+
{
--- a/net/ethernet/eth.c
+++ b/net/ethernet/eth.c
-@@ -171,6 +171,12 @@ __be16 eth_type_trans(struct sk_buff *sk
+@@ -170,6 +170,12 @@ __be16 eth_type_trans(struct sk_buff *sk
const struct ethhdr *eth;
skb->dev = dev;