Avoid trashing IP fragments:
- Only enable UDP/TCP hardware checksums if CSUM_UDP or CSUM_TCP is set. - Only enable IP hardware checksums if CSUM_IP is set. PR: kern/180430 Submitted by: Meny Yossefi <menyy@mellanox.com> MFC after: 1 week
This commit is contained in:
parent
b4c061ba11
commit
f6535606ea
@ -780,8 +780,12 @@ retry:
|
||||
tx_desc->ctrl.srcrb_flags = cpu_to_be32(MLX4_WQE_CTRL_CQ_UPDATE |
|
||||
MLX4_WQE_CTRL_SOLICITED);
|
||||
if (mb->m_pkthdr.csum_flags & (CSUM_IP|CSUM_TCP|CSUM_UDP)) {
|
||||
tx_desc->ctrl.srcrb_flags |= cpu_to_be32(MLX4_WQE_CTRL_IP_CSUM |
|
||||
MLX4_WQE_CTRL_TCP_UDP_CSUM);
|
||||
if (mb->m_pkthdr.csum_flags & CSUM_IP)
|
||||
tx_desc->ctrl.srcrb_flags |=
|
||||
cpu_to_be32(MLX4_WQE_CTRL_IP_CSUM);
|
||||
if (mb->m_pkthdr.csum_flags & (CSUM_TCP|CSUM_UDP))
|
||||
tx_desc->ctrl.srcrb_flags |=
|
||||
cpu_to_be32(MLX4_WQE_CTRL_TCP_UDP_CSUM);
|
||||
priv->port_stats.tx_chksum_offload++;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user