On Fri, Oct 6, 2017 at 3:22 PM, David Miller wrote:
> From: William Tu
> Date: Fri, 6 Oct 2017 15:09:29 -0700
>
>> Yes, adding another field in the struct net_device can avoid the
>> arithmetic operation. I'm not sure it's a good idea to add new field
>> since there are already a lot in net_devic
From: William Tu
Date: Fri, 6 Oct 2017 15:09:29 -0700
> Yes, adding another field in the struct net_device can avoid the
> arithmetic operation. I'm not sure it's a good idea to add new field
> since there are already a lot in net_device. Let's wait to see how
> others think.
Why would you add
On Fri, Oct 6, 2017 at 2:38 AM, David Laight wrote:
> From: William Tu
>> Sent: 05 October 2017 22:21
> ...
>> >> - if (skb->len > dev->mtu) {
>> >> + if (skb->len - dev->hard_header_len > dev->mtu) {
>> >
>> > Can you guarantee that skb->len > dev_hard_header_len?
>> > It is probably safe
From: William Tu
> Sent: 05 October 2017 22:21
...
> >> - if (skb->len > dev->mtu) {
> >> + if (skb->len - dev->hard_header_len > dev->mtu) {
> >
> > Can you guarantee that skb->len > dev_hard_header_len?
> > It is probably safer to check skb->len > dev->hard_header_len + dev->mtu
> > since
On Thu, Oct 5, 2017 at 6:59 AM, David Laight wrote:
> From: William Tu
>> Sent: 05 October 2017 01:14
>> Similarly to early patch for erspan_xmit(), the ARPHDR_ETHER device
>> is the length of the whole ether packet. So skb->len should subtract
>> the dev->hard_header_len.
>>
>> Fixes: 1a66a836da
From: William Tu
> Sent: 05 October 2017 01:14
> Similarly to early patch for erspan_xmit(), the ARPHDR_ETHER device
> is the length of the whole ether packet. So skb->len should subtract
> the dev->hard_header_len.
>
> Fixes: 1a66a836da63 ("gre: add collect_md mode to ERSPAN tunnel")
> Signed-of
Similarly to early patch for erspan_xmit(), the ARPHDR_ETHER device
is the length of the whole ether packet. So skb->len should subtract
the dev->hard_header_len.
Fixes: 1a66a836da63 ("gre: add collect_md mode to ERSPAN tunnel")
Signed-off-by: William Tu
Cc: Xin Long
---
net/ipv4/ip_gre.c | 2