netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Arcari <darcari@redhat.com>
To: Pavel Belous <Pavel.Belous@aquantia.com>,
	"David S . Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org, Simon Edelhaus <Simon.Edelhaus@aquantia.com>
Subject: Re: [PATCH net 4/5] net:ethernet:aquantia: Fix for LSO with IPv6.
Date: Wed, 22 Mar 2017 15:21:50 -0400	[thread overview]
Message-ID: <53b27be8-5f10-87cc-9a6a-0cbb9ac7c7f5@redhat.com> (raw)
In-Reply-To: <da72827dfe52c4dc96a1b5eda6d0f3d15da60646.1490202165.git.pavel.belous@aquantia.com>

Hi,

On 03/22/2017 01:06 PM, Pavel Belous wrote:
> From: Pavel Belous <pavel.belous@aquantia.com>
> 
> Fix Context Command bit: L3 type = "0" for IPv4, "1" for IPv6.
> 
> Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
> ---
>  drivers/net/ethernet/aquantia/atlantic/aq_nic.c           | 3 +++
>  drivers/net/ethernet/aquantia/atlantic/aq_ring.h          | 3 ++-
>  drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c | 3 +++
>  drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c | 3 +++
>  4 files changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_nic.c b/drivers/net/ethernet/aquantia/atlantic/aq_nic.c
> index 95f9841..293b261 100644
> --- a/drivers/net/ethernet/aquantia/atlantic/aq_nic.c
> +++ b/drivers/net/ethernet/aquantia/atlantic/aq_nic.c
> @@ -487,6 +487,9 @@ static unsigned int aq_nic_map_skb(struct aq_nic_s *self,
>  		dx_buff->mss = skb_shinfo(skb)->gso_size;
>  		dx_buff->is_txc = 1U;
>  
> +		dx_buff->is_ipv6 =
> +			(ip_hdr(skb)->version == 6) ? 1U : 0U;
> +
>  		dx = aq_ring_next_dx(ring, dx);
>  		dx_buff = &ring->buff_ring[dx];
>  		++ret;
> diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_ring.h b/drivers/net/ethernet/aquantia/atlantic/aq_ring.h
> index 2572546..eecd6d1 100644
> --- a/drivers/net/ethernet/aquantia/atlantic/aq_ring.h
> +++ b/drivers/net/ethernet/aquantia/atlantic/aq_ring.h
> @@ -58,7 +58,8 @@ struct __packed aq_ring_buff_s {
>  			u8 len_l2;
>  			u8 len_l3;
>  			u8 len_l4;
> -			u8 rsvd2;
> +			u8 is_ipv6:1;
> +			u8 rsvd2:7;
>  			u32 len_pkt;
>  		};
>  	};
> diff --git a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c
> index a2b746a..d62436e 100644
> --- a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c
> +++ b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c
> @@ -433,6 +433,9 @@ static int hw_atl_a0_hw_ring_tx_xmit(struct aq_hw_s *self,
>  				    buff->len_l3 +
>  				    buff->len_l2);
>  			is_gso = true;
> +
> +			if (buff->is_ipv6)
> +				txd->ctl |= HW_ATL_B0_TXD_CTL_CMD_IPV6;

I think this is a mistake.  I believe it should be HW_ATL_A0_TXD_CTL_CMD_IPV6.

AFAICT this file doesn't include hw_atl_b0_internal.h, so I don't believe this
will compile.

Thanks,

-DA

>  		} else {
>  			buff_pa_len = buff->len;
>  
> diff --git a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c
> index cab2931..69488c9 100644
> --- a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c
> +++ b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c
> @@ -471,6 +471,9 @@ static int hw_atl_b0_hw_ring_tx_xmit(struct aq_hw_s *self,
>  				    buff->len_l3 +
>  				    buff->len_l2);
>  			is_gso = true;
> +
> +			if (buff->is_ipv6)
> +				txd->ctl |= HW_ATL_B0_TXD_CTL_CMD_IPV6;
>  		} else {
>  			buff_pa_len = buff->len;
>  
> 

  reply	other threads:[~2017-03-22 19:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-22 17:06 [PATCH net 0/5] net:ethernet:aquantia: Misc fixes for atlantic driver Pavel Belous
2017-03-22 17:06 ` [PATCH net 1/5] net:ethernet:aquantia: Remove adapter re-opening when mtu changed Pavel Belous
2017-03-22 17:06 ` [PATCH net 2/5] net:ethernet:aquantia: Fix packet type detection (TCP/UDP) for IPv6 Pavel Belous
2017-03-22 17:06 ` [PATCH net 3/5] net:ethernet:aquantia: Missing spinlock initialization Pavel Belous
2017-03-22 17:06 ` [PATCH net 4/5] net:ethernet:aquantia: Fix for LSO with IPv6 Pavel Belous
2017-03-22 19:21   ` David Arcari [this message]
2017-03-22 20:33     ` Pavel Belous
2017-03-23 13:28   ` kbuild test robot
2017-03-22 17:06 ` [PATCH net 5/5] net:ethernet:aquantia: Reset is_gso flag when EOP reached Pavel Belous

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53b27be8-5f10-87cc-9a6a-0cbb9ac7c7f5@redhat.com \
    --to=darcari@redhat.com \
    --cc=Pavel.Belous@aquantia.com \
    --cc=Simon.Edelhaus@aquantia.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).