aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/af_xdp/input.c
AgeCommit message (Collapse)AuthorFilesLines
2024-03-12misc: remove GNU Indent directivesDamjan Marion1-2/+0
Type: refactor Change-Id: I5235bf3e9aff58af6ba2c14e8c6529c4fc9ec86c Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-10-14feature: remove unused codeDamjan Marion1-1/+1
Type: improvement Change-Id: If775b1d145e462346de562a3c893f302e8c7b814 Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-06-13af_xdp: set frame_no_append flagArtem Glazychev1-0/+1
Make sure the same frame is not used for multiple interfaces, otherwise it breaks the ETH_INPUT_FRAME_F_SINGLE_SW_IF_IDX promise. Type: fix Signed-off-by: Artem Glazychev <artem.glazychev@xored.com> Change-Id: I02546259ceaea36f65cb9f78b9b3ee45ed4075c9
2023-06-08af_xdp: make sure all packets are transmittedBenoît Ganne1-3/+1
AF_XDP socket will only tx enqueued packets up to a max batch size so we need to retry until everything has been sent. Type: fix Change-Id: Ia487ab63d3e85a478471cd1d679c5fb471804ba3 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-05-21af_xdp: use desc offset on rxBenoît Ganne1-29/+25
Instead of pre-programming the data offset on rx, use offset passed in the descriptor. This is more robust and future-proof. Type: fix Change-Id: I2bd910d92b8b03d17be5be85a24108be711dc7b9 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-05-21af_xdp: refill rx rings when interface goes upBenoît Ganne1-9/+23
If interrupt mode is configured through startup.conf exec script, the input function will not be polled and the rx ring will never be filled. Always refill the ring when interface goes up so it is ready to receive packets. Type: fix Change-Id: I4cf22c8ae00638679f2e8650303a6fe916c1319b Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-05-21af_xdp: workaround kernel race between poll() and sendmsg()Benoît Ganne1-16/+19
Prior to Linux 5.6 there is a race condition between poll() and sendmsg() in the kernel. This patch protects the syscalls with a lock to prevent it, unless the NO_SYSCALL_LOCK flag is set at create time. See https://lore.kernel.org/bpf/BYAPR11MB365382C5DB1E5FCC53242609C1549@BYAPR11MB3653.namprd11.prod.outlook.com/ Type: fix Change-Id: Ie7d4f5cb41f697b11a09b6046e54d190430d76df Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-05-01vlib: refactor trajectory trace debug featureBenoît Ganne1-12/+6
trajectory trace has been broken for a while because we used to save the buffer trajectory in a vector pointed to in opaque2. This does not work well when opaque2 is copied (eg. because of a clone) as 2 buffers end up sharing the same vector. This dedicates a full cacheline in the buffer metadata instead when trajectory is compiled in. No dynamic allocation, no sharing, no tears. Type: refactor Change-Id: I6a028ca1b48d38f393a36979e5e452c2dd48ad3f Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-01-21af_xdp: update interrupt mode to new infraBenoît Ganne1-16/+17
Type: improvement Change-Id: Icb23af5f5e458a555f416cb0a829e84646b25dd9 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-11-09vlib: fix trace number accountingBenoît Ganne1-12/+12
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-09-01misc: fix uninitialized use warnings with gcc-{8,9}Aloys Augustin1-1/+1
Change-Id: I4930c3c2a8025ec9ceb17e994137be67d88d455f Type: fix Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
2020-08-31vppinfra: convert A_extend_to_B to B_from_A format of vector inlinesDamjan Marion1-2/+2
Make it shorter and same format when converting to biggor or smaller types. Type: refactor Change-Id: I443d67e18ae65d779b4d9a0dce5406f7d9f0e4ac Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-08-31af_xdp: AF_XDP input pluginBenoît Ganne1-0/+367
Type: feature Change-Id: I85aa4ad6b68c1aa0e51938002dc691a4b11c545c Signed-off-by: Damjan Marion <damarion@cisco.com> Signed-off-by: Benoît Ganne <bganne@cisco.com>