Skip to content

Commit

Permalink
net/bnxt: fix resetting mbuf data offset
Browse files Browse the repository at this point in the history
[ upstream commit 3cefa72 ]

Reset mbuf->data_off before handing the Rx packet to the application.
We were not doing this in the TPA path. It can cause applications
using this field for post processing to work incorrectly.

Fixes: 0958d8b ("net/bnxt: support LRO")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
  • Loading branch information
ajitkhaparde authored and bluca committed Nov 9, 2020
1 parent d800f1a commit d9d1227
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/bnxt/bnxt_rxr.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ static void bnxt_tpa_start(struct bnxt_rx_queue *rxq,
tpa_info->mbuf = mbuf;
tpa_info->len = rte_le_to_cpu_32(tpa_start->len);

mbuf->data_off = RTE_PKTMBUF_HEADROOM;
mbuf->nb_segs = 1;
mbuf->next = NULL;
mbuf->pkt_len = rte_le_to_cpu_32(tpa_start->len);
Expand Down

0 comments on commit d9d1227

Please sign in to comment.