|
@@ -654,11 +654,14 @@ static void macvtap_skb_to_vnet_hdr(struct macvtap_queue *q,
|
|
|
} /* else everything is zero */
|
|
|
}
|
|
|
|
|
|
+/* Neighbour code has some assumptions on HH_DATA_MOD alignment */
|
|
|
+#define MACVTAP_RESERVE HH_DATA_OFF(ETH_HLEN)
|
|
|
+
|
|
|
/* Get packet from user space buffer */
|
|
|
static ssize_t macvtap_get_user(struct macvtap_queue *q, struct msghdr *m,
|
|
|
struct iov_iter *from, int noblock)
|
|
|
{
|
|
|
- int good_linear = SKB_MAX_HEAD(NET_IP_ALIGN);
|
|
|
+ int good_linear = SKB_MAX_HEAD(MACVTAP_RESERVE);
|
|
|
struct sk_buff *skb;
|
|
|
struct macvlan_dev *vlan;
|
|
|
unsigned long total_len = iov_iter_count(from);
|
|
@@ -722,7 +725,7 @@ static ssize_t macvtap_get_user(struct macvtap_queue *q, struct msghdr *m,
|
|
|
linear = macvtap16_to_cpu(q, vnet_hdr.hdr_len);
|
|
|
}
|
|
|
|
|
|
- skb = macvtap_alloc_skb(&q->sk, NET_IP_ALIGN, copylen,
|
|
|
+ skb = macvtap_alloc_skb(&q->sk, MACVTAP_RESERVE, copylen,
|
|
|
linear, noblock, &err);
|
|
|
if (!skb)
|
|
|
goto err;
|