diff options
author | Vladimir Oltean <[email protected]> | 2022-12-09 19:58:40 +0200 |
---|---|---|
committer | Jakub Kicinski <[email protected]> | 2022-12-12 15:03:21 -0800 |
commit | 8f18655c49eb6abfe7fc3711d32d23b311fbc6a6 (patch) | |
tree | b6d197aa3735d037b53e19618956672d6f6adc47 /tools/perf/scripts/python/compaction-times.py | |
parent | cd2aafa25b94b4d7f46fbae0bf58701689db296b (diff) |
net: dsa: don't call ptp_classify_raw() if switch doesn't provide RX timestamping
ptp_classify_raw() is not exactly cheap, since it invokes a BPF program
for every skb in the receive path. 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 protected]>
Reviewed-by: Florian Fainelli <[email protected]>
Reviewed-by: Kurt Kanzenbach <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/compaction-times.py')
0 files changed, 0 insertions, 0 deletions