linux/net/ethtool
Jason Xing be8e9eb375 net-timestamp: introduce SOF_TIMESTAMPING_OPT_RX_FILTER flag
introduce a new flag SOF_TIMESTAMPING_OPT_RX_FILTER in the receive
path. User can set it with SOF_TIMESTAMPING_SOFTWARE to filter
out rx software timestamp report, especially after a process turns on
netstamp_needed_key which can time stamp every incoming skb.

Previously, we found out if an application starts first which turns on
netstamp_needed_key, then another one only passing SOF_TIMESTAMPING_SOFTWARE
could also get rx timestamp. Now we handle this case by introducing this
new flag without breaking users.

Quoting Willem to explain why we need the flag:
"why a process would want to request software timestamp reporting, but
not receive software timestamp generation. The only use I see is when
the application does request
SOF_TIMESTAMPING_SOFTWARE | SOF_TIMESTAMPING_TX_SOFTWARE."

Similarly, this new flag could also be used for hardware case where we
can set it with SOF_TIMESTAMPING_RAW_HARDWARE, then we won't receive
hardware receive timestamp.

Another thing about errqueue in this patch I have a few words to say:
In this case, we need to handle the egress path carefully, or else
reporting the tx timestamp will fail. Egress path and ingress path will
finally call sock_recv_timestamp(). We have to distinguish them.
Errqueue is a good indicator to reflect the flow direction.

Suggested-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Jason Xing <kernelxing@tencent.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Link: https://patch.msgid.link/20240909015612.3856-2-kerneljasonxing@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-09-10 16:55:23 -07:00
..
bitset.c Revert "ethtool: Fix mod state of verbose no_mask bitset" 2023-10-19 09:27:12 -07:00
bitset.h ethtool: add ethnl_parse_bitset() helper 2020-03-12 15:32:32 -07:00
cabletest.c net: ethtool: cable-test: Release RTNL when the PHY isn't found 2024-08-28 17:18:53 -07:00
channels.c ethtool: refactor checking max channels 2024-08-09 21:52:13 -07:00
cmis_cdb.c ethtool: cmis_cdb: Add a layer for supporting CDB commands 2024-06-28 10:48:23 +01:00
cmis_fw_update.c net: ethtool: Allow write mechanism of LPL and both LPL and EPL 2024-08-15 12:20:14 +02:00
cmis.h ethtool: cmis_cdb: Remove unused declaration ethtool_cmis_page_fini() 2024-08-06 12:16:58 -07:00
coalesce.c net: ethtool: Fix the panic caused by dev being null when dumping coalesce 2024-07-01 13:43:50 +01:00
common.c net-timestamp: introduce SOF_TIMESTAMPING_OPT_RX_FILTER flag 2024-09-10 16:55:23 -07:00
common.h ethtool: refactor checking max channels 2024-08-09 21:52:13 -07:00
debug.c ethtool: netlink: always pass genl_info to .prepare_data 2023-08-15 15:01:03 -07:00
eee.c net: ethtool: eee: Remove legacy _u32 from keee 2024-02-28 12:18:05 +00:00
eeprom.c ethtool: move firmware flashing flag to struct ethtool_netdev_state 2024-07-04 15:45:15 -07:00
features.c ethtool: netlink: Add missing ethnl_ops_begin/complete 2024-01-18 13:21:06 +01:00
fec.c ethtool: netlink: always pass genl_info to .prepare_data 2023-08-15 15:01:03 -07:00
ioctl.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-08-29 11:49:10 -07:00
linkinfo.c ethtool: Don't check for NULL info in prepare_data callbacks 2024-08-01 09:03:52 -07:00
linkmodes.c ethtool: Don't check for NULL info in prepare_data callbacks 2024-08-01 09:03:52 -07:00
linkstate.c ethtool: netlink: do not return SQI value if link is down 2024-07-11 11:19:07 +02:00
Makefile net: ethtool: Introduce a command to list PHYs on an interface 2024-08-23 13:04:34 +01:00
mm.c ethtool: netlink: always pass genl_info to .prepare_data 2023-08-15 15:01:03 -07:00
module_fw.h ethtool: Add ability to flash transceiver modules' firmware 2024-06-28 10:48:23 +01:00
module.c net: ethtool: Monotonically increase the message sequence number 2024-07-13 15:37:36 -07:00
netlink.c net: ethtool: Introduce a command to list PHYs on an interface 2024-08-23 13:04:34 +01:00
netlink.h net: ethtool: Introduce a command to list PHYs on an interface 2024-08-23 13:04:34 +01:00
pause.c ethtool: netlink: always pass genl_info to .prepare_data 2023-08-15 15:01:03 -07:00
phc_vclocks.c ethtool: netlink: always pass genl_info to .prepare_data 2023-08-15 15:01:03 -07:00
phy.c net: ethtool: Introduce a command to list PHYs on an interface 2024-08-23 13:04:34 +01:00
plca.c net: ethtool: plca: Target the command to the requested PHY 2024-08-23 13:04:34 +01:00
privflags.c ethtool: netlink: always pass genl_info to .prepare_data 2023-08-15 15:01:03 -07:00
pse-pd.c ethtool: pse-pd: move pse validation into set 2024-08-30 12:14:57 -07:00
rings.c ethtool: add SET for TCP_DATA_SPLIT ringparam 2023-12-13 18:22:02 -08:00
rss.c ethtool: rss: support skipping contexts during dump 2024-08-12 14:16:24 +01:00
stats.c ethtool: netlink: always pass genl_info to .prepare_data 2023-08-15 15:01:03 -07:00
strset.c net: ethtool: strset: Allow querying phy stats by index 2024-08-23 13:04:35 +01:00
tsinfo.c net: Add struct kernel_ethtool_ts_info 2024-07-15 08:02:26 -07:00
tunnels.c genetlink: use attrs from struct genl_info 2023-08-15 15:00:45 -07:00
wol.c net: move ethtool-related netdev state into its own struct 2024-06-28 18:53:17 -07:00