11564 Commits

Author SHA1 Message Date
Damjan Marion
b385b95c10 dpdk: postpone updating runtime data
This prevents crash due to worker tread accessing device data
while device vector is growing.

Type: fix
Change-Id: I5cf9f53ddbe97fe52db8fd431ea7c0e480f3d4bc
Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-01-12 14:14:55 +01:00
Damjan Marion
f715b33f10 dpdk: use blunt force to skip irrelevant and confusing logs
Type: improvement
Change-Id: I2cd37f0c1a1ed33438bfa4b7590e5609e5094fc8
Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-01-12 11:02:14 +00:00
Damjan Marion
4429d5e3e1 dpdk: always display burst function name
Also change the way how we dig function pointer so it works with dpdk
21.11+

Type: improvement
Change-Id: I38d5909eea9c2893651710bd45057b1635aa7b37
Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-01-12 10:47:03 +00:00
Ole Troan
de3648db09 ip: coverity illegal access in ip6_ext_header_walk
*** CID 243670:  Memory - illegal accesses  (OVERRUN)
/src/vnet/ip/ip6_packet.h: 713 in ip6_ext_header_walk()
CID 243670:  Memory - illegal accesses  (OVERRUN)
Overrunning array "res->eh" of 4 4-byte elements at
element index 5 (byte offset 23) using index "i" (which evaluates to 5).

Type: fix
Fixes: 03092c1
Change-Id: I27e0435cf10534f3b41e11bf7a5629b5428b0651
Signed-off-by: Ole Troan <ot@cisco.com>
2022-01-12 09:57:43 +00:00
Dastin Wilski
e60f2f678d dpdk-cryptodev: run dequeue again in case of interrupt mode being used
Type: fix

Change-Id: I7aa172e58c970c4971db6ef2ff5b199b7f3c0b99
Signed-off-by: Dastin Wilski <dastin.wilski@gmail.com>
2022-01-12 09:45:00 +00:00
Dastin Wilski
440bf5f8c8 crypto: omit loop iteration
This fix adds check that will omit loop iteration
in case dequeue handler is zero.

Type: fix

Signed-off-by: Dastin Wilski <dastin.wilski@gmail.com>
Change-Id: I7526e3fe7d8c8da9662b4e9204efd5e2d8be1908
2022-01-12 09:28:45 +01:00
Florin Coras
406669e7cd hsa: allow use of default port for vcl test apps
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I30ec7af3baf56d74a5050ea9335053e6e12de630
2022-01-11 22:54:15 +00:00
Pim van Pelt
1705a6baef linux-cp: Add VPP->Linux synchronization
Part 1 -- notes in https://ipng.ch/s/articles/2021/08/13/vpp-2.html
Add the ability for VPP to copy out (sync) its state from the dataplane
to Linux Interface Pairs, when they exist. Gated by a configuration
flag (linux-cp { lcp-sync }), and by a CLI option to toggle on/off,
synchronize the following events:

- Interface state changes
- Interface MTU changes
- Interface IPv4/IPv6 address add/deletion

In VPP, subints can have any link state and MTU, orthogonal to their
phy. In Linux, setting admin-down on a phy forces its children to be
down as well. Also, in Linux, MTU of children must not exceed that of
the phy. Add a state synchronizer which walks over phy+subints to
ensure Linux and VPP end up in the same consistent state.

Part 2 -- notes in https://ipng.ch/s/articles/2021/08/15/vpp-3.html
Add the ability for VPP to autocreate sub-interfaces of existing Linux
Interface pairs. Gated by a configuration flag
(linux-cp { lcp-auto-subint }), and by a CLI option to toggle on/off,
synchronize the following event:

- Sub-interface creation (dot1q, dot1ad, QinQ and QinAD)

A few other changes:
- Add two functions into netlink.[ch] to delete ip4 and ip6 addresses.
- Remove a spurious logline (printing MTU) in netlink.c.
- Resolve a TODO around vnet_sw_interface_supports_addressing()

Type: improvement
Signed-off-by: Pim van Pelt <pim@ipng.nl>
Change-Id: I34fc070e80af4013be58d7a8cbf64296cc760e4e
Signed-off-by: Pim van Pelt <pim@ipng.nl>
2022-01-11 19:31:25 +00:00
Florin Coras
0cef5f5d71 tls: ssl close only after all data drained
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ia77b26db61b6f58b4ff659f09192b4ea93ed50b4
2022-01-11 17:05:18 +00:00
Mohsin Kazmi
30d46e7455 vlib: fix the total len not including first buffer formating
Type: fix

total len not including first buffer is in vlib_buffer_t second cacheline.
It is not reset after the buffer has been consumed. It leads to printing
garbage in packet trace for subsequent use of this buffer. This patch
fixes the issue to only print when VLIB_BUFFER_NEXT_PRESENT flag is set.

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: Ied72308bdb907a5e1ca16d181f2add062807e968
2022-01-11 12:47:52 +00:00
Damjan Marion
ce4083ce48 dpdk: offloads cleanup
Type: improvement
Change-Id: Ibf43aa483548e6055e4b851ad893371d7af3b018
Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-01-11 11:42:59 +00:00
Mohsin Kazmi
3b7ef512f1 misc: fix the uninitialization error
Type: fix

| src/vppinfra/vector/toeplitz.c:69:9: error: ‘kv’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
| src/vppinfra/memcpy_x86_64.h:45:17: error: ‘*((void *)&key+16)’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
|    *(u8x16u *) d = *(u8x16u *) s;
|    ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
| src/vnet/gre/interface.c:356:20: note: ‘*((void *)&key+16)’ was declared here

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I71614da2821ebda5200a0cb9437a7aad0c42fbb2
2022-01-11 11:32:34 +00:00
Florin Coras
6ac74e44e5 session: increase postponed mq message min size
Reported by coverity

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ib1db0d120321b061f4c2c20117acdfb6e7dc0626
2022-01-11 00:19:00 +00:00
Florin Coras
36eaaf3625 session: fix segment manager format coverity warning
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ia32536a76aa3f92f80ee2cd027a9a010c19b861a
2022-01-10 21:36:39 +00:00
Damjan Marion
c48ec5d568 interface: refactor interface capabilities code, part 2
Type: improvement

Signed-off-by: Damjan Marion <damarion@cisco.com>
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: Ie595e69af8657b0ee18a84ac71c5d433108d9ef8
2022-01-10 20:51:52 +00:00
jinsh
5048bc6ed5 vrrp: vrrp in unicast mode,interface not add virtual ip addresss
Type: fix

Signed-off-by: jinsh <jinsh11@chinatelecom.cn>
Change-Id: Id80601bc753c59c4ea95ff5f74f9b15c40c01e35
2022-01-10 15:56:51 +00:00
Florin Coras
2b4f74ff9a session: allow pacer to send when bucket hits 0
So after bucket reset session can send max burst of bytes.
Also, reset pacer bucket to 0 not min burst

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Iced8948c407e6647e6eb4caff5c62c06d45ce0bf
2022-01-10 03:13:17 +00:00
Florin Coras
9bd71be3ee session: deschedule sessions with no data to send
This ensures the scheduler always tracks sessions that are descheduled,
i.e., do not have events in the old io events list. When app retries to
send, clear descheduled flag and potentially the pacer.

Consequently, transports no longer need to reset the pacer when
sessions are rescheduled after a long app tx pause.

This also fixes a tcp bug whereby the pacer was reset too often when
snd_una was equal to snd_nxt as there was no way to distinguish betwen
app tx breaks and congestion.

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Id3cc6c98cd76299e15030e504380dcf3c04c5189
2022-01-10 03:12:46 +00:00
Florin Coras
93dd58c8fb session: fix pacer bucket update cast
Make sure comparison is done between two i64 values.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ief5706f2bd9415587994a5b665d5e380b8e14f68
2022-01-10 03:07:44 +00:00
Damjan Marion
26ea3ede43 dpdk: interface capabilities cleanup
Type: improvement
Change-Id: If5636d4376fb06da62f947c28b18c07b6ad21722
Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-01-09 20:32:54 +00:00
Damjan Marion
71635fda0d dpdk: port type code cleanup
Type: improvement
Change-Id: I4ead18dee249a27b4dbb8bbf53b6238d91042890
Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-01-09 20:32:54 +00:00
Neale Ranns
9d33cfc0bc vppinfra: Check for NULL vec before the backwards iteration
Type: improvement

'vec_end(v) - 1' does not yield a good starting point. Check for NULL vec before the loop, so the user does not have to.

Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: Ia174ec8095bc476853cce709a7048d7a3e3b377d
2022-01-09 14:32:30 +00:00
Steven Luong
221be7c03f fib: multiple memory leaks upon deleting a VRF table
fib_table->ft_locks
name string for parsing the ip table add|del name <tag> command
path list for ip4_specials in mfib
mfib->fib_entry_by_dst_address[0..32]
mfib entry path_ext, msrc->mfes_exts

Type: fix

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: Ia1e0cac577a73608ee1e4b1664b60a66322e81ce
2022-01-09 13:43:50 +00:00
Damjan Marion
6815bc3d8b dpdk: new mbuf flags in format function
Type: improvement
Change-Id: I9022e29ebc0edb7946d374d6c3c45ee6962d725f
Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-01-09 01:45:14 +01:00
Damjan Marion
7e46074cfc dpdk: new flags format
introduced in DPDK 21.11

Type: improvement
Change-Id: I8c845949dd904a2bf8fa4a91e2f3ae5d704f2283
Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-01-08 19:23:38 +00:00
Florin Coras
ded32ed0e8 tcp: fix cubic cwnd accumulate use of bytes acked
Use what was provided instead of tc->bytes_acked

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I0ed736d2ee247e231fccdf4a969fcf6bc15b7978
2022-01-07 15:06:42 -08:00
Steven Luong
ed999e3b81 bonding: memory leak on parsing bad CLI command
When parsing bad "create bond" command, we should call unformat_free
prior to return

Type: fix
Fixes: 9cd2d7a5a4fafadb65d772c48109d55d1e19d425

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I8f20a0e7f29de670e09633880d0aa50a51444e11
2022-01-07 13:21:37 +00:00
Steven Luong
e88c93324a vmxnet3: memory leak on parsing bad CLI command
When parsing bad "create interface vmxnet3" command, we should call
unformat_free prior to return

Type: fix
Fixes: df7f8e8cffcc43531f7daeda44d436b60e538141

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I2663894c6cb8066ca2abb1c56f0ca46d0fef19f7
2022-01-07 13:20:14 +00:00
Damjan Marion
5c954c4641 ethernet: new interface registration function
Prep for supporting multiple callbacks, optional args, etc.

Type: improvement
Change-Id: I96244c098712e8213374678623f12527b0e7f387
Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-01-07 12:49:47 +00:00
Florin Coras
c58b1747b3 dpdk: fix rx and tx descriptor config
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I48ac0a2c77154b5232a0fe4166518f28d1f1d8ef
2022-01-07 12:46:42 +00:00
Florin Coras
ec3a63655f tcp: optimize newreno cong ack handler
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I196ee5f4630cec637245493f370b5f83a939fe44
2022-01-06 17:50:19 -08:00
Florin Coras
c814435633 tcp: update snd_congestion only during congestion
If running without sacks, if snd_una does not cover snd_congestion fast
recovery can be missed but the two heuristics from RFC6582 should avoid
that.

Also snd_congestion was used as a means of inferring if the connection
recently exited congestion while setting the persist timer but that does
not always work correctly if not congested.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I94d4ac738cdd4f7f23f62e97dd63059de1cd4af9
2022-01-06 16:38:24 -08:00
Florin Coras
ed5be47009 tcp: mark lost first sack hole on timeout
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I1abff943f3fe3ff0219126b5b8beded4ad859758
2022-01-06 23:09:40 +00:00
Florin Coras
8e1ada3a61 tcp: handle start tx event in cubic
If app was idle update start time of current congestion avoidance phase
unless tcp connection was not idle.

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Idf6a03a9ef96c409462de9f9cb19df609f730afe
2022-01-06 23:09:00 +00:00
Florin Coras
8e76dfa758 tcp: always exit recovery if not in fastrecovery
Stay in fast recovery only if it's already on.

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Idcdbbacfed3e5f3c991fa293c532be1c671f5217
2022-01-06 23:08:09 +00:00
Florin Coras
b56f24bbc4 tcp: exit retransmit before processing feedback
Type: refactor

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I5838e4c370d0c02a21b5eadb4af3baae781df097
2022-01-06 23:08:09 +00:00
Florin Coras
0f8b91f5d8 tcp: use bytes delivered to compute cwnd
Should estimated cwnd better with loss

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Idd75d40dbab212ac0a5d533009c5540b1a58f4c4
2022-01-06 20:18:53 +00:00
Florin Coras
273968cf2d tcp: cast timer ticks to u32
tc->rto * TCP_TO_TIMER_TICK can return garbage if not cast to u32 and
that confuses clib_max

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
signed-off-by: Vipul Agrawal <Vipul.Agrawal@enea.com>
Change-Id: Ief4d29b9625e2ef2e75e0c7e3d731ab147465f6d
2022-01-06 20:14:49 +00:00
Damjan Marion
632ea7089f dpdk: cleanup MTU handling
Type: improvement
Change-Id: I4b929693f3671be8ee63a58afcbac75a27d99d57
Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-01-06 20:05:25 +00:00
Damjan Marion
2a8d308374 dpdk: port type from speed_capa bitmap on Cisco VIC
enic driver now properly exposes speed_capa bitmap so this workaround
is not needed anymore.

Type: refactor
Change-Id: Ic754de0b9de32d488405ffcd8d62dd6aa035d2bc
Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-01-06 20:03:30 +00:00
Nathan Skrzypczak
40edaf6016 tap: add num_tx_queues API
This adds a create_tap_v3 api that has a num_tx_queues
parameter allowing to create more than num_workers queues,
following on multi TX support

Type: feature

Change-Id: Idce433147e8dd165f842241d6c76e041e1b1c9b8
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2022-01-06 14:02:30 +00:00
Damjan Marion
254b5cb50c dpdk: remove unused defines
Type: refactor
Change-Id: I41d5d07eef670e89eba8fd816e123981940b5d79
Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-01-05 22:08:04 +00:00
Damjan Marion
dd80166560 dpdk: no need to copy default tx conf
Type: improvement
Change-Id: Ifd5201c101da7f4fb63f9b64280a6ec35b2af6a0
Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-01-05 22:05:39 +00:00
Florin Coras
dbec8fa67f dpdk: improve checksum computation
Type: improvement

Based on gerrit 26480 by chenmin.sun@intel.com

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Id8f2127f0fac5f555b38483714fe92c038875915
2022-01-05 22:03:22 +00:00
Damjan Marion
d4f88cc096 interface: refactor interface capabilities code
Make it shorter to type, easier to debug, make adding callbacks in
future simpler.

Type: improvement
Change-Id: I6cdd6375e36da23bd452a7c7273ff42789e94433
Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-01-05 19:04:07 +01:00
Damjan Marion
7c11bd7a87 dpdk: move port config to single struct
Type: refactor
Change-Id: I0bce385c7e391fa2b74646d001980610f80f7062
Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-01-05 17:43:34 +00:00
Damjan Marion
fdc874af1e vppinfra: few bitops inlines
Change-Id: I9aa01fafd5329a399aa9d72a6e2cc6c9d65dc85c
Type: improvement
Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-01-05 17:01:49 +00:00
Damjan Marion
5b9cb0d275 dpdk: remove unused flag
Type: refactor
Change-Id: Iff96a79323d7d428a779e9736e07c1dc9dddb518
Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-01-05 13:04:59 +01:00
Tetsuya Murakami
be872a8dda srv6-mobile: Update GTP4/6.D function
GTP4/6.D behavior is updated as shown below.
1. When receiving GTP-U message or IPv6 linklocal destination in inner IP, GTP packet is tnralated to SRv6.
2. When receiving T-PDU packet, OuterIP/UDP/GTP headers are stripped off and Inner IP is encapsulated into SRv6 based on L3VPN SRv6 manner.

Type: feature

Signed-off-by: Tetsuya Murakami <tetsuya.mrk@gmail.com>
Change-Id: I6092c98ea80236d54017f84c5b35cca0b645f034
Signed-off-by: Tetsuya Murakami <tetsuya.mrk@gmail.com>
2022-01-05 10:52:22 +00:00
Damjan Marion
dfc853c0ac dpdk: keep buffer flags per-device
Type: improvement
Change-Id: Idb0b079df49c12643c9a93ee0effe011d3489068
Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-01-05 10:48:54 +00:00