net: mscc: ocelot: always pass skb clone to ocelot_port_add_txtstamp_skb
authorVladimir Oltean <vladimir.oltean@nxp.com>
Wed, 23 Sep 2020 11:24:20 +0000 (14:24 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 25 Sep 2020 02:47:56 +0000 (19:47 -0700)
commite2f9a8fe73d3a29edfdb4215e7596c95b6db362d
tree2870c5b4d8eb760d52e063a138d068c3ba686ef3
parente4a85c545603227f42088e9ad71fb01f9b67d6c9
net: mscc: ocelot: always pass skb clone to ocelot_port_add_txtstamp_skb

Currently, ocelot switchdev passes the skb directly to the function that
enqueues it to the list of skb's awaiting a TX timestamp. Whereas the
felix DSA driver first clones the skb, then passes the clone to this
queue.

This matters because in the case of felix, the common IRQ handler, which
is ocelot_get_txtstamp(), currently clones the clone, and frees the
original clone. This is useless and can be simplified by using
skb_complete_tx_timestamp() instead of skb_tstamp_tx().

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/ocelot/felix.c
drivers/net/ethernet/mscc/ocelot.c
drivers/net/ethernet/mscc/ocelot_net.c
include/soc/mscc/ocelot.h
net/dsa/tag_ocelot.c