aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/devices
AgeCommit message (Collapse)AuthorFilesLines
2020-12-11virtio: fix vrings overflow in vhost_userBenoît Ganne1-1/+10
Type: fix Change-Id: I7ca955882c0e263a9ace4b14021e51488564e411 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-12-04virtio: fix the interrupt handling for packed queuesMohsin Kazmi1-5/+25
Type: fix Change-Id: I2cc1cfd519e5b3502c59cf72e95e454f9122b8e5 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-12-04virtio: fix the len offsetMohsin Kazmi1-2/+2
Type: fix Change-Id: I8ce1df5c97941fb645b33476db9cfc74f1395b15 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-12-03virtio: fix the offloads in tx pathMohsin Kazmi1-4/+2
Type: fix Change-Id: I1f1f0b6e8c5ef8bc9f2aca4bdc78e89fa951b841 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-11-23virtio: fix overflow in case of buffering + dropBenoît Ganne1-1/+0
Type: fix Fixes: 2e6f624f1f82ae0351dd05ad5d930d6876105519 Change-Id: Ib41c82ea1e8430afc920250fb0d054a2fb2d08c9 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-11-17virtio: virtio: implement packed queues from virtio 1.1Mohsin Kazmi8-135/+1037
Type: feature Change-Id: I12703371541298efa029903d6762b1cd1f7322ca Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-11-12devices: remove unused codeDamjan Marion1-7/+0
Type: refactor Change-Id: I3f561818bc7c221f676477a52c7c7781624c185a Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-11-12virtio: fix the index issueMohsin Kazmi1-7/+15
Type: fix Fixes: 587f9130424fd451e4ba823240d02f655fb197d1 Change-Id: I230993a54c84e22e324de2a8defeda83c517d733 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-11-09vlib: fix trace number accountingBenoît Ganne3-19/+20
When using classifier to filter traces, not all packets will be traced. In that case, we should only count traced packets. Type: fix Change-Id: I87d1e217b580ebff8c6ade7860eb43950420ae78 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-11-09tap: add function to set speedAlexander Chernavin2-1/+83
A plugin can set the speed on a host interface making it possible for host applications to be aware of the actual interface speed, not the one that the driver reports by default. With this change, add a function to set speed on a host interface. Type: feature Signed-off-by: Alexander Chernavin <achernavin@netgate.com> Change-Id: I259a52b736022bdd805e8d92dcd1bfd5c58f6f96
2020-11-05tap: allow change of carrier state on hostMatthew Smith4-0/+45
Type: feature Add a function to adjust the link state of the host side of a tap interface. If an application (e.g. route protocol daemons) running on the host uses netlink to monitor interface state, a plugin could use this function to communicate a loss of connectivity to the application by making the interface appear to go down. Requires a somewhat recent kernel. E.g. it does not have any effect on CentOS 7 but it works on CentOS 8. Change-Id: I677ee7889d2eb142e2395bea98f0b4d7e7e7f810 Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2020-11-05virtio: misc optimizationsDamjan Marion1-35/+41
Type: improvement Change-Id: Iaf98a60e37dd28828feca365b8fdc5d2f7ae6935 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-11-05virtio: move retry logic to outer functionDamjan Marion1-8/+9
Improves compile time.... Type: improvement Change-Id: I310a2e55e5e488a953d65fd065f7795a43d2e9a7 Signed-off-by: Damjan Marion <damarion@cisco.com>
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>