Make sure the received IP header gets 32-bit aligned for short packets
in the mlx5en(4) driver. MFC after: 1 week Sponsored by: Mellanox Technologies
This commit is contained in:
parent
869dd4b498
commit
8508e4d730
@ -355,9 +355,11 @@ mlx5e_poll_rx_cq(struct mlx5e_rq *rq, int budget)
|
||||
rq->stats.wqe_err++;
|
||||
goto wq_ll_pop;
|
||||
}
|
||||
|
||||
if (MHLEN >= byte_cnt &&
|
||||
if ((MHLEN - MLX5E_NET_IP_ALIGN) >= byte_cnt &&
|
||||
(mb = m_gethdr(M_NOWAIT, MT_DATA)) != NULL) {
|
||||
/* get IP header aligned */
|
||||
mb->m_data += MLX5E_NET_IP_ALIGN;
|
||||
|
||||
bcopy(rq->mbuf[wqe_counter].data, mtod(mb, caddr_t),
|
||||
byte_cnt);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user