linux/net
Oliver Hartkopp c83c22ec14 can: canxl: add virtual CAN network identifier support
CAN XL data frames contain an 8-bit virtual CAN network identifier (VCID).
A VCID value of zero represents an 'untagged' CAN XL frame.

To receive and send these optional VCIDs via CAN_RAW sockets a new socket
option CAN_RAW_XL_VCID_OPTS is introduced to define/access VCID content:

- tx: set the outgoing VCID value by the kernel (one fixed 8-bit value)
- tx: pass through VCID values from the user space (e.g. for traffic replay)
- rx: apply VCID receive filter (value/mask) to be passed to the user space

With the 'tx pass through' option CAN_RAW_XL_VCID_TX_PASS all valid VCID
values can be sent, e.g. to replay full qualified CAN XL traffic.

The VCID value provided for the CAN_RAW_XL_VCID_TX_SET option will
override the VCID value in the struct canxl_frame.prio defined for
CAN_RAW_XL_VCID_TX_PASS when both flags are set.

With a rx_vcid_mask of zero all possible VCID values (0x00 - 0xFF) are
passed to the user space when the CAN_RAW_XL_VCID_RX_FILTER flag is set.
Without this flag only untagged CAN XL frames (VCID = 0x00) are delivered
to the user space (default).

The 8-bit VCID is stored inside the CAN XL prio element (only in CAN XL
frames!) to not interfere with other CAN content or the CAN filters
provided by the CAN_RAW sockets and kernel infrastruture.

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Link: https://lore.kernel.org/all/20240212213550.18516-1-socketcan@hartkopp.net
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2024-02-13 11:47:13 +01:00
..
6lowpan
9p
802
8021q vlan: skip nested type that is not IFLA_VLAN_QOS_MAPPING 2024-01-19 21:25:06 -08:00
appletalk
atm
ax25
batman-adv This cleanup patchset includes the following patches: 2024-02-02 12:44:16 +00:00
bluetooth TTY/Serial changes for 6.8-rc1 2024-01-18 11:37:24 -08:00
bpf bpf, net: switch to dynamic registration 2024-01-23 17:12:46 -08:00
bridge bridge: use exit_batch_rtnl() method 2024-02-07 18:55:12 -08:00
caif
can can: canxl: add virtual CAN network identifier support 2024-02-13 11:47:13 +01:00
ceph libceph: remove MAX_EXTENTS check for sparse reads 2024-01-15 15:40:50 +01:00
core Merge branch 'for-io_uring-add-napi-busy-polling-support' 2024-02-09 10:35:34 -08:00
dcb
dccp net: dccp: Simplify the allocation of slab caches in dccp_ackvec_init 2024-02-02 12:19:26 +00:00
devlink devlink: avoid potential loop in devlink_rel_nested_in_notify_work() 2024-02-06 18:45:16 -08:00
dns_resolver
dsa net: dsa: tag_sja1105: remove "inline" keyword 2024-02-08 19:03:57 -08:00
ethernet
ethtool ethtool: do not use rtnl in ethnl_default_dumpit() 2024-02-08 19:08:51 -08:00
handshake
hsr net: hsr: remove WARN_ONCE() in send_hsr_supervision_frame() 2024-01-29 11:29:55 +00:00
ieee802154 net: fill in MODULE_DESCRIPTION()s for ieee802154 2024-01-29 12:12:51 +00:00
ife
ipv4 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-02-08 15:30:33 -08:00
ipv6 sit: use exit_batch_rtnl() method 2024-02-07 18:55:12 -08:00
iucv
kcm
key
l2tp
l3mdev
lapb
llc llc: call sock_orphan() at release time 2024-01-30 13:49:09 +01:00
mac80211 wifi: mac80211: accept broadcast probe responses on 6 GHz 2024-02-02 13:11:59 +01:00
mac802154
mctp
mpls
mptcp mptcp: annotate lockless accesses around read-mostly fields 2024-02-05 11:18:09 +00:00
ncsi
netfilter Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-02-08 15:30:33 -08:00
netlabel netlabel: cleanup struct netlbl_lsm_catmap 2024-02-07 12:38:30 +00:00
netlink Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-01-25 14:20:08 -08:00
netrom
nfc nfc: hci: Save a few bytes of memory when registering a 'nfc_llc' engine 2024-02-06 15:36:06 +01:00
nsh
openvswitch
packet sock_diag: add module pointer to "struct sock_diag_handler" 2024-01-23 15:13:54 +01:00
phonet
psample
qrtr
rds net: rds: Simplify the allocation of slab caches in rds_conn_init 2024-01-30 17:08:19 -08:00
rfkill
rose
rxrpc rxrpc: Fix counting of new acks and nacks 2024-02-05 12:34:07 +00:00
sched net/sched: Remove alias of sch_clsact 2024-02-02 10:57:56 -08:00
sctp sctp: Simplify the allocation of slab caches 2024-02-02 12:17:32 +00:00
smc net/smc: change the term virtual ISM to Emulated-ISM 2024-02-07 18:24:19 -08:00
strparser
sunrpc NFSv4.1: Assign the right value for initval and retries for rpc timeout 2024-01-29 13:39:48 -05:00
switchdev
tipc Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-02-08 15:30:33 -08:00
tls net: tls, fix WARNIING in __sk_msg_free 2024-01-14 12:17:14 +00:00
unix Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-02-08 15:30:33 -08:00
vmw_vsock sock_diag: add module pointer to "struct sock_diag_handler" 2024-01-23 15:13:54 +01:00
wireless wifi: cfg80211: detect stuck ECSA element in probe resp 2024-02-02 13:08:58 +01:00
x25
xdp Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-01-25 14:20:08 -08:00
xfrm xfrm: interface: use exit_batch_rtnl() method 2024-02-07 18:55:12 -08:00
compat.c
devres.c
Kconfig
Kconfig.debug
Makefile af_unix: Remove CONFIG_UNIX_SCM. 2024-01-31 16:41:16 -08:00
socket.c
sysctl_net.c