[dpdk-dev,1/3] nfp: clean tx descriptor flags
Checks
Commit Message
When LSO, not doing this can led to firmware disruption. It does
not show as error because TCP ends up sending data again later on.
Fixes: 9ba3d0ae2090 (\"net/nfp: add TSO support\")
Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
---
drivers/net/nfp/nfp_net.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
Comments
On 3/21/2017 10:43 AM, Alejandro Lucero wrote:
> When LSO, not doing this can led to firmware disruption. It does
> not show as error because TCP ends up sending data again later on.
>
> Fixes: 9ba3d0ae2090 (\"net/nfp: add TSO support\")
>
> Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Series applied to dpdk-next-net/master, thanks.
@@ -1660,16 +1660,22 @@ static void nfp_net_read_mac(struct nfp_net_hw *hw)
struct nfp_net_hw *hw = txq->hw;
if (!(hw->cap & NFP_NET_CFG_CTRL_LSO))
- return;
+ goto clean_txd;
ol_flags = mb->ol_flags;
if (!(ol_flags & PKT_TX_TCP_SEG))
- return;
+ goto clean_txd;
txd->l4_offset = mb->l2_len + mb->l3_len + mb->l4_len;
txd->lso = rte_cpu_to_le_16(mb->tso_segsz);
- txd->flags |= PCIE_DESC_TX_LSO;
+ txd->flags = PCIE_DESC_TX_LSO;
+ return;
+
+clean_txd:
+ txd->flags = 0;
+ txd->l4_offset = 0;
+ txd->lso = 0;
}
/* nfp_net_tx_cksum - Set TX CSUM offload flags in TX descriptor */