Re: [net PATCH 0/2] Don't use lco_csum to compute IPv4 checksum

2017-01-11 Thread Stephen Rothwell
Hi Dave,

On Tue, 29 Nov 2016 20:07:08 +1100 Stephen Rothwell  
wrote:
>
> Hi Jeff,
> 
> On Tue, 29 Nov 2016 10:43:04 +1100 Stephen Rothwell  
> wrote:
> >
> > On Mon, 28 Nov 2016 14:26:02 -0800 Jeff Kirsher 
> >  wrote:  
> > >
> > > On Mon, 2016-11-28 at 10:42 -0500, Alexander Duyck wrote:
> > > > When I implemented the GSO partial support in the Intel drivers I was
> > > > using
> > > > lco_csum to compute the checksum that we needed to plug into the IPv4
> > > > checksum field in order to cancel out the data that was not a part of 
> > > > the
> > > > IPv4 header.  However this didn't take into account that the transport
> > > > offset might be pointing to the inner transport header.
> > > > 
> > > > Instead of using lco_csum I have just coded around it so that we can use
> > > > the outer IP header plus the IP header length to determine where we need
> > > > to
> > > > start our checksum and then just call csum_partial ourselves.
> > > > 
> > > > This should fix the SIT issue reported on igb interfaces as well as
> > > > simliar
> > > > issues that would pop up on other Intel NICs.
> > > > 
> > > > ---
> > > > 
> > > > Alexander Duyck (2):
> > > >   igb/igbvf: Don't use lco_csum to compute IPv4 checksum
> > > >   ixgbe/ixgbevf: Don't use lco_csum to compute IPv4 checksum  
> > > 
> > > Stephen, I have applied Alex's patches to my net-queue tree.  Can you
> > > confirm they resolve the bug seen?
> > 
> > Its a bit tricky because the origin problem only happens on my
> > production server (ozlabs.org), but I will see if I can manage to just
> > remove and reload the driver ...  though, the server is running a 4.7.8
> > kernel and I am wondering how well these patches will apply?  
> 
> We have a winner!  This fixes my problem, so I can run at full speed
> with gso and tso enabled in the sit interface and tx-gso-partial
> enabled on the underlying ethernet.
> 
> Thanks to everyone for diagnosis and solution.
> 
> It would be nice if this fix went into the stable kernels as well so it
> will turn up in the distro kernels eventually.

It looks like these 2 commits:

516165a1e2f2igb/igbvf: Don't use lco_csum to compute IPv4 checksum
c54cdc316dbdixgbe/ixgbevf: Don't use lco_csum to compute IPv4 checksum

have not been sent to stable.  They fix a bug introduced in v4.7-rc1
and so need to go into 4.7 and 4.8 stable trees.

-- 
Cheers,
Stephen Rothwell


Re: [net PATCH 0/2] Don't use lco_csum to compute IPv4 checksum

2016-12-01 Thread David Miller
From: Jeff Kirsher 
Date: Wed, 30 Nov 2016 13:15:22 -0800

> On Wed, 2016-11-30 at 09:47 -0500, David Miller wrote:
>> From: Alexander Duyck 
>> Date: Mon, 28 Nov 2016 10:42:18 -0500
>> 
>> > When I implemented the GSO partial support in the Intel drivers I was
>> using
>> > lco_csum to compute the checksum that we needed to plug into the IPv4
>> > checksum field in order to cancel out the data that was not a part of
>> the
>> > IPv4 header.  However this didn't take into account that the transport
>> > offset might be pointing to the inner transport header.
>> > 
>> > Instead of using lco_csum I have just coded around it so that we can
>> use
>> > the outer IP header plus the IP header length to determine where we
>> need to
>> > start our checksum and then just call csum_partial ourselves.
>> > 
>> > This should fix the SIT issue reported on igb interfaces as well as
>> simliar
>> > issues that would pop up on other Intel NICs.
>> 
>> Jeff, are you going to send me a pull request with this stuff or would
>> you be OK with my applying these directly to 'net'?
> 
> Go ahead and apply those to your net tree, I do not want to hold this up.

Ok, done, thanks Jeff.


Re: [net PATCH 0/2] Don't use lco_csum to compute IPv4 checksum

2016-11-30 Thread Jeff Kirsher
On Wed, 2016-11-30 at 09:47 -0500, David Miller wrote:
> From: Alexander Duyck 
> Date: Mon, 28 Nov 2016 10:42:18 -0500
> 
> > When I implemented the GSO partial support in the Intel drivers I was
> using
> > lco_csum to compute the checksum that we needed to plug into the IPv4
> > checksum field in order to cancel out the data that was not a part of
> the
> > IPv4 header.  However this didn't take into account that the transport
> > offset might be pointing to the inner transport header.
> > 
> > Instead of using lco_csum I have just coded around it so that we can
> use
> > the outer IP header plus the IP header length to determine where we
> need to
> > start our checksum and then just call csum_partial ourselves.
> > 
> > This should fix the SIT issue reported on igb interfaces as well as
> simliar
> > issues that would pop up on other Intel NICs.
> 
> Jeff, are you going to send me a pull request with this stuff or would
> you be OK with my applying these directly to 'net'?

Go ahead and apply those to your net tree, I do not want to hold this up.

signature.asc
Description: This is a digitally signed message part


Re: [net PATCH 0/2] Don't use lco_csum to compute IPv4 checksum

2016-11-30 Thread David Miller
From: Alexander Duyck 
Date: Mon, 28 Nov 2016 10:42:18 -0500

> When I implemented the GSO partial support in the Intel drivers I was using
> lco_csum to compute the checksum that we needed to plug into the IPv4
> checksum field in order to cancel out the data that was not a part of the
> IPv4 header.  However this didn't take into account that the transport
> offset might be pointing to the inner transport header.
> 
> Instead of using lco_csum I have just coded around it so that we can use
> the outer IP header plus the IP header length to determine where we need to
> start our checksum and then just call csum_partial ourselves.
> 
> This should fix the SIT issue reported on igb interfaces as well as simliar
> issues that would pop up on other Intel NICs.

Jeff, are you going to send me a pull request with this stuff or would
you be OK with my applying these directly to 'net'?

Thanks.


Re: [net PATCH 0/2] Don't use lco_csum to compute IPv4 checksum

2016-11-29 Thread Stephen Rothwell
Hi Jeff,

On Tue, 29 Nov 2016 10:43:04 +1100 Stephen Rothwell  
wrote:
>
> On Mon, 28 Nov 2016 14:26:02 -0800 Jeff Kirsher  
> wrote:
> >
> > On Mon, 2016-11-28 at 10:42 -0500, Alexander Duyck wrote:  
> > > When I implemented the GSO partial support in the Intel drivers I was
> > > using
> > > lco_csum to compute the checksum that we needed to plug into the IPv4
> > > checksum field in order to cancel out the data that was not a part of the
> > > IPv4 header.  However this didn't take into account that the transport
> > > offset might be pointing to the inner transport header.
> > > 
> > > Instead of using lco_csum I have just coded around it so that we can use
> > > the outer IP header plus the IP header length to determine where we need
> > > to
> > > start our checksum and then just call csum_partial ourselves.
> > > 
> > > This should fix the SIT issue reported on igb interfaces as well as
> > > simliar
> > > issues that would pop up on other Intel NICs.
> > > 
> > > ---
> > > 
> > > Alexander Duyck (2):
> > >   igb/igbvf: Don't use lco_csum to compute IPv4 checksum
> > >   ixgbe/ixgbevf: Don't use lco_csum to compute IPv4 checksum
> > 
> > Stephen, I have applied Alex's patches to my net-queue tree.  Can you
> > confirm they resolve the bug seen?  
> 
> Its a bit tricky because the origin problem only happens on my
> production server (ozlabs.org), but I will see if I can manage to just
> remove and reload the driver ...  though, the server is running a 4.7.8
> kernel and I am wondering how well these patches will apply?

We have a winner!  This fixes my problem, so I can run at full speed
with gso and tso enabled in the sit interface and tx-gso-partial
enabled on the underlying ethernet.

Thanks to everyone for diagnosis and solution.

It would be nice if this fix went into the stable kernels as well so it
will turn up in the distro kernels eventually.
-- 
Cheers,
Stephen Rothwell


Re: [net PATCH 0/2] Don't use lco_csum to compute IPv4 checksum

2016-11-28 Thread Stephen Rothwell
Hi Jeff,

On Mon, 28 Nov 2016 14:26:02 -0800 Jeff Kirsher  
wrote:
>
> On Mon, 2016-11-28 at 10:42 -0500, Alexander Duyck wrote:
> > When I implemented the GSO partial support in the Intel drivers I was
> > using
> > lco_csum to compute the checksum that we needed to plug into the IPv4
> > checksum field in order to cancel out the data that was not a part of the
> > IPv4 header.  However this didn't take into account that the transport
> > offset might be pointing to the inner transport header.
> > 
> > Instead of using lco_csum I have just coded around it so that we can use
> > the outer IP header plus the IP header length to determine where we need
> > to
> > start our checksum and then just call csum_partial ourselves.
> > 
> > This should fix the SIT issue reported on igb interfaces as well as
> > simliar
> > issues that would pop up on other Intel NICs.
> > 
> > ---
> > 
> > Alexander Duyck (2):
> >   igb/igbvf: Don't use lco_csum to compute IPv4 checksum
> >   ixgbe/ixgbevf: Don't use lco_csum to compute IPv4 checksum  
> 
> Stephen, I have applied Alex's patches to my net-queue tree.  Can you
> confirm they resolve the bug seen?

Its a bit tricky because the origin problem only happens on my
production server (ozlabs.org), but I will see if I can manage to just
remove and reload the driver ...  though, the server is running a 4.7.8
kernel and I am wondering how well these patches will apply?

-- 
Cheers,
Stephen Rothwell


Re: [net PATCH 0/2] Don't use lco_csum to compute IPv4 checksum

2016-11-28 Thread Jeff Kirsher
On Mon, 2016-11-28 at 10:42 -0500, Alexander Duyck wrote:
> When I implemented the GSO partial support in the Intel drivers I was
> using
> lco_csum to compute the checksum that we needed to plug into the IPv4
> checksum field in order to cancel out the data that was not a part of the
> IPv4 header.  However this didn't take into account that the transport
> offset might be pointing to the inner transport header.
> 
> Instead of using lco_csum I have just coded around it so that we can use
> the outer IP header plus the IP header length to determine where we need
> to
> start our checksum and then just call csum_partial ourselves.
> 
> This should fix the SIT issue reported on igb interfaces as well as
> simliar
> issues that would pop up on other Intel NICs.
> 
> ---
> 
> Alexander Duyck (2):
>   igb/igbvf: Don't use lco_csum to compute IPv4 checksum
>   ixgbe/ixgbevf: Don't use lco_csum to compute IPv4 checksum

Stephen, I have applied Alex's patches to my net-queue tree.  Can you
confirm they resolve the bug seen?

signature.asc
Description: This is a digitally signed message part