summaryrefslogtreecommitdiffstats
path: root/src/plugins/avf/output.c
AgeCommit message (Collapse)AuthorFilesLines
2021-05-11interface: tx queue infraDamjan Marion1-5/+7
Type: improvement Change-Id: I415b2f980de10ca3154d2c8677c24792453eccd0 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-05-08avf: fix coverityMohammed Hawari1-7/+4
Change-Id: I54025eb0e4ee861b2b2fed554b006405cba38bb9 Signed-off-by: Mohammed Hawari <mohammed@hawari.fr> Type: fix Fixes: bd376a8ce8425f45b23074398949e8055de29280
2021-05-07avf: Fix cksum offload / ipsecNathan Skrzypczak1-1/+6
VNET_BUFFER_F_OFFLOAD means 'check 2nd cacheline' but we can still have TCP_CKSUM=0 & UDP_CKSUM=0 Type: fix Change-Id: I42b5974f6d34b777aa959c06c67619a5c83c5805 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2021-05-06vlib: fix the offload flags sizeMohsin Kazmi1-1/+1
Type: fix Change-Id: I433fe3799975fe3ba00fa30226f6e8dae34e88fc Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2021-05-05avf: remove dead storeDamjan Marion1-1/+0
Type: fix Change-Id: Ic8d965aecea6b5b729e3f414235e676d62de779a Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-05-05vlib: move offload flags to 1st cacheline in vlib_buffer_tMohsin Kazmi1-1/+1
Type: improvement Some tests i.e. ipsec see performance regression when offload flags are moved to 2nd cacheline. This patch moves them back to 1st cacheline. Change-Id: I6ead45ff6d2c467b0d248f409e27c2ba31758741 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2021-05-04avf: fix simultaneous txq wrap and tx retryMohammed Hawari1-1/+2
Change-Id: Ic2b853cda98c3010d2abb5c7ada1b1f6c5bc9f74 Signed-off-by: Mohammed Hawari <mohammed@hawari.fr> Type: fix Fixes: ca1812dbe714fc8e4de13f88df2d3b830d95a2c9 Ticket: VPP-1980
2021-04-15avf: fix tx path segfaultRadu Nicolau1-0/+1
Type: fix Fixes: ca1812dbe714fc8e4de13f88df2d3b830d95a2c9 Signed-off-by: Radu Nicolau <radu.nicolau@intel.com> Change-Id: I657be40689caa0c9e202fb411da6323aafeab57e
2021-04-13avf: rework TX one-by-one loopDamjan Marion1-68/+63
Type: improvement Change-Id: I466fd0324d53e8d68b53a2c84d97a722be90f4a0 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-13avf: avoid placeholder buffer alloc in datapathDamjan Marion1-24/+12
Type: improvement Change-Id: I0ad0fa42f056b5797ba71d6972a44273c13bb97e Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-13avf: avoid ring wrap in the tx pathDamjan Marion1-138/+113
Type: improvement Change-Id: I91ecf0bff2ddd43ab5cf0f03ed2882882154557b Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-02-15vlib: refactor checksum offload supportMohsin Kazmi1-8/+6
Type: refactor This patch refactors the offload flags in vlib_buffer_t. There are two main reasons behind this refactoring. First, offload flags are insufficient to represent outer and inner headers offloads. Second, room for these flags in first cacheline of vlib_buffer_t is also limited. This patch introduces a generic offload flag in first cacheline. And detailed offload flags in 2nd cacheline of the structure for performance optimization. Change-Id: Icc363a142fb9208ec7113ab5bbfc8230181f6004 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2021-01-21avf: use write combining store for queues tail updateRadu Nicolau1-1/+1
Performance improvement: on supported platforms, currently only Intel Tremont, use a write combining store to update the tail pointers. Also, Tremont node variant is added for all. Type: improvement Signed-off-by: Radu Nicolau <radu.nicolau@intel.com> Change-Id: Ie9606e403b7d9655184f778e3ffee3027c8c9edd
2021-01-19avf: fix l2_len for csum offloadMohammed Hawari1-4/+3
Use vlib_buffer_t::current_data instead of vnet_buffer_opaque_t::l2_hdr_offset to compute l2_len for checksum offload (l2_hdr_offset might be invalid if packet originates from an L3 interface) Change-Id: I2031ea6fd6a7af4b6e186751e119ebd6161641b5 Type: fix Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
2020-12-19avf: fix gcc compiling warning on ArmJieqiang Wang1-4/+4
Initializing struct avf_ip6_psh by {0} using gcc with O2 optimize option will trigger the -Werror=maybe-uninitialized compiling warning on Arm because gcc compiler will think some members of the struct avf_ip6_psh may not be initialized, which probably is a false positive in this case. The compiling error log is shown as below. Avoid this compiling warning by explicitly declaring the IPv6 src and dst ip in avf_ip6_psh as ip6_address_t. ccache /usr/lib/ccache/gcc-10 -DHAVE_FCNTL64 -DHAVE_GETCPU -DHAVE_MEMFD_CREATE -I/home/snowball/tasks/test_vpp_build/test-patch-9/vpp/src -I. -Iinclude -I/home/snowball/tasks/test_vpp_build/test-patch-9/vpp/src/plugins -Iplugins -Iplugins/avf -Wno-address-of-packed-member -g -fPIC -Werror -Wall -march=armv8-a+crc -O2 -fstack-protector -DFORTIFY_SOURCE=2 -fno-common -fPIC -DCLIB_MARCH_VARIANT=cortexa72 -march=armv8-a+crc+crypto -mtune=cortex-a72 -DCLIB_N_PREFETCHES=6 -MD -MT plugins/avf/CMakeFiles/avf_plugin_cortexa72.dir/output.c.o -MF plugins/avf/CMakeFiles/avf_plugin_cortexa72.dir/output.c.o.d -o plugins/avf/CMakeFiles/avf_plugin_cortexa72.dir/output.c.o -c /home/snowball/tasks/test_vpp_build/test-patch-9/vpp/src/plugins/avf/output.c In file included from /home/snowball/tasks/test_vpp_build/test-patch-9/vpp/src/vppinfra/vector_funcs.h:41, from /home/snowball/tasks/test_vpp_build/test-patch-9/vpp/src/vppinfra/vector.h:196, from /home/snowball/tasks/test_vpp_build/test-patch-9/vpp/src/vppinfra/string.h:48, from /home/snowball/tasks/test_vpp_build/test-patch-9/vpp/src/vppinfra/mem.h:49, from /home/snowball/tasks/test_vpp_build/test-patch-9/vpp/src/vppinfra/vec.h:42, from /home/snowball/tasks/test_vpp_build/test-patch-9/vpp/src/vppinfra/format.h:44, from /home/snowball/tasks/test_vpp_build/test-patch-9/vpp/src/vppinfra/elf.h:41, from /home/snowball/tasks/test_vpp_build/test-patch-9/vpp/src/vppinfra/elf_clib.h:41, from /home/snowball/tasks/test_vpp_build/test-patch-9/vpp/src/vlib/vlib.h:44, from /home/snowball/tasks/test_vpp_build/test-patch-9/vpp/src/plugins/avf/output.c:18: /home/snowball/tasks/test_vpp_build/test-patch-9/vpp/src/plugins/avf/output.c: In function ‘avf_device_class_tx_fn_cortexa72’: /home/snowball/tasks/test_vpp_build/test-patch-9/vpp/src/vppinfra/byte_order.h:59:10: error: ‘*((void *)&psh+32)’ may be used uninitialized in this function [-Werror=maybe-uninitialized] 59 | return __builtin_bswap16 (x); | ^~~~~~~~~~~~~~~~~~~~~ /home/snowball/tasks/test_vpp_build/test-patch-9/vpp/src/plugins/avf/output.c:115:23: note: ‘*((void *)&psh+32)’ was declared here 115 | struct avf_ip6_psh psh = { 0 }; | ^~~ Type: fix Change-Id: I2684b101b07823dfacc4a56cc29d152828d0cf37 Signed-off-by: Jieqiang Wang <jieqiang.wang@arm.com>
2020-12-04avf: fix coverity issueMohammed Hawari1-1/+2
Change-Id: I1b589c924326a98c4cabe5496ce72b20673b5153 Signed-off-by: Mohammed Hawari <mohammed@hawari.fr> Type: fix
2020-12-01avf: add TSO supportMohammed Hawari1-20/+91
Change-Id: Ica663e1d07225acf53fd74b0051a5a2a34174960 Signed-off-by: Mohammed Hawari <mohammed@hawari.fr> Type: improvement
2020-11-15avf: add L4 checksum offload supportMohammed Hawari1-5/+117
Change-Id: Ie90437cf597c5d53ab1cc41ea7db15b97614e2fc Signed-off-by: Mohammed Hawari <mohammed@hawari.fr> Type: improvement
2020-10-26avf: use atomic store instead of barrierDamjan Marion1-2/+2
Type: improvement Change-Id: Ifea5f0c2fecb99fd320a2e1141f4b4f0d6a793ca Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-09-11avf: fix race between avf and cli/api processDamjan Marion1-2/+1
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-02-25avf: Handle chain buffer in TX properlySteven Luong1-6/+138
For chain buffer, need to traverse b->next_buffer to transmit all buffers in the chain. Only set EOP at the last descriptor in the chain to signal this is a chain descriptor. Introduce slow path to handle ring wrap. This is needed because chain buffer may consist of multiple pieces and it may span from near the end of the ring to the beginning of the ring. Type: fix Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: Id7c872f3e39e09f3566aa63f3cdba8f40736d508
2019-02-22avf: fix eat own tail issue on txDamjan Marion1-3/+7
Change-Id: Ie14ca18bab47ac6765ff0799475d0c2a4d936f90 Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-01-18Add vlib_buffer_copy_indices inline functionDamjan Marion1-1/+1
This reverts commit 1e59f9ddbdda14591967e1d66eab8623f9ba58e4. Change-Id: Iae1d372b887e170d28cac2fe4c61325ee5a5894a Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-12-29avf: tx dequeue optimizationsDamjan Marion1-11/+28
Change-Id: I9d8fcf930132e832941e5678a9278a029e104dc3 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-12-28avf: chained buffers tx supportDamjan Marion1-104/+105
Change-Id: Ib573d45def80b4123d5623fda920e6cda1247638 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-11-13vlib rename vlib_frame_args(...) to vlib_frame_scalar_args(..)Damjan Marion1-1/+1
Typically we have scalar_size == 0, so it doesn't matter but vlib_frame_args was providing pointer to scalar frame data, not vector data. To avoid future confusion function is renamed to vlib_frame_scalar_args(...) Change-Id: I48b75523b46d487feea24f3f3cb10c528dde516f Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-10-23Numa-aware, growable physical memory allocator (pmalloc)Damjan Marion1-2/+2
Change-Id: Ic4c46bc733afae8bf0d8146623ed15633928de30 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-10-22vlib: introduce vlib_buffer_get_{pa,va,current_va,current_pa} inlinesDamjan Marion1-16/+20
Change-Id: I0b42ac6b05bc9910904a97924ea4bebc84507d4d Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-24Trivial: Clean up some typos.Paul Vinciguerra1-1/+1
Change-Id: I085615fde1f966490f30ed5d32017b8b088cfd59 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-08-28avf: deal willth tx ring full properlyDamjan Marion1-11/+33
Change-Id: I0b38e129ee01d212463253e5526bfc2d60fd88af Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-11Multiversioning: Device (tx) function constructorMohsin Kazmi1-19/+3
Change-Id: I39f87ca161c891fb22462a23188982fef7c3243f Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-08-11avf: fix prefetch bugDamjan Marion1-1/+1
Change-Id: I4e774dc53b08746cd4ab42393f33676dcc78e791 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-07-11avoid using thread local storage for thread indexDamjan Marion1-1/+1
It is cheaper to get thread index from vlib_main_t if available... Change-Id: I4582e160d06d9d7fccdc54271912f0635da79b50 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-07-11avf: descriptor should be volatileDamjan Marion1-6/+6
Change-Id: I2cb4cf2167b6e958d2e57b461848a4a189e3fda0 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-06-15avf: tx node fixesDamjan Marion1-9/+9
- missing RSV bit set in descriptor - wrong buffer offset Change-Id: I8b138266652a30a50e4541c6344e4fe3dec4d1ca Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-05-29Add VLIB_NODE_FN() macro to simplify multiversioning of node functionsDamjan Marion1-1/+1
Change-Id: Ibab5e27277f618ceb2d543b9d6a1a5f191e7d1db Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-03-26Intel Adaptive Virtual Function native device driver pluginDamjan Marion1-0/+183
Change-Id: If168a9c54baaa516ecbe78de2141f11c17aa2f53 Signed-off-by: Damjan Marion <damarion@cisco.com>