Commit 386aff88 authored by Pavel Belous's avatar Pavel Belous Committed by David S. Miller

net:ethernet:aquantia: Fix for LSO with IPv6.

Fix Context Command bit: L3 type = "0" for IPv4, "1" for IPv6.

Fixes: bab6de8f ("net: ethernet: aquantia:
 Atlantic A0 and B0 specific functions.")
Signed-off-by: default avatarPavel Belous <pavel.belous@aquantia.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9f0dd8c3
...@@ -487,6 +487,9 @@ static unsigned int aq_nic_map_skb(struct aq_nic_s *self, ...@@ -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->mss = skb_shinfo(skb)->gso_size;
dx_buff->is_txc = 1U; dx_buff->is_txc = 1U;
dx_buff->is_ipv6 =
(ip_hdr(skb)->version == 6) ? 1U : 0U;
dx = aq_ring_next_dx(ring, dx); dx = aq_ring_next_dx(ring, dx);
dx_buff = &ring->buff_ring[dx]; dx_buff = &ring->buff_ring[dx];
++ret; ++ret;
......
...@@ -58,7 +58,8 @@ struct __packed aq_ring_buff_s { ...@@ -58,7 +58,8 @@ struct __packed aq_ring_buff_s {
u8 len_l2; u8 len_l2;
u8 len_l3; u8 len_l3;
u8 len_l4; u8 len_l4;
u8 rsvd2; u8 is_ipv6:1;
u8 rsvd2:7;
u32 len_pkt; u32 len_pkt;
}; };
}; };
......
...@@ -433,6 +433,9 @@ static int hw_atl_a0_hw_ring_tx_xmit(struct aq_hw_s *self, ...@@ -433,6 +433,9 @@ static int hw_atl_a0_hw_ring_tx_xmit(struct aq_hw_s *self,
buff->len_l3 + buff->len_l3 +
buff->len_l2); buff->len_l2);
is_gso = true; is_gso = true;
if (buff->is_ipv6)
txd->ctl |= HW_ATL_A0_TXD_CTL_CMD_IPV6;
} else { } else {
buff_pa_len = buff->len; buff_pa_len = buff->len;
......
...@@ -471,6 +471,9 @@ static int hw_atl_b0_hw_ring_tx_xmit(struct aq_hw_s *self, ...@@ -471,6 +471,9 @@ static int hw_atl_b0_hw_ring_tx_xmit(struct aq_hw_s *self,
buff->len_l3 + buff->len_l3 +
buff->len_l2); buff->len_l2);
is_gso = true; is_gso = true;
if (buff->is_ipv6)
txd->ctl |= HW_ATL_B0_TXD_CTL_CMD_IPV6;
} else { } else {
buff_pa_len = buff->len; buff_pa_len = buff->len;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment