[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <53b27be8-5f10-87cc-9a6a-0cbb9ac7c7f5@redhat.com>
Date: Wed, 22 Mar 2017 15:21:50 -0400
From: David Arcari <darcari@...hat.com>
To: Pavel Belous <Pavel.Belous@...antia.com>,
"David S . Miller" <davem@...emloft.net>
Cc: netdev@...r.kernel.org,
Simon Edelhaus <Simon.Edelhaus@...antia.com>
Subject: Re: [PATCH net 4/5] net:ethernet:aquantia: Fix for LSO with IPv6.
Hi,
On 03/22/2017 01:06 PM, Pavel Belous wrote:
> From: Pavel Belous <pavel.belous@...antia.com>
>
> Fix Context Command bit: L3 type = "0" for IPv4, "1" for IPv6.
>
> Signed-off-by: Pavel Belous <pavel.belous@...antia.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;
>
>
Powered by blists - more mailing lists