aboutsummaryrefslogtreecommitdiff
path: root/include/uapi/linux/virtio_net.h
AgeCommit message (Collapse)AuthorFilesLines
2020-08-05virtio_net: use LE accessors for speed/duplexMichael S. Tsirkin1-1/+1
Speed and duplex config fields depend on VIRTIO_NET_F_SPEED_DUPLEX which being 63>31 depends on VIRTIO_F_VERSION_1. Accordingly, use LE accessors for these fields. Reported-by: Cornelia Huck <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]>
2020-08-05virtio_net: correct tags for config space fieldsMichael S. Tsirkin1-4/+4
Tag config space fields as having virtio endian-ness. Signed-off-by: Michael S. Tsirkin <[email protected]>
2020-03-23virtio-net: Introduce hash report featureYuri Benditovich1-0/+36
The feature VIRTIO_NET_F_HASH_REPORT extends the layout of the packet and requests the device to calculate hash on incoming packets and report it in the packet header. Signed-off-by: Yuri Benditovich <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Michael S. Tsirkin <[email protected]>
2020-03-23virtio-net: Introduce RSS receive steering featureYuri Benditovich1-2/+40
RSS (Receive-side scaling) defines hash calculation rules and decision on receive virtqueue according to the calculated hash, provided mask to apply and provided indirection table containing indices of receive virqueues. The driver sends the control command to enable multiqueue and provide parameters for receive steering. Signed-off-by: Yuri Benditovich <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Michael S. Tsirkin <[email protected]>
2020-03-23virtio-net: Introduce extended RSC featureYuri Benditovich1-2/+22
VIRTIO_NET_F_RSC_EXT feature bit indicates that the device is able to provide extended RSC information. When the feature is negotiatede and 'gso_type' field in received packet is not GSO_NONE, the device reports number of coalesced packets in 'csum_start' field and number of duplicated acks in 'csum_offset' field and sets VIRTIO_NET_HDR_F_RSC_INFO in 'flags' field. Signed-off-by: Yuri Benditovich <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Michael S. Tsirkin <[email protected]>
2018-05-28virtio_net: Introduce VIRTIO_NET_F_STANDBY feature bitSridhar Samudrala1-0/+3
This feature bit can be used by hypervisor to indicate virtio_net device to act as a standby for another device with the same MAC address. VIRTIO_NET_F_STANDBY is defined as bit 62 as it is a device feature bit. Signed-off-by: Sridhar Samudrala <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2018-01-09virtio_net: propagate linkspeed/duplex settings from the hypervisorJason Baron1-0/+13
The ability to set speed and duplex for virtio_net is useful in various scenarios as described here: 16032be virtio_net: add ethtool support for set and get of settings However, it would be nice to be able to set this from the hypervisor, such that virtio_net doesn't require custom guest ethtool commands. Introduce a new feature flag, VIRTIO_NET_F_SPEED_DUPLEX, which allows the hypervisor to export a linkspeed and duplex setting. The user can subsequently overwrite it later if desired via: 'ethtool -s'. Note that VIRTIO_NET_F_SPEED_DUPLEX is defined as bit 63, the intention is that device feature bits are to grow down from bit 63, since the transports are starting from bit 24 and growing up. Signed-off-by: Jason Baron <[email protected]> Cc: "Michael S. Tsirkin" <[email protected]> Cc: Jason Wang <[email protected]> Cc: [email protected] Signed-off-by: David S. Miller <[email protected]>
2016-06-10virtio_net: add _UAPI prefix to virtio_net header guardsMike Rapoport1-3/+3
This gives better namespacing and prevents conflicts with no-uapi version of virtio_net header that will be introduced in the following patch. Signed-off-by: Mike Rapoport <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-06-09virtio_net: Update the feature bit to comply with specAaron Conole1-1/+1
A draft version of the MTU Advice feature bit was specified as 25. This bit is not within the allowed range for network device feature bits, and should be changed to be feature bit 3 to fully comply with the spec. Fixes 14de9d114a82 ('virtio-net: Add initial MTU advice feature') Signed-off-by: Aaron Conole <[email protected]> Suggested-by: "Michael S. Tsirkin" <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-06-06virtio-net: Add initial MTU advice featureAaron Conole1-0/+3
This commit adds the feature bit and associated mtu device entry for the virtio network device. When a virtio device comes up, it checks the feature bit for the VIRTIO_NET_F_MTU feature. If such feature bit is enabled, the driver will read the advised MTU and use it as the initial value. Signed-off-by: Aaron Conole <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2015-07-01virtio_net: document VIRTIO_NET_CTRL_GUEST_OFFLOADSMichael S. Tsirkin1-0/+16
Document VIRTIO_NET_CTRL_GUEST_OFFLOADS and the relevant feature bits. Will allow ethtool control of the offloads down the road. Reported-by: Yan Vugenfirer <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]>
2015-02-17virtio_net: unconditionally define struct virtio_net_hdr_v1.Rusty Russell1-29/+25
This was introduced in commit ed9ecb0415b97b5f9f91f146e1977bb372c74c6d, but only defined if !VIRTIO_NET_NO_LEGACY. We should always define it: easier for users to have conditional legacy code. Suggested-by: "Michael S. Tsirkin" <[email protected]> Signed-off-by: Rusty Russell <[email protected]>
2015-02-13virtio: Don't expose legacy net features when VIRTIO_NET_NO_LEGACY defined.Rusty Russell1-2/+30
In particular, the virtio header always has the u16 num_buffers field. We define a new 'struct virtio_net_hdr_v1' for this (rather than simply calling it 'struct virtio_net_hdr', to avoid nasty type errors if some parts of a project define VIRTIO_NET_NO_LEGACY and some don't. Transitional devices (which can't define VIRTIO_NET_NO_LEGACY) will have to keep using struct virtio_net_hdr_mrg_rxbuf, which has the same byte layout as struct virtio_net_hdr_v1. Signed-off-by: Rusty Russell <[email protected]>
2014-12-09virtio_net: v1.0 endiannessMichael S. Tsirkin1-7/+8
Based on patches by Rusty Russell, Cornelia Huck. Note: more code changes are needed for 1.0 support (due to different header size). So we don't advertize support for 1.0 yet. Signed-off-by: Rusty Russell <[email protected]> Signed-off-by: Cornelia Huck <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]>
2013-08-02uapi: Convert some uses of 6 to ETH_ALENJoe Perches1-1/+1
Use the #define where appropriate. Add #include <linux/if_ether.h> where appropriate too. Signed-off-by: Joe Perches <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-07-27virtio-net: put virtio net header inline with dataMichael S. Tsirkin1-1/+3
For small packets we can simplify xmit processing by linearizing buffers with the header: most packets seem to have enough head room we can use for this purpose. Since existing hypervisors require that header is the first s/g element, we need a feature bit for this. Signed-off-by: Michael S. Tsirkin <[email protected]> Signed-off-by: Rusty Russell <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-05-05virtio: don't expose u16 in userspace apistephen hemminger1-1/+1
Programs using virtio headers outside of kernel will no longer build because u16 type does not exist in userspace. All user ABI must use __u16 typedef instead. Bug introduce by: commit 986a4f4d452dec004697f667439d27c3fda9c928 Author: Jason Wang <[email protected]> Date: Fri Dec 7 07:04:56 2012 +0000 virtio_net: multiqueue support Signed-off-by: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-01-21virtio-net: introduce a new control to set macaddrAmos Kong1-1/+7
Currently we write MAC address to pci config space byte by byte, this means that we have an intermediate step where mac is wrong. This patch introduced a new control command to set MAC address, it's atomic. VIRTIO_NET_F_CTRL_MAC_ADDR is a new feature bit for compatibility. Signed-off-by: Amos Kong <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-12-09virtio_net: multiqueue supportJason Wang1-0/+27
This patch adds the multiqueue (VIRTIO_NET_F_MQ) support to virtio_net driver. VIRTIO_NET_F_MQ capable device could allow the driver to do packet transmission and reception through multiple queue pairs and does the packet steering to get better performance. By default, one one queue pair is used, user could change the number of queue pairs by ethtool in the next patch. When multiple queue pairs is used and the number of queue pairs is equal to the number of vcpus. Driver does the following optimizations to implement per-cpu virt queue pairs: - select the txq based on the smp processor id. - smp affinity hint to the cpu that owns the queue pairs. This could be used with the flow steering support of the device to guarantee the packets of a single flow is handled by the same cpu. Signed-off-by: Krishna Kumar <[email protected]> Signed-off-by: Jason Wang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-10-13UAPI: (Scripted) Disintegrate include/linuxDavid Howells1-0/+169
Signed-off-by: David Howells <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Acked-by: Thomas Gleixner <[email protected]> Acked-by: Michael Kerrisk <[email protected]> Acked-by: Paul E. McKenney <[email protected]> Acked-by: Dave Jones <[email protected]>