summaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk/device
AgeCommit message (Collapse)AuthorFilesLines
2018-05-21dpdk:enable flow director perfect modeEyal Bari3-4/+25
when flows are enabled on the device Change-Id: I971764988d5a9e7078468f627205b3fa60736263 Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-05-18Add vlib_buffer_enqueue_to_next inline functionDamjan Marion1-75/+3
Change-Id: I1042c0fe179b57a00ce99c8d62cb1bdbe24d9184 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-05-17Add buffer pointer-to-index and index-to-pointer array functionsDamjan Marion2-106/+7
Change-Id: Ib3fcc3ceb7f315389bcdecbb7d9632540a5dd6ba Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-05-17flow:redirect to nodeEyal Bari1-2/+1
Change-Id: I4b6577b496c56f27f07dd0066fcfdfd0cebb6f1a Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-05-16dpdk: fix rte_eth_dev_set_mtu callsites to use same mtu valueRui Cai1-1/+1
During dpdk_lib_init, it calculates MRU and MTU and later calls rte_eth_dev_set_mtu with calculated MTU value. However, dpdk_device_setup calls rte_eth_dev_set_mtu with hi->max_packet_bytes, which is set to be MRU value in dpdk_lib_init earlier. Most of the time, MRU != MTU in dpdk_lib_init and it looks like hi->max_packet_bytes is treated as MTU in other parts of vpp codebase. Therefore, dpdk_lib_init should be consistent and use MTU instead of MRU for hi->max_packet_bytes. Change-Id: I23ff2a6cd45d6bc819b6f64d5f0fc0490b8a44de Signed-off-by: Rui Cai <rucai@microsoft.com>
2018-05-12dpdk: Add constants for failsafe PMDRui Cai2-2/+13
Adding name, enum constants and formatting code for failsafe PMD. This is part of initial effort to enable vpp running over dpdk on failsafe PMD in Microsoft Azure(2/4). Change-Id: I4eb0093db9f666e2635f7ddff451e3c9064bd0c4 Signed-off-by: Rui Cai <rucai@microsoft.com>
2018-05-11dpdk: fix Unknown interface with Mellanox NICSteve Shin1-1/+1
When port_type_from_speed_capa() is called before the port link update isn't completed, xd->port_type becomes VNET_DPDK_PORT_TYPE_UNKNOWN. This happens with Mellanox NIC without lsc interrupt. Calling rte_eth_link_get before getting dev_info will ensure the link state is up-to-date. Change-Id: I83a59654778eb4bf0c65a4a4e225a326227b9641 Signed-off-by: Steve Shin <jonshin@cisco.com>
2018-05-10vppinfra: use count_trailing_zeros in sparse_vec_indexDamjan Marion1-3/+3
It is much cheaper to use ctzll than to do shift,subtract and mask in likely case when we are looking for 1st set bit in the uword. Change-Id: I31954081571978878c7098bafad0c85a91755fa2 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-05-10vnet: device flow offload infraDamjan Marion5-0/+362
Change-Id: Ibea4a96bdec5e368301a03d8b11a0712fa0265e0 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-05-10dpdk:fix tx countEyal Bari1-1/+2
Change-Id: I921465ea64b59d42674cc8f19069ed04e3b25026 Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-05-09dpdk: fix free of tx dropped packetsFlorin Coras1-1/+1
Change-Id: I3669068f694614f8555b33bf0b703c41e45363ef Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-05-09dpdk: tx code reworkDamjan Marion3-261/+158
Change-Id: Ifea9c772e8784642433b92091f5769eb9ec06890 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-05-09dpdk:fix mbuf index typo'sEyal Bari1-4/+4
Change-Id: I387b22427b3f322969bcf32fcfc189123c8ed6ae Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-05-07dpdk: improve perf of buffer indices calc in the input nodeDamjan Marion1-34/+53
Change-Id: I16557189aa4a763ec496cb4a45f6e12f2d46971f Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-05-04Harmonize vec/pool_get_aligned object sizes and alignment requestsDave Barach1-0/+5
Object sizes must evenly divide alignment requests, or vice versa. Otherwise, only the first object will be aligned as requested. Three choices: add CLIB_CACHE_LINE_ALIGN_MARK(align_me) at the end of structures, manually pad to an even divisor or multiple of the alignment request, or use plain vectors/pools. static assert for enforcement. Change-Id: I41aa6ff1a58267301d32aaf4b9cd24678ac1c147 Signed-off-by: Dave Barach <dbarach@cisco.com>
2018-04-27A bit of buffer metadata reshuffling to accommodate flow_idDamjan Marion1-1/+1
Change-Id: I2794384557c6272fe217269b14a9db09eda19220 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-04-25dpdk: complete rework of the dpdk-input nodeDamjan Marion7-465/+556
Change-Id: If174d189de40e6f9ffae99997bba93a2519d9fda Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-04-18dpdk: improve loggingDamjan Marion4-35/+187
- use of vlib_log for non-dataplane logging - redirect of dpdk logs trough unix pipe into vlib_log - "show dpdk physmem" cli Change-Id: I5da70f9c130273072a8cc80d169df31fc216b2c2 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-04-18dpdk: resurrect removed code [VPP-1245]Steven1-0/+4
https://gerrit.fd.io/r/#/c/7701/ accidentally removed 3 lines of code in dpdk/device/init.c which were added by https://gerrit.fd.io/r/#/c/7826/ case VNET_DPDK_PMD_VHOST_ETHER: xd->port_type = VNET_DPDK_PORT_TYPE_VHOST_ETHER; break; Those lines were needed to recognize vhost-user interface which is created via vdev command in dpdk and display VhostEthernet. Without them, UnknownEthernet is displayed. Change-Id: I6d7ee6aecc6a415fbb7308595d515649475bcd5f Signed-off-by: Steven <sluong@cisco.com>
2018-04-17dpdk: add additional fields to rte_mbuf trace printDamjan Marion1-2/+5
Change-Id: I3792c524323ce9e300648abe85454cff5d19aba7 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-04-17dpdk: print device flags in the 'show hardware' outputDamjan Marion2-11/+37
Change-Id: I0d10f13a56420b119fdfad97dcc135b245c269e1 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-04-13Revert "MTU: Setting of MTU on software interface (instead of hardware ↵Damjan Marion1-14/+14
interface)" This reverts commit 70083ee74c3141bbefb185525315f1b34497dcaa. Reverting as this patch is causing following crash: 0: /home/damarion/cisco/vpp3/build-data/../src/vnet/devices/devices.h:131 (vnet_get_device_input_thread_index) assertion `queue_id < vec_len (hw->input_node_thread_index_by_queue)' fails Aborted Change-Id: Ie2a365032110b1f67be7a9d832885b9899813d39 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-04-13MTU: Setting of MTU on software interface (instead of hardware interface)Ole Troan1-14/+14
Change-Id: I98bd454a761a1032738a21edeb0fe847e801f901 Signed-off-by: Ole Troan <ot@cisco.com>
2018-04-04dpdk:fix checksum handling of l2 interfacesEyal Bari1-17/+19
dpdk-input was dropping packets with bad ip-checksum on l2 interfaces Change-Id: Ife5b52766bb71e878b1da6e94ae7b8a1e59fc478 Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-03-30dpdk: fix crash due to incorrect xd->flags value with slave's link togglingSteve Shin1-2/+5
xd->flags is set incorrectly when a slave link is down in bonded interface mode. This can result in VPP crash when data traffic flows to the interface. Change-Id: Ideb9f5231db1211e8452c52fde646d681310c951 Signed-off-by: Steve Shin <jonshin@cisco.com>
2018-03-22VPP-1204: Fix coverity warningDave Barach1-2/+5
Change-Id: Iacb32e6e855f7b77108154d956ef27ee141bbde0 Signed-off-by: Dave Barach <dave@barachs.net>
2018-03-14Prevent calling rte_eth_xstats_get not initialized devSzymon Sliwa1-0/+2
DPDK API forbids calling rte_eth_xstats_get on a port which has not been setup up yet. Citing the DPDK docs (reformated): " The functions exported by the application Ethernet API to setup a device designated by its port identifier must be invoked in the following order: rte_eth_dev_configure() rte_eth_tx_queue_setup() rte_eth_rx_queue_setup() rte_eth_dev_start() Then, the network application can invoke, in any order, the functions exported by the Ethernet API to get the MAC address of a given device, to get the speed and the status of a device physical link, to receive/transmit [burst of] packets, and so on. " original can be found here: http://dpdk.org/doc/api/rte__ethdev_8h.html#a36ba70a5a6fce2c2c1f774828ba78f8d Change-Id: I91854b8b0dd12dd028b4b36665cca49f16eac24c Signed-off-by: Szymon Sliwa <szs@semihalf.com>
2018-03-11dpdk-input node packet trace intermittent on IP forwading pathJohn Lo1-36/+37
Packet trace initiated by dpdk-input node would occasionally not fully function if next node is ip4-input. Change packet trace saving order in the quad-loop so "sho trace" will display trace in packet receive order. Fold calling of vlib_trace_buffer() into dpdk_add_trace(). Change-Id: I9d7a9bf3b9391f95590e66150b26b0b15912d803 Signed-off-by: John Lo <loj@cisco.com>
2018-03-09Coordinate known Ethernet speeds with Linux kernel and DPDKLee Roberts3-0/+43
Linux kernel and DPDK recognize the following Ethernet speeds: 10M, 100M, 1G, 2.5G, 5G, 10G, 20G, 25G, 40G, 50G, 56G and 100G. Add consistent Ethernet speeds to VPP. Change-Id: I4cfcf378fb34425c1206db5aa2f6bdcc66e0a6ab Signed-off-by: Lee Roberts <lee.roberts@hpe.com>
2018-02-26vnet: add 25G interface speed flagDamjan Marion1-0/+6
Change-Id: I1d3ede2b043e1fd4abc54f540bb1d3ac9863016e Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-02-23Disable scatter-gather for ENAMatthew Smith1-0/+1
ENA doesn't support scatter-gather. The PMD started failing rte_eth_dev_rx_queue_config() in DPDK 18.02 if the flag to enable it is set. Turn the flag off in dpdk_lib_init(). Change-Id: Ifdd9f188c89b46efe82412c75fb935a92436da1c Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2018-02-19dpdk: Fix MTU calc for NICs that support mtu<9216Nitin Saxena1-34/+66
Problem: rte_eth_dev_set_mtu() returns with failure from ThunderX NICVF DPDK PMD driver which supports MTU less than ETHERNET_MAX_PACKET_BYTES. rte_eth_dev_set_mtu() being called twice from dpdk_lib_init(): one via dpdk_device_setup() and second in dpdk_lib_init() itself. Currently dpdk_lib_init() passes vnet_hardware_interface->max_packet_bytes as an argument to rte_eth_dev_set_mtu() without consulting dev_info.max_rx_pktlen. NICs like i4oe, ixgbe can support MTU much greater than 9216 hence its not a problem for those NICS. Fix: This patch calculates dpdk_device->port_conf.rxmode.max_rx_pkt_len, vnet_hardware_interface->max_packet_bytes and MTU by consulting dev_info.max_rx_pktlen. Change-Id: If04bbfae49ee971dac0063ff1835e4a9c3087865 Signed-off-by: Nitin Saxena <nitin.saxena@cavium.com>
2018-02-15dpdk: add support for DPDK 18.02, deprecate 17.08Damjan Marion2-10/+0
17.11 is still default. Change-Id: I524d232579db8a59c717c5d760398b6b7f811d03 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-02-12dpdk:fix trace to follow feature arcEyal Bari3-87/+66
Change-Id: Icd2184dec16d30cdcc689ca37c834b5df2f0a1a3 Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-02-07Refactor vlib_buffer flagsDamjan Marion2-12/+0
Change-Id: I853386aebfe488ebb10328435b81b6e3403c5dd0 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-02-01dpdk:fix typo in prefetch sequenceEyal Bari1-2/+2
Change-Id: I7110436626352d45ffe0ca71fb88dea2c77ab639 Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-01-09Patch ENA PMD to skip setting tx flags in rx pathMatthew Smith1-1/+1
On rx, the ENA PMD sets tx offload flags based on the received packet's l4 protocol. This means you need to turn off those offloads for every packet if you encapsulate packets arriving on an interface using that PMD. Disable this behavior. Change-Id: Icae9f32e3d292d767da440ae5c1280902bdaa083 Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2017-12-16dpdk: unset ETH_TXQ_FLAGS_NOXSUMS only for selected PMDsDamjan Marion1-5/+8
Change-Id: I1699e440052faa317b06d46692e8656a41d21bfe Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-12-14pci: auto-detect right vfio/uio driverDamjan Marion1-1/+1
Change-Id: Ib4012ff598698924484525932d041988cc4c63f6 Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-12-14Enable AWS ENA PMDMatthew Smith3-1/+13
Elastic Network Adapter PMD for newer AWS instance types Change-Id: Ic7f6ac4a261ccc7af3ffb2ed8950274532e3feae Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2017-12-09vlib: PCI rework to support VFIODamjan Marion1-9/+23
Also fixes old ixge driver, so it works with recent physmem changes and vfio. Change-Id: Id4be74b34daed47cd281a77eec43d6692340d882 Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-12-05dpdk:remove duplicate codeEyal Bari1-11/+8
unify code from both branches Change-Id: Iae7325cff8c799c7827727ad7465bec089e39f50 Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-12-04dpdk: remove unused "use_rss" flagEyal Bari2-7/+0
Change-Id: I31d2cbb02a0f59603ef1adc0d185e3d775dfda2f Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-12-04dpdk: remove duplicate functionEyal Bari1-32/+1
dpdk_rx_next_from_packet_start is equivalent to dpdk_rx_next_from_etype and seems to have no side effects Change-Id: I629dadfbfb35ad1f5c7198e7824883ae4bd6abaa Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-12-04dpdk: remove unused cached eth input nodeEyal Bari2-10/+0
Change-Id: Ic43c70bfe3e93cb3e6cfab7cda1986e44e371c06 Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-11-28net/virtio: support modern device idGabriel Ganne1-1/+3
Add legacy and modern macros to pci_config header. This follows dpdk commit: 4c7903658f6b5a8f4901224ef405445541b91e4a And PCI Device Conformance doc : docs.oasis-open.org/virtio/virtio/v1.0/cs02/virtio-v1.0-cs02.html#x1-640001 Change-Id: Iacd40ea8c06f220736ca0bc7ce68bcf1e55b68f6 Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
2017-11-27dpdk: fix issue when tx offload stops working after MTU changeDamjan Marion2-19/+4
Change-Id: I3713b4c460a3cd414b560e16aac054aee2e1181b Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-11-24dpdk: enable tx checksum offloads as default, add disable knobDamjan Marion2-2/+11
New startup.conf knob: dpdk { ... no-tx-checksum-offload ... } Change-Id: I337fd57616dd77687300861b411b420a3cb75149 Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-11-21dpdk: add l2_hdr_offset and l3_hdr_offset in vlib_buffer_tDamjan Marion3-60/+60
Change-Id: I0a6d1257e391c3b6f7da6498bd5f7d4c545d17e9 Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-11-20dpdk: add support for DPDK 17.11Damjan Marion4-29/+30
Also remove DPDK 17.05 support. Change-Id: I4f96cb3f002cd90b12d800d6904f2364d7c4e270 Signed-off-by: Damjan Marion <damarion@cisco.com>