Commit e53fc9fa authored by Edwin Peer's avatar Edwin Peer Committed by David S. Miller

nfp: rename l4_offset in struct nfp_net_tx_desc to lso_hdrlen

The l4_offset field referred to by NFD is confusingly named. It is not the
offset of the L4 transport header, but rather the L4 payload.

The LSO2 capability supported by alternative device firmware requires
the actual L4 offset, thus the rename seems prudent.
Signed-off-by: default avatarEdwin Peer <edwin.peer@netronome.com>
Reviewed-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: default avatarSimon Horman <simon.horman@netronome.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 05eb9e53
...@@ -153,7 +153,7 @@ struct nfp_net_tx_desc { ...@@ -153,7 +153,7 @@ struct nfp_net_tx_desc {
__le32 dma_addr_lo; /* Low 32bit of host buf addr */ __le32 dma_addr_lo; /* Low 32bit of host buf addr */
__le16 mss; /* MSS to be used for LSO */ __le16 mss; /* MSS to be used for LSO */
u8 l4_offset; /* LSO, where the L4 data starts */ u8 lso_hdrlen; /* LSO, TCP payload offset */
u8 flags; /* TX Flags, see @PCIE_DESC_TX_* */ u8 flags; /* TX Flags, see @PCIE_DESC_TX_* */
__le16 vlan; /* VLAN tag to add if indicated */ __le16 vlan; /* VLAN tag to add if indicated */
......
...@@ -677,7 +677,7 @@ static void nfp_net_tx_tso(struct nfp_net_r_vector *r_vec, ...@@ -677,7 +677,7 @@ static void nfp_net_tx_tso(struct nfp_net_r_vector *r_vec,
txbuf->real_len += hdrlen * (txbuf->pkt_cnt - 1); txbuf->real_len += hdrlen * (txbuf->pkt_cnt - 1);
mss = skb_shinfo(skb)->gso_size & PCIE_DESC_TX_MSS_MASK; mss = skb_shinfo(skb)->gso_size & PCIE_DESC_TX_MSS_MASK;
txd->l4_offset = hdrlen; txd->lso_hdrlen = hdrlen;
txd->mss = cpu_to_le16(mss); txd->mss = cpu_to_le16(mss);
txd->flags |= PCIE_DESC_TX_LSO; txd->flags |= PCIE_DESC_TX_LSO;
...@@ -823,7 +823,7 @@ static int nfp_net_tx(struct sk_buff *skb, struct net_device *netdev) ...@@ -823,7 +823,7 @@ static int nfp_net_tx(struct sk_buff *skb, struct net_device *netdev)
txd->flags = 0; txd->flags = 0;
txd->mss = 0; txd->mss = 0;
txd->l4_offset = 0; txd->lso_hdrlen = 0;
nfp_net_tx_tso(r_vec, txbuf, txd, skb); nfp_net_tx_tso(r_vec, txbuf, txd, skb);
...@@ -1515,7 +1515,7 @@ nfp_net_tx_xdp_buf(struct nfp_net_dp *dp, struct nfp_net_rx_ring *rx_ring, ...@@ -1515,7 +1515,7 @@ nfp_net_tx_xdp_buf(struct nfp_net_dp *dp, struct nfp_net_rx_ring *rx_ring,
txd->flags = 0; txd->flags = 0;
txd->mss = 0; txd->mss = 0;
txd->l4_offset = 0; txd->lso_hdrlen = 0;
tx_ring->wr_p++; tx_ring->wr_p++;
tx_ring->wr_ptr_add++; tx_ring->wr_ptr_add++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment