summaryrefslogtreecommitdiffstats
path: root/src/plugins/avf/device.c
AgeCommit message (Collapse)AuthorFilesLines
2020-10-09avf: add add_del_mac_address handlerDamjan Marion1-31/+72
Type: improvement Change-Id: I4d0b1cd87cf2f58a653f40a300da4b7a43348a06 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-10-08interface: shorten vnet_hw_if_rx_modeDamjan Marion1-2/+2
This is part of bigger refactor. Type: refactor Change-Id: I6fc2c0a1e2d217a70952901bcf775b8485bd3c20 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-09-30avf: check duplicate pci address upon create interfaceSteven Luong1-0/+13
Entering duplicate pci address when creating an avf interface causes crash in register_node (gdb) f 4 145 error_exit (1); (gdb) up 354 clib_error ("more than one node named `%v'", n->name); (gdb) p n $1 = (vlib_node_t *) 0x7fffbbe55de4 (gdb) p n->name $2 = (u8 *) 0x7fffbc410b10 "avf-0/4/a/0-tx" (gdb) The fix is to loop through the pci addresses in the avf interface pool and to reject the duplicate. Type: improvement Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I4ed6fb630fb11982d85c5bb325d9f0d6beeaf023
2020-09-29avf: validate queue size configSteven Luong1-11/+39
Check CLI queue size is within the range of 64 and 4096 Enhance show hardware to display queue size and number of queues. Type: improvement Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I360e3cdb2e69e4ea7380ed924e71a5ae84ed4b64
2020-09-16avf: wrong argument passed to avf_log_errSteven Luong1-1/+1
Type: fix Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: Ica4601c9d17e182cbc348989a9f75ab1cb18b78a
2020-09-11avf: add assert to ensure that adminq is used only from avf processDamjan Marion1-0/+5
Type: improvement Change-Id: Ib64c9b8207776986656e5a26c13a221edc6cc950 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-09-11avf: change promisc mode from the avf process nodeDamjan Marion1-7/+24
Avoid situations where promisc mode is chaged while avf process is suspended in the middle of adminq operation. Type: fix Change-Id: Ia1fc6551e83218b5938630ad3a15d4f3f0ceceff Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-09-11avf: fix race between avf and cli/api processDamjan Marion1-24/+31
device pool my grow during suspemd which will cause crash in avf process after it exits from suspend. Type: fix Change-Id: I51fec90088c909cfbaaca6c245272a28c0827ca0 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-09-11avf: fix race between avf process node and avf_delete_if(...)Damjan Marion1-7/+24
It may happen that process node is suspended while it waits for response from adminq and during that time CLI or API process can call avf_delete_if. When avf process node resumes, it may happen that device is not there anymeore. This patch delegates interface deletion to process node, so CLI/API process just sends signal instead of deleting device instance itself. Type: fix Change-Id: I7f12e12df3071650f6e60ad7eb5af23b7acfe335 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-05-27ethernet: fix DMAC check and skip unnecessary ones (VPP-1868)John Lo1-16/+27
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-22avf: interrupt mode, support for WB_ON_ITRDamjan Marion1-56/+100
Type: improvement Change-Id: I5c944c3f82e0f278b64f28e09a74f24514c029f0 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-05-22avf: improve link speed handlingDamjan Marion1-34/+36
Support VIRTCHNL_VF_CAP_ADV_LINK_SPEED. Type: improvement Change-Id: Ie45c9d557d0369464cbb6881ee1259ef3807d7d5 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-03-24avf: proper promisc handlingDamjan Marion1-6/+25
Type: fix Change-Id: Id20a0fe77372602fd211156ccee01c18d829d8df Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-10-23avf: improve timeout handlingJakub Grajciar1-18/+40
Type: feature Change-Id: I8fa1d691ef7bc51ae5c44c344195207ce7d0a2e7 Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-09-04avf: reduce default ITR intervalDamjan Marion1-1/+1
Type: fix Fixes: b4ff07a Change-Id: I361ec71944048734b73eec700e32531fb070194e Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-08-22avf: properly set irq queue masksDamjan Marion1-1/+2
Type: fix Fixes: ae91180 Change-Id: I9c55c3fdf41089d337b998e2e28abb23d81525ef Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-08-21avf: fix init when num_rx_queues > num_tx_queuesDamjan Marion1-4/+4
Type: fix Fixes: ae91180 Change-Id: Id93b0f4d23ad7022e341e305bbd93ef2fff5787d Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-07-11avf: add more link speedsDamjan Marion1-0/+4
Type: feature Change-Id: I6f94f7ef5ffbd938457c9356a5a11f3d1afeb0a2 Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-06-25avf: fix clear hw statsFilip Tehlar1-0/+10
AVF plugin is missing a handler for clearing stats. This patch will implement it. Ticket: VPP-1701 Type: fix Change-Id: If4b4354da442065896bb001deda23f64ddc18fb4 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2019-06-18vppinfra: add format_hex_bytes_no_wrapDamjan Marion1-5/+5
Type: feature Change-Id: I53e1f05b2b048925fca3b2f6b0499ff9c3e6ee12 Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-06-18avf: fix adminq enqueue errorsDamjan Marion1-5/+6
Type: fix Fixes: b4ff07a Change-Id: I2578ae3e093961fa8765568b5fedcf75ae9487f6 Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-06-18avf: add logging macros and improve loggingDamjan Marion1-9/+109
Type: feature Change-Id: I3d7009505ddbb2c41d8619d9195c6a5373fa9a04 Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-06-05avf: enable promiscuous modeSteven Luong1-1/+1
In order to receive multicast packets from the VF interface, promiscuos mode must be enable. Type: fix Fixes: b4ff07a Change-Id: I549bc37a05895d3355f2832c200e9262c95a27b5 Signed-off-by: Steven Luong <sluong@cisco.com>
2019-05-16init / exit function orderingDave Barach1-5/+6
The vlib init function subsystem now supports a mix of procedural and formally-specified ordering constraints. We should eliminate procedural knowledge wherever possible. The following schemes are *roughly* equivalent: static clib_error_t *init_runs_first (vlib_main_t *vm) { clib_error_t *error; ... do some stuff... if ((error = vlib_call_init_function (init_runs_next))) return error; ... } VLIB_INIT_FUNCTION (init_runs_first); and static clib_error_t *init_runs_first (vlib_main_t *vm) { ... do some stuff... } VLIB_INIT_FUNCTION (init_runs_first) = { .runs_before = VLIB_INITS("init_runs_next"), }; The first form will [most likely] call "init_runs_next" on the spot. The second form means that "init_runs_first" runs before "init_runs_next," possibly much earlier in the sequence. Please DO NOT construct sets of init functions where A before B actually means A *right before* B. It's not necessary - simply combine A and B - and it leads to hugely annoying debugging exercises when trying to switch from ad-hoc procedural ordering constraints to formal ordering constraints. Change-Id: I5e4353503bf43b4acb11a45fb33c79a5ade8426c Signed-off-by: Dave Barach <dave@barachs.net>
2019-03-28Typos. A bunch of typos I've been collecting.Paul Vinciguerra1-3/+3
Change-Id: I53ab8d17914e6563110354e4052109ac02bf8f3b Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-02-09buffers: fix typoDamjan Marion1-1/+1
Change-Id: I4e836244409c98739a13092ee252542a2c5fe259 Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-02-06buffers: make buffer data size configurable from startup configDamjan Marion1-1/+1
Example: buffers { default data-size 1536 } Change-Id: I5b4436850ca18025c9fdcfc7ed648c2c2732d660 Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-01-30buffers: major cleanup and improvementsDamjan Marion1-1/+5
This patch introduces following changes: - deprecated free lists which are not used and not compatible with external buffer managers (i.e. DPDK) - introduces native support for per-numa buffer pools - significantly improves performance of buffer alloc and free Change-Id: I4a8e723ae47056717afd6cac0efe87cb731b5be7 Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-01-24avf: fix queue enable issueDamjan Marion1-8/+11
It is actually a bitmap.... Change-Id: Ie359e085df3f371512f773600f8d7460b2232b3e Signed-off-by: Damjan Marion <damjan.marion@gmail.com>
2019-01-20buffers: remove VLIB_BUFFER_DEFAULT_FREE_LIST macro and fl->n_data_bytesDamjan Marion1-1/+1
Change-Id: I0ba5175be077c40556f2a3ce629c5bbcd71e0a81 Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-01-07avf: allocate descriptor memory from local numaDamjan Marion1-14/+30
Change-Id: Ic56ee4ce83b282a5f0f5aed500721fe639b941b3 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-12-29avf: tx dequeue optimizationsDamjan Marion1-0/+5
Change-Id: I9d8fcf930132e832941e5678a9278a029e104dc3 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-12-29avf: chained buffers rx supportDamjan Marion1-1/+1
Change-Id: I76ba11441f0ab3d150cdd080919cda91eac60b01 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-12-23avf: new ethernet-input supportDamjan Marion1-25/+0
Change-Id: I5511823f38ad56161b6a538f2d9e63459eded1eb Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-12-23avf: add option to specify interface nameDamjan Marion1-0/+2
Change-Id: I94591d5b103280f8df157819d423fef7ee89d4c8 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-11-14Remove c-11 memcpy checks from perf-critical codeDave Barach1-9/+9
Change-Id: Id4f37f5d4a03160572954a416efa1ef9b3d79ad1 Signed-off-by: Dave Barach <dave@barachs.net>
2018-11-08vnet: store hw interface speed in kbps instead of using flagsDamjan Marion1-5/+7
Change-Id: Idd4471a3adf7023e48e85717f00c786b1dde0cca Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-10-23Numa-aware, growable physical memory allocator (pmalloc)Damjan Marion1-44/+59
Change-Id: Ic4c46bc733afae8bf0d8146623ed15633928de30 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-10-23c11 safe string handling supportDave Barach1-10/+10
Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab Signed-off-by: Dave Barach <dave@barachs.net>
2018-10-22vlib: pci improvementsDamjan Marion1-15/+16
- logging - pass vlib_main_t to all APIs - open vfio container only when needed Change-Id: I897e53e0af3f91c3a99f0c827401d1c0ec2e478a Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-10-22vlib: introduce vlib_buffer_get_{pa,va,current_va,current_pa} inlinesDamjan Marion1-6/+3
Change-Id: I0b42ac6b05bc9910904a97924ea4bebc84507d4d Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-10-19avf: fix crash in rss key calculationDamjan Marion1-1/+1
Change-Id: Id13a0b6ed54885babf679f05207170e36709d9fa Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-04avf: fix random rss keyJakub Grajciar1-2/+2
Change-Id: I622cdb969ea489d333888b90c15ab57c1820e2db Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2018-08-30avf: RSS supportJakub Grajciar1-13/+63
Change-Id: I59b8f08789f0704d6768258348e938da67e5b15b Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2018-08-28avf: deal willth tx ring full properlyDamjan Marion1-0/+8
Change-Id: I0b38e129ee01d212463253e5526bfc2d60fd88af Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-28avf: add missing rx_redirect_to_node handlerDamjan Marion1-0/+20
Change-Id: If7fdcdef9a9e12fdf4b7af3c95e06602e39f1e10 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-11Multiversioning: Device (tx) function constructorMohsin Kazmi1-1/+0
Change-Id: I39f87ca161c891fb22462a23188982fef7c3243f Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-07-26avf: used tx queue should be enabledDamjan Marion1-2/+6
Change-Id: I51cc4522df2dd6682148a13e7e1903850b4b3d08 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-07-26avf: request queues supportJakub Grajciar1-2/+54
Change-Id: I3a4529ff8dae70da99ec95c39ddf788c9498f478 Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2018-07-26avf: fix interrupt modeDamjan Marion1-2/+24
- assign rx thread on interface create, not on admin up - keep interrupts unmasked all the time as they are needed for writeback - forward interrupt to graph dispatcher only if queue is in the interrupt mode Change-Id: I5cc5afe24960143bef08f12d59fbd80ae0c6ccf8 Signed-off-by: Damjan Marion <damarion@cisco.com>