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>
This commit is contained in:
committed by
David S. Miller
parent
cf536ea3c7
commit
5c5416f5d4
@ -740,8 +740,8 @@ struct dsa_switch_ops {
|
||||
struct ifreq *ifr);
|
||||
int (*port_hwtstamp_set)(struct dsa_switch *ds, int port,
|
||||
struct ifreq *ifr);
|
||||
bool (*port_txtstamp)(struct dsa_switch *ds, int port,
|
||||
struct sk_buff *clone);
|
||||
void (*port_txtstamp)(struct dsa_switch *ds, int port,
|
||||
struct sk_buff *skb);
|
||||
bool (*port_rxtstamp)(struct dsa_switch *ds, int port,
|
||||
struct sk_buff *skb, unsigned int type);
|
||||
|
||||
|
Reference in New Issue
Block a user