linux-next/drivers/net
Alan Brady 34c21fa894 idpf: implement virtchnl transaction manager
This starts refactoring how virtchnl messages are handled by adding a
transaction manager (idpf_vc_xn_manager).

There are two primary motivations here which are to enable handling of
multiple messages at once and to make it more robust in general. As it
is right now, the driver may only have one pending message at a time and
there's no guarantee that the response we receive was actually intended
for the message we sent prior.

This works by utilizing a "cookie" field of the message descriptor. It
is arbitrary what data we put in the cookie and the response is required
to have the same cookie the original message was sent with. Then using a
"transaction" abstraction that uses the completion API to pair responses
to the message it belongs to.

The cookie works such that the first half is the index to the
transaction in our array, and the second half is a "salt" that gets
incremented every message. This enables quick lookups into the array and
also ensuring we have the correct message. The salt is necessary because
after, for example, a message times out and we deem the response was
lost for some reason, we could theoretically reuse the same index but
using a different salt ensures that when we do actually get a response
it's not the old message that timed out previously finally coming in.
Since the number of transactions allocated is U8_MAX and the salt is 8
bits, we can never have a conflict because we can't roll over the salt
without using more transactions than we have available.

This starts by only converting the VIRTCHNL2_OP_VERSION message to use
this new transaction API. Follow up patches will convert all virtchnl
messages to use the API.

Tested-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Reviewed-by: Igor Bagnucki <igor.bagnucki@intel.com>
Co-developed-by: Joshua Hay <joshua.a.hay@intel.com>
Signed-off-by: Joshua Hay <joshua.a.hay@intel.com>
Signed-off-by: Alan Brady <alan.brady@intel.com>
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
2024-03-04 09:32:41 -08:00
..
arcnet Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-02-15 16:20:04 -08:00
bonding bonding: 802.3ad replace MAC_ADDRESS_EQUAL with __agg_has_partner 2024-02-27 18:18:31 -08:00
caif
can rtnetlink: prepare nla_put_iflink() to run under RCU 2024-02-26 11:46:12 +00:00
dsa net: dsa: mv88e6xxx: add Amethyst specific SMI GPIO function 2024-02-29 10:16:39 +01:00
ethernet idpf: implement virtchnl transaction manager 2024-03-04 09:32:41 -08:00
fddi net: fill in MODULE_DESCRIPTION()s for fddik/skfp 2024-02-15 08:03:46 -08:00
fjes fjes: fix memleaks in fjes_hw_setup 2024-01-24 18:03:53 -08:00
hamradio
hippi
hyperv hv_netvsc: Register VF in netvsc_probe if NET_DEVICE_REGISTER missed 2024-02-04 13:38:08 +00:00
ieee802154 net: fill in MODULE_DESCRIPTION()s for ieee802154/fakelb 2024-02-15 08:03:45 -08:00
ipa net: ipa: don't save the platform device 2024-03-04 11:44:41 +00:00
ipvlan rtnetlink: prepare nla_put_iflink() to run under RCU 2024-02-26 11:46:12 +00:00
mctp
mdio net: phy: mdio-bcm-unimac: Add asp v2.2 support 2024-03-01 09:22:50 +00:00
netdevsim netdevsim: add ndo_get_iflink() implementation 2024-03-01 10:43:10 +00:00
pcs net: pcs: xpcs: Explicitly return error on caps validation 2024-02-26 13:09:09 +00:00
phy net: phy: qcom: qca808x: fill in possible_interfaces 2024-03-01 08:56:39 +00:00
plip net: fill in MODULE_DESCRIPTION()s for plip 2024-02-15 08:03:46 -08:00
ppp net: ppp: constify the struct device_type usage 2024-02-21 09:45:23 +00:00
pse-pd
slip net: fill in MODULE_DESCRIPTION()s for SLIP 2024-01-11 16:16:08 -08:00
team net: team: Don't bother filling in ethtool driver version 2024-02-23 18:03:53 -08:00
thunderbolt
usb ipv6: annotate data-races around cnf.forwarding 2024-03-01 08:42:31 +00:00
vmxnet3 net: ethtool: pass a pointer to parameters to get/set_rxfh ethtool ops 2023-12-13 22:07:16 -08:00
vxlan net: vxlan: constify the struct device_type usage 2024-02-21 09:45:23 +00:00
wan net: wan: framer: constify of_phandle_args in xlate 2024-02-20 18:28:54 -08:00
wireguard net: adopt skb_network_offset() and similar helpers 2024-03-04 08:47:06 +00:00
wireless net: adopt skb_network_header_len() more broadly 2024-03-04 08:47:06 +00:00
wwan net: wwan: t7xx: Prefer struct_size over open coded arithmetic 2024-02-27 18:09:35 -08:00
xen-netback net: fill in MODULE_DESCRIPTION()s for xen-netback 2024-02-15 08:03:45 -08:00
amt.c amt: do not use overwrapped cb area 2024-01-11 16:55:17 -08:00
bareudp.c net: bareudp: Remove generic .ndo_get_stats64 2024-03-04 08:55:44 +00:00
dummy.c net/dummy: Move stats allocation to core 2024-02-21 11:20:56 +00:00
eql.c
geneve.c net: geneve: constify the struct device_type usage 2024-02-21 09:45:23 +00:00
gtp.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-02-29 14:24:56 -08:00
ifb.c
Kconfig virtio-net: support rx netdim 2023-12-13 12:49:05 +00:00
LICENSE.SRC
loopback.c net: add netdev_lockdep_set_classes() to virtual drivers 2024-02-13 18:45:06 -08:00
macsec.c rtnetlink: prepare nla_put_iflink() to run under RCU 2024-02-26 11:46:12 +00:00
macvlan.c rtnetlink: prepare nla_put_iflink() to run under RCU 2024-02-26 11:46:12 +00:00
macvtap.c
Makefile
mdio.c
mhi_net.c
mii.c
net_failover.c
netconsole.c net: netconsole: append userdata to fragmented netconsole messages 2024-02-09 10:23:46 +00:00
netkit.c rtnetlink: prepare nla_put_iflink() to run under RCU 2024-02-26 11:46:12 +00:00
nlmon.c net: nlmon: Simplify nlmon_get_stats64 2024-03-04 10:18:02 +00:00
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tap.c
tun.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-02-29 14:24:56 -08:00
veth.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-02-29 14:24:56 -08:00
virtio_net.c virtio_net: Fix "‘%d’ directive writing between 1 and 11 bytes into a region of size 10" warnings 2024-01-11 16:54:34 -08:00
vrf.c
vsockmon.c net/vsockmon: Do not set zeroed statistics 2024-02-26 18:39:10 -08:00
xen-netfront.c