• Yangbo Lu's avatar
    net: dsa: free skb->cb usage in core driver · c4b364ce
    Yangbo Lu authored
    Free skb->cb usage in core driver and let device drivers decide to
    use or not. The reason having a DSA_SKB_CB(skb)->clone was because
    dsa_skb_tx_timestamp() which may set the clone pointer was called
    before p->xmit() which would use the clone if any, and the device
    driver has no way to initialize the clone pointer.
    
    This patch just put memset(skb->cb, 0, sizeof(skb->cb)) at beginning
    of dsa_slave_xmit(). Some new features in the future, like one-step
    timestamp may need more bytes of skb->cb to use in
    dsa_skb_tx_timestamp(), and p->xmit().
    Signed-off-by: default avatarYangbo Lu <yangbo.lu@nxp.com>
    Acked-by: default avatarRichard Cochran <richardcochran@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    c4b364ce
sja1105.h 2.05 KB