OSDN Git Service

net: enetc: add a dedicated is_eof bit in the TX software BD
authorVladimir Oltean <vladimir.oltean@nxp.com>
Wed, 31 Mar 2021 20:08:51 +0000 (23:08 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 31 Mar 2021 21:57:44 +0000 (14:57 -0700)
commitd504498d2eb3bfcbef4ddf3f51eb9f1391c8149f
tree1596ce5b22975867d5825f75161da9f1e122d8c6
parenta800abd3ecb9acc55821f7ac9bba6c956b36a595
net: enetc: add a dedicated is_eof bit in the TX software BD

In the transmit path, if we have a scatter/gather frame, it is put into
multiple software buffer descriptors, the last of which has the skb
pointer populated (which is necessary for rearming the TX MSI vector and
for collecting the two-step TX timestamp from the TX confirmation path).

At the moment, this is sufficient, but with XDP_TX, we'll need to
service TX software buffer descriptors that don't have an skb pointer,
however they might be final nonetheless. So add a dedicated bit for
final software BDs that we populate and check explicitly. Also, we keep
looking just for an skb when doing TX timestamping, because we don't
want/need that for XDP.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/enetc/enetc.c
drivers/net/ethernet/freescale/enetc/enetc.h