Age | Commit message (Collapse) | Author | Files | Lines |
|
Add function vlib_buffer_clone_at_offset() so that the cloned
packets' 1st buffer will have the original packet header copied
at the specified offset (instead of current_data). This can be
used to increase headroom in the cloned packet to allow large
header encaps in case the stdandard 128B predata is not enough.
The original vlib_buffer_clone() still works the same as before.
Change-Id: I3b50c8ad7e3952568bc141710567c99a3dacddce
Signed-off-by: John Lo <loj@cisco.com>
|
|
int vaddvq_u8 (uint8x16_t __a) is not appropriate to implement xxx_is_all_zero,
as there may be overflow causing incorrect return value.
Here's an example.
u8x16 x = {0 <repeats 12 times>, 1, 255, 0, 0};
Change-Id: Ia6a10bdf8da360dec12db902d028751a1a77e9a4
Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com>
Reviewed-by: Sirshak Das <Sirshak.Das@arm.com>
|
|
Should be faster this way if n_indices is not constant value
Change-Id: I6c34fd313daa2392199f3b9bd20d0cd6cf9ae21b
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Credits to: Lollita Liu <lollita.liu@ericsson.com>
Change-Id: I40f7ad9cc5220db7ac4571cb14feaf22fc02aa2e
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Previous code was walked buffer chain, effectively trying to "truncate" the chain, reset the
length of first buffer and reused that as the ICMP error message. That could have issues in cases
there were other users of the buffer chain. Update to clone the first buffer in chain, and
use that for the ICMP error message instead.
Change-Id: Ibc1a0bf2d854dae41874808c8297028ed93dd69d
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
Change-Id: I550ef893e41d86310d4e5af16d6100b8e557b68a
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Rewrite vlib_buffer_chain_linearize function so that it works as intended.
Linearize buffer chains coming out of reassembly to work around some
dpdk-tx issues. Note that this is not a complete workaround
as a sufficiently large packet will still cause the resulting chain to
be too long.
Drop features from reassembly code which relies on knowing which and how
many buffers were freed during linearization, buffer counts and tracing
capabilities for these cases.
Change-Id: Ic65de53ecb5c78cd96b178033f6a576ab4060ed1
Signed-off-by: Klement Sekera <ksekera@cisco.com>
|
|
buffer_pool_index, in case of buffer_pool_index change,
should free buffers in queue before setting buffer_pool_index again
Change-Id: I846ead947a7b2d940c8fc747976239d608597391
Signed-off-by: Lollita Liu <lollita.liu@ericsson.com>
|
|
Change-Id: I4e836244409c98739a13092ee252542a2c5fe259
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Example:
buffers {
default data-size 1536
}
Change-Id: I5b4436850ca18025c9fdcfc7ed648c2c2732d660
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Change-Id: I8044b34a37fe1994a8dfa1ca89929f3642c72e8d
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
- DPDK overwrites metadata as part of rte_pktmbuf_init(...) so we need
reinitialize it
- additional checks added to ensure ref_count is never < 1
Change-Id: Ida336f81c4723e8f2e0ad4a70cb7b1ecfff978a0
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
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>
|
|
This variable without any needed 'define' becoming unused.
Change-Id: I661a75a78dba03abb861ed918ad1e634a8ecd0af
Signed-off-by: Dmitry Vakhrushev <dmitry@netgate.com>
|
|
Change-Id: I9df96264e30806ac3daf7121f314f34f06232413
Signed-off-by: Damjan Marion <damjan.marion@gmail.com>
|
|
Change-Id: I1c12e2941cae198ededbb65eb5be51a4eabe2c1b
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Change-Id: I0ba5175be077c40556f2a3ce629c5bbcd71e0a81
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Change-Id: I5fe01e918b534d1ac1d47f0d7610536f45c3158c
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Change-Id: Ia083050389853c25b069f0f8286d50d3f4aef527
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Change-Id: I3bb1d9f83dd08f4b93acd4a281bfec0674e39c2e
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Change-Id: I6048c6a51efa826ac333f7d15919cb87dd766d74
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Change-Id: Idb224b807373128b78dc46f177b2d2e0ed288349
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
This reverts commit 1e59f9ddbdda14591967e1d66eab8623f9ba58e4.
Change-Id: Iae1d372b887e170d28cac2fe4c61325ee5a5894a
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Storing buffer in local template seems to be better option....
Change-Id: I1a2fdd68cb956f99a5b36d2cd810fc623e089bcf
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
It's not OK to crash due to a transient buffer allocation failure.
Return 1 if the requested operation failed, otherwise 0.
Buffer index parameter change to a value-result, so the caller can
differentiate between partial and complete allocation failure: callers
which request an initial allocation (inbound bi = ~0) need to check
the (out) value to decide whether or not to call vlib_buffer_free(...).
Change-Id: I03029d7f2714c17dca4630dfd95a1eb578b68384
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
Change-Id: If2bbfbc52994f5de0879763e0b7a7864498debb6
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
replace vlib_buffer_advance with its code to work around assert
Change-Id: I6e332527f5e0c10d23305b6fc2e837d8b4f99e78
Signed-off-by: Klement Sekera <ksekera@cisco.com>
|
|
dhcp packets might (when flooded) arrive in chains of cloned buffers
Change-Id: Ifddecd656b6a5d6ba8cd94184f5c021684e35548
Signed-off-by: Eyal Bari <ebari@cisco.com>
|
|
Change-Id: Id4f37f5d4a03160572954a416efa1ef9b3d79ad1
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
Change-Id: I88c3d3e516401bb1c84991515cd701c156ae19dd
Signed-off-by: Eyal Bari <ebari@cisco.com>
|
|
Change-Id: Ic4c46bc733afae8bf0d8146623ed15633928de30
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Change-Id: I0b42ac6b05bc9910904a97924ea4bebc84507d4d
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
This is first part of addition of atomic macros with only macros for
__sync builtins.
- Based on earlier patch by Damjan (https://gerrit.fd.io/r/#/c/10729/)
Additionally
- clib_atomic_release macro added and used in the absence
of any memory barrier.
- clib_atomic_bool_cmp_and_swap added
Change-Id: Ie4e48c1e184a652018d1d0d87c4be80ddd180a3b
Original-patch-by: Damjan Marion <damarion@cisco.com>
Signed-off-by: Sirshak Das <sirshak.das@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Ola Liljedahl <ola.liljedahl@arm.com>
Reviewed-by: Steve Capper <steve.capper@arm.com>
|
|
Add an "elog trace [api][cli][barrier]" debug CLI command. Removed the
barrier elog test command. Remove unused reliable multicast code.
Change-Id: Ib3ecde901b7c49fe92b313d0087cd7e776adcdce
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
This is the high version of extendto. This function accomplishes the
same task as both shuffling and extending done by SSE intrinsics.
This enables the NEON version for buffer indexes to buffer pointer
translation.
Change-Id: I52d7bbf3d76ba69c9acb0e518ff4bc6abf3bbbd4
Signed-off-by: Sirshak Das <sirshak.das@arm.com>
Reviewed-by: Steve Capper <steve.capper@arm.com>
Reviewed-by: Yi He <yi.he@arm.com>
Verified-by: Lijian Zhang <lijian.zhang@arm.com>
|
|
Change-Id: I1a28ddf535c80ecf4ba4bf31659ff2fead1d8a64
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Change-Id: I06e1dbfa0782bc03f2d0e77295b38b4fde7df35e
Signed-off-by: Neale Ranns <nranns@cisco.com>
|
|
Change-Id: I332bb4578d1a3c79770985bf1f315d2ed823a3e5
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Change-Id: I5098e5d966abc44db045783883424b63083f08ee
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
|
|
When calling vlib_buffer_clone() on a source vlib_buffer with no next
buffer but whose total_length_not_including_first_buffer hadn't been
properly zeroed out, the total_length_not_including_first_buffer of
the clone was set to a wrong value.
(see https://lists.fd.io/g/vpp-dev/topic/19869395)
Change-Id: I4b503ece804e3933bb259be4c2148f84dafbea3e
Signed-off-by: Yoann Desmouceaux <ydesmouc@cisco.com>
|
|
Change-Id: Ib3fcc3ceb7f315389bcdecbb7d9632540a5dd6ba
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Change-Id: I65306fb1f8e39221dd1d8c00737a7fb1c0129ba8
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
- buffer_main is no longer part of vlib_main_t
- pool of free lists is still part of vlib_main_t
- mheap is not used anymore for buffer allocation
- simple bitmap bassed buffer alloc scheme is introduced
Change-Id: I3e1e6d00e2c8122293ed0a741245eb841315a1ff
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Change-Id: If1284696e10df71b4029191b5e3adb32c21c0c5f
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Change-Id: I63f7b14cd63eac9e64cace5d941190096ad148dc
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Change-Id: I853386aebfe488ebb10328435b81b6e3403c5dd0
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Change-Id: Id96dc5d86719546268b50a9999a06387d2d9075c
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
|
|
Change-Id: Ic5dcadd13c88b8a5e7896dab82404509c081614a
Signed-off-by: Klement Sekera <ksekera@cisco.com>
|
|
a crash on debug image (VPP-1151)
In debug image, there is extra code to validate the buffer when it is
freed. It uses the hash table to lookup the buffer index with spinlock
to prevent contention. However, there is one spinlock for each worker
thread. So allocating the buffer on thread-x and freeing the same buffer
on thread-y causes the validation to fail on thread-y. The fix is to
have only one spinlock, stored in vlib_global_main.
Change-Id: Ic383846cefe84a3e262255afcf82276742f0f62e
Signed-off-by: Steven <sluong@cisco.com>
(cherry picked from commit a7effa1b072463f12305a474f082aeaffb7ada4b)
|
|
Change-Id: I4e2804754b443f5f41fb25eed8334908c4a70f84
Signed-off-by: Damjan Marion <damarion@cisco.com>
|