aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/devices
AgeCommit message (Collapse)AuthorFilesLines
2020-02-18devices: netlink: add more error loggingMohsin Kazmi1-10/+50
Type: improvement Change-Id: I4d8ca04840845e1ba631e4260e155df2486155e6 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-02-15tap: fix the default parameter for num_rx_queuesMohsin Kazmi1-9/+3
Type: fix Change-Id: I1a20fea56f1ba1fada7c7ce96ea333bf097b1273 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-30misc: deprecate netmap and ixge driversDamjan Marion10-2148/+0
Both are out of sync for long time... Type: refactor Change-Id: I7de3170d35330fc172501d87655dfef91998b8fe Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-01-30tap: fix host mtu configuration settingMohsin Kazmi1-12/+13
host mtu can't be set if tap interface is in namespace. This patch fixes this issue. Type: fix Change-Id: I63811c4b56c708fe708061a8afbaec41994f08ca Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-01-30tap: fix the host mac addressMohsin Kazmi3-20/+11
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-10docs: Edit FEATURE.yaml files so they can be publishedJohn DeNisco1-1/+1
Type: docs Signed-off-by: John DeNisco <jdenisco@cisco.com> Change-Id: I7280e5c5ad10a66c0787a5282291a2ef000bff5f
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 Kazmi5-19/+108
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-11devices: tap API cleanupJakub Grajciar5-93/+128
Use consistent API types. Type: fix Change-Id: I11cc7f6347b7a60e5fd41e54f0c7994e2d81199f Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2019-12-10api: multiple connections per processDave Barach6-6/+6
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 Kazmi4-17/+1
Type: refactor Change-Id: I51405b9d09fb6fb03d08569369fdd4e11c647908 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-11-25tap: fix coverity warning 205875Andrew Yourtchenko1-1/+6
check the return result from fcntl, and if error, behave the same way the expansion of _IOCTL macro does. Type: fix Change-Id: I6d537d1bdedae64470612aef64b46e07387fe84b Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2019-11-20tap: multiqueue supportDamjan Marion5-161/+261
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>
2019-11-13virtio: feature arc have higher priority than redirectDamjan Marion1-3/+4
Type: fix Fixes: 8389fb9 Change-Id: Ie159eb444b28b36a7af86049b80fba4e49be93cb Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-11-12tap: Move client registration check to topPaul Vinciguerra2-9/+14
Type: fix Change-Id: I33dc4cf7b6c69f74c7bf4971ce59442678b878ef Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-11-12virtio: remove unused codeDamjan Marion1-4/+0
Type: refactor Change-Id: I25f1cc3969c6a6ec1384079dc437537acd2ec152 Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-11-08tap: add check for vhost-net backendDamjan Marion1-0/+9
Type: feature Change-Id: I402f4c88dee70fbb0b3b61dc4e0a4034d24d8b56 Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-11-08tap: fix cli parserDamjan Marion1-4/+5
Type: fix Change-Id: I38ee9efd23774cce7790565825527cca9ba6f200 Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-11-06build: add yaml file linting to make checkstylePaul Vinciguerra5-7/+24
Type: feature fts and trex rely on yaml config files. Verify that they are valid, so comitters can catch errors early. Change-Id: Ide0bb276659119c59bdbbc8b8155e37562a648b8 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-10-30docs: devices-- add FEATURES.yamlPaul Vinciguerra15-17/+65
Type: docs Change-Id: I039ba9ad5385452b202366fba0b367506a21ea4f Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-10-23devices: vhoost cpu->copy array overflow on tcp jumbo frame (65535 bytes)Steven Luong2-2/+8
We reserve 40 slots in cpu->copy array prior to copy out to avoid overflowing the array. However, 40 is not enough for the jumbo frame because desceiptor buffer len is likely at 1536. Change the reserve to 200 and add ASSERT to avoid encountering the same problem in the future. Type: fix Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: Ibf0c03c4b4f33e781d5be8679ccd6c3a4b4a646d
2019-10-07devices: vhost not reading packets from vringSteven Luong2-0/+25
In a rare event, after the vhost protocol message exchange has finished and the interface had been brought up successfully, the driver MAY still change its mind about the memory regions by sending new memory maps via SET_MEM_TABLE. Upon processing SET_MEM_TABLE, VPP invalidates the old memory regions and the descriptor tables. But it does not re-compute the new descriptor tables based on the new memory maps. Since VPP does not have the descriptor tables, it does not read the packets from the vring. In the normal working case, after SET_MEM_TABLE, the driver follows up with SET_VRING_ADDRESS which VPP computes the descriptor tables. The fix is to stash away the descriptor table addresses from SET_VRING_ADDRESS. Re-compute the new descriptor tables when processing SET_MEM_TABLE if descriptor table addresses are known. Type: fix Ticket: VPP-1784 Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I3361f14c3a0372b8d07943eb6aa4b3a3f10708f9 (cherry picked from commit 61b8ba69f7a9540ed00576504528ce439f0286f5)
2019-09-25devices: pipe API cleanupJakub Grajciar1-7/+9
Use consistent API types. Type: fix Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com> Change-Id: Ifd62207048d125bec18b3a728590ac540dcafe5e
2019-09-25fib: fix some typos in fib/mtrieLijian.Zhang1-1/+1
Type: fix Change-Id: I1af0e4a9bc23a3b6b6d3a74df093801ab6cae1f8 Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com>
2019-09-24vlib: add flag to explicitelly mark nodes which can init per-node packet traceDamjan Marion4-0/+4
Type: feature Change-Id: I913f08383ee1c24d610c3d2aac07cef402570e2c Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-09-12devices: af_packet API cleanupJakub Grajciar3-24/+29
Use consistent API types. - fix af_packet_dump dumping deleted interface Type: fix Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com> Change-Id: Ie8d138e30c8c51a2306bb2ad9ac0b7a49d5412bf Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2019-09-06tap: revert clean-up when linux will delete the tap interfaceMohsin Kazmi2-43/+0
Type: fix Ticket: VPP-1766 revert e4ac48e792f4eebfce296cfde844ee73b1abd62f Change-Id: I03feea4008a47859d570ad8d1d08ff3f30d139ef Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> (cherry picked from commit 623a1b7053424b539a51faf866ab839d3da3f45b)
2019-09-03tap: fix tap interface not working on Arm issueLijian.Zhang1-1/+6
The VPP code tries to set all userspace memory in the table via IOCTL to VHOST_SET_MEM_TABLE. But on aarch64, the userspace address range is larger (48 bits) than that on x86 (47 bits). Below is an segment from /proc/[vpp]/maps. fffb41200000-fffb43a00000 rw-s 00000000 00:0e 532232 /anon_hugepage (deleted) Instead of setting all userspace memory space to vhost-net, will only set the address space reserved by pmalloc module during initialization. Type: fix Change-Id: I91cb35e990869b42094cf2cd0512593733d33677 Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com> Reviewed-by: Steve Capper <Steve.Capper@arm.com>
2019-09-02tap: interface rx counter not increment correctSteven Luong1-1/+1
vlib_increment_combined_counter takes sw_if_index, not hw_if_index. Using hw_if_index may work as long as there is no subinterface created to cause hw_if_index and sw_if_index to differ. Type: fix Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I6db042186eeeacf32250f7ef261af8cd6f5ce56e
2019-08-30devices: fix issue of per_interface_next_indexMichael Yu1-3/+4
Per interface, next hop graph node can be customized with vnet_hw_interface_rx_redirect_to_node function, but it doesn't work well for af-packet type interface. In current implementation, with function af_packet_set_interface_next_node invoked next hop graph node index can be set to apif->per_interface_next_index, but it's not set to next0 properly for packet processing in af_packet_device_input_fn. Type: fix Signed-off-by: Michael Yu <michael.a.yu@nokia-sbell.com> Change-Id: I8e132ddd1c3c01b6f476de78546d4a9389b3ff87 Signed-off-by: Michael Yu <michael.a.yu@nokia-sbell.com>
2019-08-19devices: skip checksum calculation if guest supports checksum offloadSteven Luong1-3/+7
Set VNET_HW_INTERFACE_FLAG_SUPPORTS_TX_L4_CKSUM_OFFLOAD for the interface to skip checksum calculation if guest supports checksum offload. Type: fix Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: Ie933c3462394f07580ef7f2bec1d2eb3b075bd0c
2019-08-17gso: fix l3 and l4 header offset in case of tagged interfaceMohsin Kazmi1-0/+14
previously, PG and virtio interfaces calculate wrong l3 and l4 header offset. This patch fixes this issue. Type: fix Ticket: VPP-1739 Change-Id: I5ba978e464babeb65e0711e1027320d46b3b9932 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-08-16devices: vhost-user crashes displaying show trace for deleted interfaceSteven Luong1-6/+10
After the trace is collected and if the interface is then deleted, show trace may crash for the debug image. This is due to the additional check in pool_elt_at_index() to make sure that the block is not free. The fix is to do the check in vhost format trace and return "interface deleted" Type: fix Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I0744f913ba6146609663443f408d784067880f93
2019-08-16gso: remove the ip checksum flag in case of ipv6Mohsin Kazmi1-1/+0
Type: fix Ticket: VPP-1727 Change-Id: Icfee35c5ab5e1c65079d1ca7bb514162319113e5 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-08-02devices: add null check after map_guest_mem callsSteven Luong1-2/+16
map_guest_mem may return null. Coverity complains about calls without checking its return. Simple stuff. Type: fix Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I0626115f4951a88f23d9792f0232fb57c132fbc2
2019-08-02virtio: add the display information in virtio cliChenmin Sun2-2/+2
Type: fix 1. Add option '[gso-enabled]' in cli 'create interface virtio' 2. Add gso information in virtio_show() Change-Id: I4eb58f4421325ef54a6a68c8341b3a6d3d68136a Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
2019-07-31devices interface tests: vhosst GSO supportSteven Luong7-19/+296
Add gso option in create vhost interface to support gso and checksum offload. Tested with the following startup options in qemu: csum=on,gso=on,guest_csum=on,guest_tso4=on,guest_tso6=on,guest_ufo=on, host_tso4=on,host_tso6=on,host_ufo=on Type: feature Change-Id: I9ba1ee33677a694c4a0dfe66e745b098995902b8 Signed-off-by: Steven Luong <sluong@cisco.com>
2019-07-30tap: fix segv when host-if-name is not givenMohsin Kazmi1-8/+10
Type: fix Fixes: c30d87e6139c64eceade54972715b402c625763d Change-Id: I86b606b18ff6a30709b7aff089fd5dd00103bd7f Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>