summaryrefslogtreecommitdiffstats
path: root/src/vnet/devices/virtio
AgeCommit message (Collapse)AuthorFilesLines
2020-09-01virtio: fix the error returnMohsin Kazmi1-9/+12
Type: fix Change-Id: I12b08333f3f69aaa882e8801f4f69bca2d7bd558 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-08-31virtio: fix the coverity warningMohsin Kazmi2-7/+13
Type: fix Change-Id: I6c6d66ad8aa158be8d2b9d111de7d46473b9dc02 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-08-20virtio: add modern device supportMohsin Kazmi6-47/+676
Type: feature Change-Id: I205f7c146a213d603d9d1e46fcf5195a876608dc Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-08-20virtio: refactor pci device codeMohsin Kazmi6-350/+531
Type: refactor Change-Id: I7342178f9ab9adb99b91a4f984bc22bef2ce8021 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-08-17tap: add gro supportMohsin Kazmi5-7/+61
Type: feature Change-Id: I5868dd267aa26aa97aec5fd70e70c5956ac52277 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-07-22virtio: add the buffer allocation errorMohsin Kazmi1-7/+13
Type: improvement Change-Id: I991e32d531719693c387db4ef93d04d4b562789d Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-07-15virtio: fix the msix for multiqueueMohsin Kazmi2-15/+60
Type: fix Change-Id: Ie0cff37b474f8d85a3ae376e0f547a347fb1ad8a Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-07-02tap: fix dump for TUN interfacesMohsin Kazmi1-0/+1
Type: fix Change-Id: I3bcc8ff1cf0a828ce3ba112694d38e3287d38d8d Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-06-27virtio: add tx traceMohsin Kazmi1-2/+60
Type: improvement Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> Change-Id: I0b1a1ce085ceb75fe139092e40878566682a7986
2020-06-24virtio: fix the vlib buffer flagsMohsin Kazmi1-2/+1
Type: fix Change-Id: I92e8e30e4175229e24dd92471016e9095b5cc83e Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-06-16virtio: add vhost sw_if_index filter for sw_interface_vhost_user_dumpSteven Luong2-3/+6
The filter sw_if_index was in the API sw_interface_vhost_user_dump. But it was never implemented in the backend. This patch is to add the backend, vat, and custom dump support for the filter. Type: feature Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: Iaa41a7e11bfbcbb4c60092375e4b0dcf0950077b
2020-06-12virtio: interface type based improvementsMohsin Kazmi3-75/+142
Type: improvement Change-Id: I220ea6ab609e3c1628f5210be441d0d5e825a32c Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-05-29docs: Minor updates to feature.yaml filesJohn DeNisco1-4/+5
Type: docs Signed-off-by: John DeNisco <jdenisco@cisco.com> Change-Id: Iba106d33d34766b91e46980e7237fbdfc3710b8b
2020-05-28tap: fix rx queue indexMohsin Kazmi1-1/+2
Type: fix Change-Id: I5601bdeb47d08118476ff7bd29435d2c1dba34b9 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-05-05gso: add support for IP-IPMohsin Kazmi2-11/+21
Type: feature Change-Id: I37752af8496e0042a1da91124f3d94216b39ff11 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-05-04tap: refactor existing flagsMohsin Kazmi1-5/+4
Type: refactor This patch refactor the existing flags and also add a new flag for packet coalescing. Change-Id: Ic826e4c81313f26d87c475cdf666b06cbed60a3a Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-04-29devices: vhost: simplify string copies for GCC-10Benoît Ganne1-10/+5
GCC-10 increases string truncations warnings. Refactor string copies confusing it. Type: refactor Change-Id: I9720a0539059de00ab212ff2fc73055f04f5af1d Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-04-28tap: use one tap fd per rx queueAloys Augustin2-2/+5
This matches vhost queues to linux netdev queues and avoids random packet shuffling across vhost queues on rx. Change-Id: I9901689d361e440fb0b91c9fbaf8124ce525b316 Type: fix Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
2020-04-27virtio: support virtio 1.1 packed ring in vhostSteven Luong8-156/+1604
virtio 1.1 defines a number of new features. Packed ring is among the most notable and important one. It combines used, available, and descripptor rings into one. This patch provides experimental support for packed ring. To avoid regression, when packed ring is configured for the interface, it is branched to a separate RX and TX driver. Non packed ring should continue to perform as it was before. Packed ring is tested using qemu4.2 and ubuntu focal fossa (kernel 5.4.0-12) on the guess VM which supports packed ring. To configure VPP with packed ring, just add the optional keyword "packed" when creating the vhost interface. To bring up the guest VM with packed ring, add "packed=on" in the qemu launch command. To facilitate troubleshooting, also added "verbose" option in show vhost desc CLI to include displaying the indirect descriptors. Known qemu reconnect issue - If VPP is restarted, guest VMs also need to be restarted. The problem is kernel virtio-net-pci keeps track of the previous available and used indices. For virtio 1.0, these indices are in shared memory and qemu can easily copy them to pass to the backend for reconnect. For virio 1.1, these indices are no longer in shared memory. Qemu needs a new mechanism to retrieve them and it is not currently implemented. So when the protocol reconnects, qemu does not have the correct available and used indices to pass to the backend. As a result, after the reconnect, virtio-net-pci is reading the TX ring from the wrong position in the ring, not the same position which the backend is writing. Similar problem exists also in the RX. Type: feature Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I5afc50b0bafab5a1de7a6dd10f399db3fafd144c
2020-04-24virtio: vhost checksum problem for ipv6Steven Luong1-3/+3
When checksum is enable for IPv6, it erroneously set the flag VNET_BUFFER_F_OFFLOAD_IP_CKSUM. That flag is meant for ip4 packets only. Type: fix Ticket: VPP-1857 Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: Id03b2937bfa34e2a9b50a36aafe0700bad7fb95e (cherry picked from commit f78294d8468f156e066e7e69aab3a1b285810c3a)
2020-04-22gso: add vxlan tunnel supportMohsin Kazmi2-10/+14
Type: feature Change-Id: I85f6ec77187a4983c66c5e22fd39fbb2cef82902 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-04-17virtio: fix to use chained descriptors when missing indirect descriptorMohsin Kazmi2-7/+79
Some vhost-backed missing the VIRTIO_RING_F_INDIRECT_DESC feature. Previously, vpp doesn't support jumbo frames using chained descriptors. This patch fixes this issue. Type: fix Change-Id: I20487e201e88ea136b556ac84dde058019ab3e78 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-04-17tap: add initial support for tunMohsin Kazmi5-25/+72
Type: feature Change-Id: I699a01ac925fe5c475a36032edb7018618bb4dd4 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-04-10virtio: fix gso and csum offload errors handlingMohsin Kazmi1-45/+82
GSO and CSUM offloaded packets are transmitted even itf doesn't support GSO/CSUM. This patch fixes it by logging the respective errors and dropping the packets. Type: fix Change-Id: I5ab19d15ce6aa9fda515313c313a5a56c0b96837 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-04-08virtio: fix the tcp/udp checksum offloadsMohsin Kazmi2-28/+0
Some vhost-backend calculates the wrong checksum in case of tcp/udp offload when driver resets tcp/udp checksum field to '0'. Type: fix Change-Id: I1d2a9b95b3d5cc1decac38027104a04df2af4680 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-03-31vlib: move pci api types from vnet/pci to vlib/pciJakub Grajciar2-2/+2
Type: fix Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com> Change-Id: I1a60809a8bbbbb8ac8b65ab990d51aae1229647f Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2020-03-30gso: fix the header parser to read onlyMohsin Kazmi2-4/+44
Previously, header parser sets the tcp/udp checksum to 0. It should be read only function for vlib_buffer_t. Type: fix Change-Id: I9c3398372f22998da3df188f0b7db13748303068 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-03-23virtio: vhost gso checksum error when both indirect and mrg_rxbuf are offSteven Luong1-20/+19
Turn on gso, turn off both indirect and mrg_rxbuf caused traffic received and sent with checksum error. The problem is we are not mapping the hdr correctly in the shared memory address. Type: fix Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I7ef3bc2755544167b0e624365988111b17399e89
2020-03-23virtio: improve error handlingMohsin Kazmi1-9/+30
Type: improvement Change-Id: I134465760272ceb29f85486cba838d8687696bbf Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-03-21virtio: fix link up/down flagMohsin Kazmi1-3/+9
Type: fix "set int state <interface> down" puts the virtio device link down. It will not put the link in "UP" state, when "set int state <interface up>" will be used again to change the interface admin up. This patch fixes it. To test: create tap set int state tap0 up set int state tap0 down sh hardware sh int set int state tap0 up sh int sh hardware Change-Id: I3c0e31539f8a2a1e40220e7fb57eedecf408f067 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-03-21virtio: fix the out of order descriptors in txMohsin Kazmi4-8/+102
Type: fix Some vhost-backends give used descriptors back in out-of-order. This patch fixes the native virtio to handle out-of-order descriptors. Change-Id: I57323303349f6a385e412ee22772ab979ae8edbf Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-03-02virtio: fix the coverity warningMohsin Kazmi1-4/+1
Type: fix Change-Id: Ia75edb74eb7c746dd4c66bdbff75efb949575ce4 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-02-04virtio: update FEATURE.yaml to include description for vhost-userSteven Luong1-3/+7
Add features supported by vhost-user Type: docs Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: Iba4c5244c40324b603e2803ade8ecc0816326de8
2020-02-03virtio: vhost gso is broken in some topologySteven Luong1-2/+8
Recent modification added a call to vnet_gso_header_offset_parser in the beginning of vhost_user_handle_tx_offload. The former routine may set tcp or udp->checksum to 0. While it is appropriate to set it to 0 for the GSO packet, it is broken and causes checksum error if the aformentiooned routine is called by a non-GSO packet. The fix is to not call vhost_user_handle_tx_offload if the buffer does not indicate checksum offload is needed. Type: fix Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I6e699d7a40b7887ff149cd8f77e8f0fa9374ef19
2020-01-30tap: fix the host mac addressMohsin Kazmi1-0/+2
Tap configuration code sets the host mac address two time. This patch fixes it. Type: fix Change-Id: I7bebb9b7f25352a8a9a98bae6a0636757c0cea9c Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-01-27devices: vhost: fix data offset on inputBenoît Ganne1-11/+1
Regardless of whether the virtio_net_hdr is sent as a separate descriptors or in the same descriptor as the data, we always want to skip the header length - maybe moving to the next descriptor along the way. Type: fix Change-Id: Iaa70aeb310e589639b20f8c7029aaa8d3ce5d307 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-01-08virtio: fix ip4 checksum offloadMohsin Kazmi1-2/+14
Type: fix Change-Id: I08747ac308e5c1768a3a6aa5f83a016dc0274a1c Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-01-08tap: split gso and checksum offload functionalityMohsin Kazmi1-2/+1
Type: refactor Change-Id: I0d4b79ef384c11c841576d264bfd8ccb21783e10 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-01-08virtio: split gso and checksum offload functionalityMohsin Kazmi9-44/+312
Type: refactor Change-Id: I897e36bd5db593b417c2bac9f739bc51cf45bc08 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-01-03devices: virtio API cleanupJakub Grajciar2-16/+21
Use consistent API types. Type: fix Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com> Change-Id: I38a409af770c88c1eb2c68b24abef2a5a91e1b9a
2020-01-02virtio: fix checksum offload supportBenoît Ganne1-10/+21
Checksum offload and GSO are independent. We must support checksum offload if it has been negotiated, independently of GSO. Ticket: VPPSUPP-47 Type: fix Change-Id: I8cb6dd58b61714ebb2726eb4aab0d74d49fdab99 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-12-17virtio: fix the tx queue thread bindingMohsin Kazmi1-3/+17
Type: fix Change-Id: Ibbe7e20aebc9153ceba07e048dc0eaa45193f4ea Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-12-11devices: vhost API cleanupJakub Grajciar5-26/+171
Use consistent API types. Type: fix Change-Id: I2dec594cb834a45004edc9ca58ad7c7b4bd7ff06 Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2019-12-10api: multiple connections per processDave Barach2-2/+2
Type: feature Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I2272521d6e69edcd385ef684af6dd4eea5eaa953
2019-12-06gso: fix the tap/virtio driver for header offsetMohsin Kazmi1-1/+25
Type: fix Change-Id: Ied34466907fa8ad44f997c600dbf481be4d22027 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-12-05gso: add protocol header parserMohsin Kazmi1-33/+10
Type: feature Change-Id: I7c6be2b96d19f82be237f6159944f3164ea512d0 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-12-04gso: remove the interface countMohsin Kazmi3-10/+1
Type: refactor Change-Id: I51405b9d09fb6fb03d08569369fdd4e11c647908 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-11-20tap: multiqueue supportDamjan Marion2-38/+15
Type: feature Change-Id: I7dcc8c6911d02729b3bda1b3a21a211c82c3b949 Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-11-20virtio: fix use-after-freeBenoît Ganne1-1/+1
Type: fix Change-Id: Ic67d9da65d937f56ecf994a5504c6351624b32ff Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-11-14virtio: refactor virtio-pci loggingDamjan Marion7-96/+143
Type: refactor Change-Id: I34306c1206b2bf5f521be6c6b78074ccf9259a08 Signed-off-by: Damjan Marion <damarion@cisco.com>