Loading
net: enetc: save the parsed information of PTP packet to skb->cb
Currently, the Tx PTP packets are parsed twice in the enetc driver, once in enetc_xmit() and once in enetc_map_tx_buffs(). The latter is duplicate and is unnecessary, since the parsed information can be saved to skb->cb so that enetc_map_tx_buffs() can get the previously parsed data from skb->cb. Therefore, add struct enetc_skb_cb as the format of the data in the skb->cb buffer to save the parsed information of PTP packet. Use saved information in enetc_map_tx_buffs() to avoid parsing data again. In addition, rename variables offset1 and offset2 in enetc_map_tx_buffs() to corr_off and tstamp_off for better readability. Signed-off-by:Wei Fang <wei.fang@nxp.com> Reviewed-by:
Frank Li <Frank.Li@nxp.com> Link: https://patch.msgid.link/20250829050615.1247468-10-wei.fang@nxp.com Signed-off-by:
Paolo Abeni <pabeni@redhat.com>