summaryrefslogtreecommitdiffstats
path: root/src/vnet/devices
AgeCommit message (Collapse)AuthorFilesLines
2020-10-29tap: fix the segvMohsin Kazmi1-2/+5
Type: fix Change-Id: I53cb96950f8658d7159fb0bd8ecfa50b6977e5af Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-10-28misc: Break the big IP header files to improve compile timeNeale Ranns4-7/+1
Type: refactor Signed-off-by: Neale Ranns <neale.ranns@cisco.com> Change-Id: Id1801519638a9b97175847d7ed58824fb83433d6
2020-10-28virtio: fix the buffer array indexMohsin Kazmi1-1/+1
Type: fix Fixes: 2e6f624f1f82ae0351dd05ad5d930d6876105519 Change-Id: I24a9822d1968a134c7e41221f48296cc8a67dd91 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-10-26virtio: improve the compile timeMohsin Kazmi1-36/+32
Type: improvement packet buffering is common code to tun/tap/virtio. Change-Id: I59a339f268a28a0c32756e52d10d1ed6b207db42 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-10-26virtio: reduce the compile time for device.cMohsin Kazmi1-15/+19
Type: improvement GRO is common to tap/tun/virtio devices. Hence move to common place. Change-Id: Ibb099f3a80f493ddb934df6bb7640f7c9c370fd5 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-10-22virtio: checksum error reported for ip6 traffic with GSO enableSteven Luong2-11/+1
When GSO is enabled, vhost clears the checksum field prior to transmitting the packet. Some newer kernel version does not like that and complains about checksum error. This was seen with ip6 traffic. Type: fix Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I7c6f2a6148f4a30107bfa8b078f5990e64300cf1
2020-10-22tap: fix the api for use of vec_lenMohsin Kazmi1-3/+8
Type: fix Fixes: 03b76a20c569b8275beb8783691300a7d66b54a4 Change-Id: Ife788974cb7b2c35f40a017dd195dc2f7ee797b4 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-10-21virtio: run process to send interrupts to input nodesMohsin Kazmi3-17/+111
Type: improvement virtio interfaces support packet coalescing and buffering which depends on timer expiry to flush the stored packets periodically. virtio input node checks timer expiry and schedules tx queue accordingly. In poll mode, timer expiry is handled naturally, as input node runs periodically. In interrupt mode, virtio input node depends on the interrupts send from backend. Stored packets could starve, if there would not be interrupts to input node. This patch implements a process node which periodically sends interrupt to virtio input node given coalescing or buffering feature is enabled on an interface. Change-Id: Ic38f749f74b001073d4d0579dca149d0a4cea039 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-10-21virtio: improve input node performanceDamjan Marion1-13/+26
- Avoid feature arc lookup per packet, as all packets belong to the same interface - don't validate enqueue for l2 packets, as they all have same destionation Type: improvement Change-Id: I32ddd801f219eab9281736abafdc91a4ff9e0989 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-10-21virtio: move lock and kick to outer functionDamjan Marion1-31/+28
Type: improvement Change-Id: I4fdcb40142e8cc9f5f1d0035116659543d5d92fe Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-10-19virtio: fix compilation timeDamjan Marion1-30/+31
There is no need to inline 3 times virtio_refill_vring()... Type: fix Change-Id: Ic26e24fd7911af743fedd0e2282784b715e86c3c Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-10-17tap: replaces strlen to vec_lenMohsin Kazmi1-4/+4
Type: fix Change-Id: I478b6fc54c47f0e77a1470ed29fdd56774671441 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-10-12misc: clang-11 and gcc-10 supportDamjan Marion1-1/+1
clang-11 complains: error: field 'buffer_template' with variable sized type 'vlib_buffer_t' not at the end of a struct or class is a GNU extension [-Werror,-Wgnu-variable-sized-type-not-at-end] Type: improvement Change-Id: I2cb6b4fde723a05b42cf33dd8130df074f0362ab Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-10-08interface: shorten vnet_hw_if_rx_modeDamjan Marion9-44/+41
This is part of bigger refactor. Type: refactor Change-Id: I6fc2c0a1e2d217a70952901bcf775b8485bd3c20 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-10-08virtio: fix the traceMohsin Kazmi1-23/+19
Type: fix This patch fixes the commit e347acbc31111504c015531e8ad764a86d489309 Change-Id: Icee7a6e250c94ae93e606d7869acc55c7a5806b1 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-09-29virtio: fix modern device queue notifyMohsin Kazmi5-22/+53
QUEUE_SELECT and QUEUE_NOTIFY_OFF registers are shared between all workers operating on the same device and operations are not atomic Type: fix Change-Id: Ie017b1bfc7e3b6b4e59029f45db78eeffd9f3aeb Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-09-28virtio: add packet buffering on txMohsin Kazmi10-15/+386
Type: feature This patch adds packet buffering on tx for slow backend which have some jitter/delays in freeing the vrings. There are some limitations to the current design: 1) It only works in poll mode. 2) Atleast 1 rx queue of an interface (with buffering enabled) should be placed on each worker and main thread. Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> Change-Id: Ib93c350298b228e80426e58ac77f3bbc93b8be27
2020-09-28virtio: fix the gro enable/disable on tx-vringsMohsin Kazmi4-10/+23
Type: fix Change-Id: I96c30baaf34fe7b0cd899966a507501e58cde934 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-09-24virtio: refactor tx traceMohsin Kazmi1-33/+37
Type: refactor Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> Change-Id: I37fef2c32d0561b944b201a1012b87c7ac315e73
2020-09-18tap: do not use strlen on vectorVladimir Isaev1-2/+1
sanitizer complains about strlen on hi->name in tap_dump_ifs. hi->name is a vector which is not null-terminated, so use vec_len. Type: fix Signed-off-by: Vladimir Isaev <visaev@netgate.com> Change-Id: Icdd5f65369bb51b0c4a9cd86c24899e6febd837c
2020-09-18virtio: fix txq lockingBenoît Ganne2-2/+6
Initialize txq lock only if some txq are shared and check if another worker is already operating on the txq before processing gro timeouts in input node. Type: fix Change-Id: I89dab6c0e6eb6a7aa621fa1548b0a2c76e6c7581 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-09-16misc: fix the formatting styleMohsin Kazmi1-6/+8
Type: style Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> Change-Id: Id86e16677564669b0295bbb9fc1303fe39a21b6f
2020-09-16api: clean up use of deprecated flagOle Troan1-2/+2
The syntax of the deprecated flag has evolved. Clean up usage to be "option deprecated;". Type: fix Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: If2b639f275eb8db58b36c457f9245fe35a4d8cb1
2020-09-11build: fix build for Debian 9 and Debian 10Benoît Ganne2-7/+13
Type: fix Change-Id: Ic07d0ae313b32e420ba93693cb75960a86f752a9 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-09-09interface: support configuring RSS steering queuesChenmin Sun1-2/+0
This patch adds the RSS steering queues set interface, and it's implementation in DPDK device: /* Interface to set rss queues of the interface */ typedef clib_error_t *(vnet_interface_rss_queues_set_t) (struct vnet_main_t * vnm, struct vnet_hw_interface_t * hi, clib_bitmap_t *bitmap); This patch also introduces a command line to set the RSS queues: set interface rss queues <interface> <list <queue-list>> To display the rss queues, use "show hardware-interfaces" Below is the example to configure rss queues for interface Gig0: vpp# set interface rss queues Gig0 list 0,2,4-7 vpp# show hardware-interfaces brief Name Idx Link Hardware VirtualFunctionEthernet18/1/0 1 down VirtualFunctionEthernet18/1/0 Link speed: unknown RSS queues: 0 2 4 5 6 7 local0 0 down local0 Link speed: unknown vpp# Users can also configure the rss queues on a dpdk interface in startup.conf: dpdk { dev 0000:18:01.0 { rss-queues 0,2,5-7 } } Type: feature Signed-off-by: Chenmin Sun <chenmin.sun@intel.com> Change-Id: I1835595a1c54016a84eabee9fd62ce137935385d
2020-09-04virtio: remove kernel virtio header dependenciesMohsin Kazmi17-393/+478
Type: refactor tap, virtio and vhost use virtio/vhost header files from linux kernel. Different features are supported on different kernel versions, making it difficult to use those in VPP. This patch removes virtio/vhost based header dependencies to local header files. Change-Id: I064a8adb5cd9753c986b6f224bb075200b3856af Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-09-02tap: add the static assert for api flagsMohsin Kazmi1-0/+19
Type: improvement Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> Change-Id: Ia1276d00dded36ee28b4b2e93b4cc7c1df6b1eef
2020-09-02virtio: add virtio 1.1 api flagsMohsin Kazmi3-1/+119
Type: feature Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> Change-Id: I95d7fc1cc8db5199570c66535f45e867a7cae676
2020-09-02tap: add virtio 1.1 API flagMohsin Kazmi3-2/+10
Type: feature Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> Change-Id: I3e00deb94943c545d1649865b2efdf7d51b90f4d
2020-09-01virtio: fix the bar starting indexMohsin Kazmi1-1/+1
Type: fix Change-Id: Ia28161b583ea26ab820a494332a79b64add7004d Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-09-01virtio: fix the NULL deferenceMohsin Kazmi1-1/+2
Type: fix Change-Id: I8d55c2bfdd3c4607044370ebabf40cbac78b4996 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
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 Kazmi8-14/+87
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-07tap: fix the tun sndbuf value for kernel 4.20 and laterMohsin Kazmi1-4/+16
Type: fix From kernel 4.20, xdp support has been added in tun_sendmsg. If sndbuf == INT_MAX, kernel executes xdp data path for tun driver which assumes packets are ethernet frames. This patch is avoiding the xdp data path in kernel by setting the sendbuf value < INT_MAX. Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> Change-Id: Ia4aa54b177b96d56a2d513d18d26ca01d5b88929
2020-07-02tap: fix dump for TUN interfacesMohsin Kazmi2-1/+5
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-27tap: remove the bridge configurations for TUN interfaceMohsin Kazmi1-9/+10
Type: fix Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> Change-Id: Ifeae641ec0aa7de74e33e582234505bf6e28ca87
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-06-09tap: enable gso/csum offload for tunMohsin Kazmi1-7/+0
Type: improvement Change-Id: I5b9d5ea192776f14a45bf909acc4bef7793521e8 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-05-29docs: Minor updates to feature.yaml filesJohn DeNisco2-6/+8
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-27ethernet: fix DMAC check and skip unnecessary ones (VPP-1868)John Lo1-1/+1
Fix and optimize DMAC check in ethernet-input node to utilize NIC or driver which support L3 DMAC-filtering mode so that DMAC check can be bypassed safely for interfaces/sub-interfaces in L3 mode. Checking of interface in L3-DMAC-filtering state to avoid DMAC check require the following: a) Fix interface driver init sequence for devices which supports L3 DMAC-filtering to indicate its capability and initialize interface to L3 DMAC-filtering state. b) Fix ethernet_set_flags() function and its associated callback flags_change() functions registered by various drivers in interface infra to provide proper L3 DMAC filtering status. Maintain interface/sub-interface L3 config count so DMAC checks can be bypassed if L3 forwarding is not setup on any main/sub-interfaces. Type: fix Ticket: VPP-1868 Signed-off-by: John Lo <loj@cisco.com> Change-Id: I204d90459c13e9e486cfcba4e64e3d479bc9f2ae
2020-05-05gso: add support for IP-IPMohsin Kazmi2-11/+21
Type: feature Change-Id: I37752af8496e0042a1da91124f3d94216b39ff11 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>