Skip to content

Commit

Permalink
net/hns3: fix processing Tx offload flags
Browse files Browse the repository at this point in the history
[ upstream commit a1d0caa ]

Currently, if the PKT_TX_TCP_SEG and PKT_TX_TCP_CKSUM offload flags set
in the same time, hns3 PMD can not process the descriptors correctly.

This patch fixes it by adding the processing of this situation.

Fixes: fb6eb90 ("net/hns3: fix Tx checksum with fixed header length")

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
  • Loading branch information
Chengchang Tang authored and steevenlee committed May 8, 2021
1 parent e29b92b commit a7bf833
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/hns3/hns3_rxtx.c
Original file line number Diff line number Diff line change
Expand Up @@ -3083,6 +3083,7 @@ hns3_parse_l4_cksum_params(struct rte_mbuf *m, uint32_t *type_cs_vlan_tso_len)
uint32_t tmp;
/* Enable L4 checksum offloads */
switch (ol_flags & (PKT_TX_L4_MASK | PKT_TX_TCP_SEG)) {
case PKT_TX_TCP_CKSUM | PKT_TX_TCP_SEG:
case PKT_TX_TCP_CKSUM:
case PKT_TX_TCP_SEG:
tmp = *type_cs_vlan_tso_len;
Expand Down

0 comments on commit a7bf833

Please sign in to comment.