netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net 0/5] net:ethernet:aquantia: Misc fixes for atlantic driver.
@ 2017-03-22 17:06 Pavel Belous
  2017-03-22 17:06 ` [PATCH net 1/5] net:ethernet:aquantia: Remove adapter re-opening when mtu changed Pavel Belous
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Pavel Belous @ 2017-03-22 17:06 UTC (permalink / raw)
  To: David S . Miller; +Cc: netdev, Simon Edelhaus, David Arcari, Pavel Belous

From: Pavel Belous <pavel.belous@aquantia.com>

The following patchset containg several fixes for aQuantia AQtion driver
for net tree: A couple fixes for IPv6 and other fixes.

Pavel Belous (5):
  net:ethernet:aquantia: Remove adapter re-opening when mtu changed.
  net:ethernet:aquantia: Fix packet type detection (TCP/UDP) for IPv6.
  net:ethernet:aquantia: Missing spinlock initialization.
  net:ethernet:aquantia: Fix for LSO with IPv6.
  net:ethernet:aquantia: Reset is_gso flag when EOP reached.

 drivers/net/ethernet/aquantia/atlantic/aq_main.c   |  5 -----
 drivers/net/ethernet/aquantia/atlantic/aq_nic.c    | 26 +++++++++++++++++-----
 drivers/net/ethernet/aquantia/atlantic/aq_ring.c   |  1 +
 drivers/net/ethernet/aquantia/atlantic/aq_ring.h   |  3 ++-
 .../ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c  |  4 ++++
 .../ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c  |  4 ++++
 6 files changed, 31 insertions(+), 12 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH net 1/5] net:ethernet:aquantia: Remove adapter re-opening when mtu changed.
  2017-03-22 17:06 [PATCH net 0/5] net:ethernet:aquantia: Misc fixes for atlantic driver Pavel Belous
@ 2017-03-22 17:06 ` Pavel Belous
  2017-03-22 17:06 ` [PATCH net 2/5] net:ethernet:aquantia: Fix packet type detection (TCP/UDP) for IPv6 Pavel Belous
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Pavel Belous @ 2017-03-22 17:06 UTC (permalink / raw)
  To: David S . Miller; +Cc: netdev, Simon Edelhaus, David Arcari, Pavel Belous

From: Pavel Belous <pavel.belous@aquantia.com>

Closing/opening the adapter is not needed at all.
The new mtu settings take effect immediately.

Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
---
 drivers/net/ethernet/aquantia/atlantic/aq_main.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_main.c b/drivers/net/ethernet/aquantia/atlantic/aq_main.c
index d05fbfd..5d6c40d 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_main.c
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_main.c
@@ -100,11 +100,6 @@ static int aq_ndev_change_mtu(struct net_device *ndev, int new_mtu)
 		goto err_exit;
 	ndev->mtu = new_mtu;
 
-	if (netif_running(ndev)) {
-		aq_ndev_close(ndev);
-		aq_ndev_open(ndev);
-	}
-
 err_exit:
 	return err;
 }
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH net 2/5] net:ethernet:aquantia: Fix packet type detection (TCP/UDP) for IPv6.
  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 ` Pavel Belous
  2017-03-22 17:06 ` [PATCH net 3/5] net:ethernet:aquantia: Missing spinlock initialization Pavel Belous
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Pavel Belous @ 2017-03-22 17:06 UTC (permalink / raw)
  To: David S . Miller; +Cc: netdev, Simon Edelhaus, David Arcari, Pavel Belous

From: Pavel Belous <pavel.belous@aquantia.com>

In order for the checksum offloads to work correctly we need to set the
packet type bit (TCP/UDP) in the TX context buffer.

Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
---
 drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 23 +++++++++++++++++------
 1 file changed, 17 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_nic.c b/drivers/net/ethernet/aquantia/atlantic/aq_nic.c
index ee78444..95f9841 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_nic.c
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_nic.c
@@ -508,12 +508,23 @@ static unsigned int aq_nic_map_skb(struct aq_nic_s *self,
 	++ret;
 
 	if (skb->ip_summed == CHECKSUM_PARTIAL) {
-		dx_buff->is_ip_cso = (htons(ETH_P_IP) == skb->protocol) ?
-			1U : 0U;
-		dx_buff->is_tcp_cso =
-			(ip_hdr(skb)->protocol == IPPROTO_TCP) ? 1U : 0U;
-		dx_buff->is_udp_cso =
-			(ip_hdr(skb)->protocol == IPPROTO_UDP) ? 1U : 0U;
+		dx_buff->is_ip_cso = (htons(ETH_P_IP) == skb->protocol) ? 1U : 0U;
+
+		if (ip_hdr(skb)->version == 4) {
+			dx_buff->is_tcp_cso =
+				(ip_hdr(skb)->protocol == IPPROTO_TCP) ?
+					1U : 0U;
+			dx_buff->is_udp_cso =
+				(ip_hdr(skb)->protocol == IPPROTO_UDP) ?
+					1U : 0U;
+		} else if (ip_hdr(skb)->version == 6) {
+			dx_buff->is_tcp_cso =
+				(ipv6_hdr(skb)->nexthdr == NEXTHDR_TCP) ?
+					1U : 0U;
+			dx_buff->is_udp_cso =
+				(ipv6_hdr(skb)->nexthdr == NEXTHDR_UDP) ?
+					1U : 0U;
+		}
 	}
 
 	for (; nr_frags--; ++frag_count) {
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH net 3/5] net:ethernet:aquantia: Missing spinlock initialization.
  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 ` Pavel Belous
  2017-03-22 17:06 ` [PATCH net 4/5] net:ethernet:aquantia: Fix for LSO with IPv6 Pavel Belous
  2017-03-22 17:06 ` [PATCH net 5/5] net:ethernet:aquantia: Reset is_gso flag when EOP reached Pavel Belous
  4 siblings, 0 replies; 9+ messages in thread
From: Pavel Belous @ 2017-03-22 17:06 UTC (permalink / raw)
  To: David S . Miller; +Cc: netdev, Simon Edelhaus, David Arcari, Pavel Belous

From: Pavel Belous <pavel.belous@aquantia.com>

Fix for missing initialization aq_ring header.lock spinlock.

Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
---
 drivers/net/ethernet/aquantia/atlantic/aq_ring.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_ring.c b/drivers/net/ethernet/aquantia/atlantic/aq_ring.c
index 0358e607..3a8a4aa 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_ring.c
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_ring.c
@@ -101,6 +101,7 @@ int aq_ring_init(struct aq_ring_s *self)
 	self->hw_head = 0;
 	self->sw_head = 0;
 	self->sw_tail = 0;
+	spin_lock_init(&self->header.lock);
 	return 0;
 }
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH net 4/5] net:ethernet:aquantia: Fix for LSO with IPv6.
  2017-03-22 17:06 [PATCH net 0/5] net:ethernet:aquantia: Misc fixes for atlantic driver Pavel Belous
                   ` (2 preceding siblings ...)
  2017-03-22 17:06 ` [PATCH net 3/5] net:ethernet:aquantia: Missing spinlock initialization Pavel Belous
@ 2017-03-22 17:06 ` Pavel Belous
  2017-03-22 19:21   ` David Arcari
  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
  4 siblings, 2 replies; 9+ messages in thread
From: Pavel Belous @ 2017-03-22 17:06 UTC (permalink / raw)
  To: David S . Miller; +Cc: netdev, Simon Edelhaus, David Arcari, Pavel Belous

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;
 		} 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;
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH net 5/5] net:ethernet:aquantia: Reset is_gso flag when EOP reached.
  2017-03-22 17:06 [PATCH net 0/5] net:ethernet:aquantia: Misc fixes for atlantic driver Pavel Belous
                   ` (3 preceding siblings ...)
  2017-03-22 17:06 ` [PATCH net 4/5] net:ethernet:aquantia: Fix for LSO with IPv6 Pavel Belous
@ 2017-03-22 17:06 ` Pavel Belous
  4 siblings, 0 replies; 9+ messages in thread
From: Pavel Belous @ 2017-03-22 17:06 UTC (permalink / raw)
  To: David S . Miller; +Cc: netdev, Simon Edelhaus, David Arcari, Pavel Belous

From: Pavel Belous <pavel.belous@aquantia.com>

We need to reset is_gso flag when EOP reached (entire LSO packet processed).

Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
---
 drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c | 1 +
 drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c | 1 +
 2 files changed, 2 insertions(+)

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 d62436e..9db2efa 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
@@ -461,6 +461,7 @@ static int hw_atl_a0_hw_ring_tx_xmit(struct aq_hw_s *self,
 			if (unlikely(buff->is_eop)) {
 				txd->ctl |= HW_ATL_A0_TXD_CTL_EOP;
 				txd->ctl |= HW_ATL_A0_TXD_CTL_CMD_WB;
+				is_gso = false;
 			}
 		}
 
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 69488c9..4215070 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
@@ -499,6 +499,7 @@ static int hw_atl_b0_hw_ring_tx_xmit(struct aq_hw_s *self,
 			if (unlikely(buff->is_eop)) {
 				txd->ctl |= HW_ATL_B0_TXD_CTL_EOP;
 				txd->ctl |= HW_ATL_B0_TXD_CTL_CMD_WB;
+				is_gso = false;
 			}
 		}
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH net 4/5] net:ethernet:aquantia: Fix for LSO with IPv6.
  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
  2017-03-22 20:33     ` Pavel Belous
  2017-03-23 13:28   ` kbuild test robot
  1 sibling, 1 reply; 9+ messages in thread
From: David Arcari @ 2017-03-22 19:21 UTC (permalink / raw)
  To: Pavel Belous, David S . Miller; +Cc: netdev, Simon Edelhaus

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;
>  
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH net 4/5] net:ethernet:aquantia: Fix for LSO with IPv6.
  2017-03-22 19:21   ` David Arcari
@ 2017-03-22 20:33     ` Pavel Belous
  0 siblings, 0 replies; 9+ messages in thread
From: Pavel Belous @ 2017-03-22 20:33 UTC (permalink / raw)
  To: David Arcari, David S . Miller; +Cc: netdev, Simon Edelhaus



On 03/22/2017 10:21 PM, David Arcari wrote:
> 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;
>>
>>
>

Thank you, David.
I will fix this in patchset v2.

Regards,
Pavel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH net 4/5] net:ethernet:aquantia: Fix for LSO with IPv6.
  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
@ 2017-03-23 13:28   ` kbuild test robot
  1 sibling, 0 replies; 9+ messages in thread
From: kbuild test robot @ 2017-03-23 13:28 UTC (permalink / raw)
  To: Pavel Belous
  Cc: kbuild-all, David S . Miller, netdev, Simon Edelhaus,
	David Arcari, Pavel Belous

[-- Attachment #1: Type: text/plain, Size: 1441 bytes --]

Hi Pavel,

[auto build test ERROR on net/master]

url:    https://github.com/0day-ci/linux/commits/Pavel-Belous/net-ethernet-aquantia-Misc-fixes-for-atlantic-driver/20170323-191314
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c: In function 'hw_atl_a0_hw_ring_tx_xmit':
>> drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c:438:17: error: 'HW_ATL_B0_TXD_CTL_CMD_IPV6' undeclared (first use in this function)
        txd->ctl |= HW_ATL_B0_TXD_CTL_CMD_IPV6;
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c:438:17: note: each undeclared identifier is reported only once for each function it appears in

vim +/HW_ATL_B0_TXD_CTL_CMD_IPV6 +438 drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c

   432				pkt_len -= (buff->len_l4 +
   433					    buff->len_l3 +
   434					    buff->len_l2);
   435				is_gso = true;
   436	
   437				if (buff->is_ipv6)
 > 438					txd->ctl |= HW_ATL_B0_TXD_CTL_CMD_IPV6;
   439			} else {
   440				buff_pa_len = buff->len;
   441	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 58857 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-03-23 13:28 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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).