mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
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
0b54fe540c
commit
ba90c51af3
1 changed files with 6 additions and 2 deletions
|
|
@ -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…
Reference in a new issue