net: dsa: no longer clone skb in core driver
authorYangbo Lu <yangbo.lu@nxp.com>
Tue, 27 Apr 2021 04:21:59 +0000 (12:21 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 27 Apr 2021 21:10:15 +0000 (14:10 -0700)
commit717496db47101118fcab45824f763568a56c4d67
tree4695af6b67ad7e9e1fce5e93e93dd19be221ba01
parente7201d8be4f1a52697d07923f3f31010ab9e1ab7
net: dsa: no longer clone skb in core driver

It was a waste to clone skb directly in dsa_skb_tx_timestamp().
For one-step timestamping, a clone was not needed. For any failure of
port_txtstamp (this may usually happen), the skb clone had to be freed.

So this patch moves skb cloning for tx timestamp out of dsa core, and
let drivers clone skb in port_txtstamp if they really need.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Tested-by: Kurt Kanzenbach <kurt@linutronix.de>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/hirschmann/hellcreek_hwtstamp.c
drivers/net/dsa/hirschmann/hellcreek_hwtstamp.h
drivers/net/dsa/mv88e6xxx/hwtstamp.c
drivers/net/dsa/mv88e6xxx/hwtstamp.h
drivers/net/dsa/ocelot/felix.c
drivers/net/dsa/sja1105/sja1105_ptp.c
drivers/net/dsa/sja1105/sja1105_ptp.h
include/net/dsa.h
net/dsa/slave.c