mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-23 02:43:03 +07:00
net:ethernet:aquantia: Fix for LSO with IPv6.
Fix Context Command bit: L3 type = "0" for IPv4, "1" for IPv6.
Fixes: bab6de8fd1
("net: ethernet: aquantia:
Atlantic A0 and B0 specific functions.")
Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
9f0dd8c322
commit
386aff88e3
@ -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;
|
||||
|
@ -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;
|
||||
};
|
||||
};
|
||||
|
@ -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_A0_TXD_CTL_CMD_IPV6;
|
||||
} else {
|
||||
buff_pa_len = buff->len;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user