Subject: Re: [PATCH net-next] net: dsa: don't call ptp_classify_raw() if switch doesn't provide RX timestamping

From: Kurt Kanzenbach <[email-masked]>
Date: Sat, 10 Dec 2022 11:37:53 +0100

On Fri Dec 09 2022, Vladimir Oltean wrote:
> ptp_classify_raw() is not exactly cheap, since it invokes a BPF program
> for every skb in the receive path.

Only if CONFIG_NET_PTP_CLASSIFY is set.

> For switches which do not provide ds->ops->port_rxtstamp(), running
> ptp_classify_raw() provides precisely nothing, so check for the
> presence of the function pointer first, since that is much cheaper.
>
> Signed-off-by: Vladimir Oltean <[email-masked]>

Reviewed-by: Kurt Kanzenbach <[email-masked]>