lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 9 Oct 2019 17:54:19 -0700
From:   Josh Hunt <johunt@...mai.com>
To:     "Samudrala, Sridhar" <sridhar.samudrala@...el.com>,
        netdev@...r.kernel.org, willemb@...gle.com,
        intel-wired-lan@...ts.osuosl.org
Cc:     Alexander Duyck <alexander.h.duyck@...el.com>
Subject: Re: [PATCH 3/3] i40e: Add UDP segmentation offload support

On 10/9/19 5:39 PM, Samudrala, Sridhar wrote:
> 
> 
> On 10/9/2019 3:06 PM, Josh Hunt wrote:
>> Based on a series from Alexander Duyck this change adds UDP segmentation
>> offload support to the i40e driver.
>>
>> CC: Alexander Duyck <alexander.h.duyck@...el.com>
>> CC: Willem de Bruijn <willemb@...gle.com>
>> Signed-off-by: Josh Hunt <johunt@...mai.com>
>> ---
>>   drivers/net/ethernet/intel/i40e/i40e_main.c |  1 +
>>   drivers/net/ethernet/intel/i40e/i40e_txrx.c | 12 +++++++++---
>>   2 files changed, 10 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c 
>> b/drivers/net/ethernet/intel/i40e/i40e_main.c
>> index 6031223eafab..56f8c52cbba1 100644
>> --- a/drivers/net/ethernet/intel/i40e/i40e_main.c
>> +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
>> @@ -12911,6 +12911,7 @@ static int i40e_config_netdev(struct i40e_vsi 
>> *vsi)
>>                 NETIF_F_GSO_IPXIP6        |
>>                 NETIF_F_GSO_UDP_TUNNEL    |
>>                 NETIF_F_GSO_UDP_TUNNEL_CSUM    |
>> +              NETIF_F_GSO_UDP_L4        |
>>                 NETIF_F_SCTP_CRC        |
>>                 NETIF_F_RXHASH        |
>>                 NETIF_F_RXCSUM        |
>> diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c 
>> b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
>> index e3f29dc8b290..0b32f04a6255 100644
>> --- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
>> +++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
>> @@ -2960,10 +2960,16 @@ static int i40e_tso(struct i40e_tx_buffer 
>> *first, u8 *hdr_len,
>>       /* remove payload length from inner checksum */
>>       paylen = skb->len - l4_offset;
>> -    csum_replace_by_diff(&l4.tcp->check, (__force __wsum)htonl(paylen));
>> -    /* compute length of segmentation header */
>> -    *hdr_len = (l4.tcp->doff * 4) + l4_offset;
>> +    if (skb->csum_offset == offsetof(struct tcphdr, check)) {
> 
> Isn't it more relevant to check for gso_type rather than base this on 
> the csum_offset?
Thanks Sridhar for the review. Yeah I think you're right. I will change 
this on all 3 patches.

Josh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ