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]
Message-ID: <71644e07-8dc1-3391-2701-d989906d38a3@gmail.com>
Date:   Fri, 1 Nov 2019 09:59:26 -0700
From:   Eric Dumazet <eric.dumazet@...il.com>
To:     Igor Russkikh <irusskikh@...vell.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Cc:     "David S . Miller" <davem@...emloft.net>
Subject: Re: [PATCH net-next 11/12] net: atlantic: implement UDP GSO offload



On 11/1/19 5:17 AM, Igor Russkikh wrote:
> atlantic hardware does support UDP hardware segmentation offload.
> This allows user to specify one large contiguous buffer with data
> which then will be split automagically into multiple UDP packets
> of specified size.


>  
> @@ -484,11 +485,19 @@ unsigned int aq_nic_map_skb(struct aq_nic_s *self, struct sk_buff *skb,
>  
>  	if (unlikely(skb_is_gso(skb))) {
>  		dx_buff->mss = skb_shinfo(skb)->gso_size;
> -		dx_buff->is_gso = 1U;
> +		if (ip_hdr(skb)->protocol == IPPROTO_TCP) {
> +			dx_buff->is_gso_tcp = 1U;
> +			dx_buff->len_l4 = tcp_hdrlen(skb);
> +		} else if (ip_hdr(skb)->protocol == IPPROTO_UDP) {
> +			dx_buff->is_gso_udp = 1U;
> +			dx_buff->len_l4 = sizeof(struct udphdr);
> +			/* UDP GSO Hardware does not replace packet length. */
> +			udp_hdr(skb)->len = htons(dx_buff->mss +
> +						  dx_buff->len_l4);
> +		}

Have you tested IPv6 ?


>  		dx_buff->len_pkt = skb->len;
>  		dx_buff->len_l2 = ETH_HLEN;
>  		dx_buff->len_l3 = ip_hdrlen(skb);
> -		dx_buff->len_l4 = tcp_hdrlen(skb);
>  		dx_buff->eop_index = 0xffffU;
>  		dx_buff->is_ipv6 =
>  			(ip_hdr(skb)->version == 6) ? 1U : 0U;

I am asking because you seem to test IPv6 here, so blindly using ip_hdr(skb)->protocol
few lines above is weird.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ