Commit Graph

7633 Commits

Author SHA1 Message Date
Cristian Dumitrescu
dbce95e363 pipeline: add check against loops
Detect when a jump instruction, either conditional or unconditional,
is jumping to itself, thus creating a loop, which is not allowed in
data plane code.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Harshad Narayane <harshad.suresh.narayane@intel.com>
2022-02-13 22:30:59 +01:00
Cristian Dumitrescu
96b37959fb pipeline: add drop port for each pipeline
An additional output port is now implicitly created for every pipeline
to serve as the packet drop port. Up to now, the drop port had to be
explicitly created for each pipeline.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Yogesh Jangra <yogesh.jangra@intel.com>
2022-02-13 22:30:47 +01:00
Cristian Dumitrescu
f23feb063d pipeline: move table type registration to library
Move the table type registration for the well known table types from
the application to the pipeline library.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Yogesh Jangra <yogesh.jangra@intel.com>
2022-02-13 22:08:23 +01:00
Cristian Dumitrescu
6e4a64c8b3 pipeline: move port type registration to library
Move the port type registration for the well known port types from the
application to the pipeline library.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Yogesh Jangra <yogesh.jangra@intel.com>
2022-02-13 22:07:55 +01:00
Cristian Dumitrescu
c07aaa6553 pipeline: improve drop instruction
The output port to be used as the drop port is now determined when the
drop instruction is executed as opposed to being statically determined
at instruction translation time and hardcoded in the opcode.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Yogesh Jangra <yogesh.jangra@intel.com>
2022-02-13 21:58:28 +01:00
Arek Kusztal
518a974bfe cryptodev: reorganize asymmetric structs
This patch adds crypto uint typedef so adding comment
about byte-order becomes unnecessary.

It makes API comments more tidy, and consistent
with other asymmetric crypto APIs.

Additionally it reorganizes code that enums, externs
and forward declarations are moved to the top of the
header file making code more readable.

It removes also comments like co-prime constraint
from mod inv as it is natural mathematical constraint,
not PMD constraint.

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-02-12 11:20:21 +01:00
Arek Kusztal
3ec4cbfdbe cryptodev: use C11 macro instead of direct attribute
This commit replaces __extension__ attribute with
RTE_STD_C11 in anonymous unions.

It makes API consistent in terms of usage of C11
feature macro.

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-02-12 11:20:06 +01:00
Arek Kusztal
baf482c0e3 cryptodev: clarify usage of random numbers in asym
This commit clarifies usage of random numbers in asymmetric
crypto API.

The user is now allowed to provide information to the PMD if random
number should be generated or should be read from user input.
If PMD does not support random number generation user should
always provide it, if PMD does not support user random,
rte_crypto_param.data accordingly should be set to NULL.

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-02-12 11:19:51 +01:00
Arek Kusztal
a678c5d365 cryptodev: add DSA random number k
This commit adds random number 'k' to DSA
op param struct for asymmetric crypto ops.

This parameter is crucial in stiuations where:
- PMD cannot generate random number
- User would like to provide random source

Additionally, it makes DSA consistent with ECDSA
in terms of 'k' which includes this parameter.

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-02-12 11:18:22 +01:00
Ciara Power
757f40e28e cryptodev: modify return value for asym session create
Rather than the asym session create function returning a session on
success, and a NULL value on error, it is modified to now return int
values - 0 on success or -EINVAL/-ENOTSUP/-ENOMEM on failure.
The session to be used is passed as input.

This adds clarity on the failure of the create function, which enables
treating the -ENOTSUP return as TEST_SKIPPED in test apps.

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-02-12 10:26:39 +01:00
Ciara Power
92d55afe0f cryptodev: add asymmetric session user data API
A user data field is added to the asymmetric session structure.
Relevant API added to get/set the field.

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-02-12 10:26:39 +01:00
Ciara Power
a29bb24898 cryptodev: hide asymmetric session structure
The rte_cryptodev_asym_session structure is now moved to an internal
header. This will no longer be used directly by apps,
private session data can be accessed via get API.

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-02-12 10:26:39 +01:00
Ciara Power
1f1e4b7cba cryptodev: use single mempool for asymmetric session
Rather than using a session buffer that contains pointers to private
session data elsewhere, have a single session buffer.
This session is created for a driver ID, and the mempool element
contains space for the max session private data needed for any driver.

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-02-12 10:26:39 +01:00
Ferruh Yigit
4b4f810e47 ethdev: move driver interface functions to its own file
ethdev has two interfaces, one interface between applications and
library, these APIs are declared in the rte_ethdev.h public header.
Other interface is between drivers and library, these functions are
declared in ethdev_driver.h and marked as internal.

But all functions are defined in rte_ethdev.c file. This patch moves
functions for drivers to its own file, ethdev_driver.c for cleanup, no
functional change in functions.

Some public APIs and driver helpers call common internal functions,
which were mostly static since both were in same file. To be able to
move driver helpers, common functions are moved to ethdev_private.c.
(ethdev_private.c is used for functions that are internal to the library
and shared by multiple .c files in the ethdev library.)

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2022-02-11 21:17:34 +01:00
Ferruh Yigit
a41f593f1b ethdev: introduce generic dummy packet burst function
Multiple PMDs have dummy/noop Rx/Tx packet burst functions.

These dummy functions are very simple, introduce a common function in
the ethdev and update drivers to use it instead of each driver having
its own functions.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2022-02-11 21:17:34 +01:00
Sean Zhang
f61490bdf2 ethdev: support GRE optional fields
Add flow pattern items and header format for matching optional fields
(checksum/key/sequence) in GRE header. And the flags in gre item should
be correspondingly set with the new added items.

Signed-off-by: Sean Zhang <xiazhang@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
2022-02-11 16:51:59 +01:00
Sean Zhang
7786991fae net: add optional fields in GRE header
There are optional fields in GRE header(checksum/key/sequence), this
patch adds definition of structures of the optional fields.

Signed-off-by: Sean Zhang <xiazhang@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
2022-02-11 16:51:59 +01:00
Min Hu (Connor)
edcf22c6d3 ethdev: introduce dump API
Added the ethdev dump API which provides querying private info from device.
There exists many private properties in different PMD drivers, such as
adapter state, Rx/Tx func algorithm in hns3 PMD. The information of these
properties is important for debug. As the information is private, the new
API is introduced.

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2022-02-11 11:31:13 +01:00
Weiguo Li
b474ce12a4 vhost: fix null pointer dereference in NUMA realloc
Fixes: b53c9d20fa ("vhost: improve vhost-user layer logs")

Signed-off-by: Weiguo Li <liwg06@foxmail.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-02-10 16:07:44 +01:00
Xueming Li
67cdaea00c vhost: add vDPA resource cleanup callback
This patch adds vDPA device cleanup callback to release resources on
vhost user connection close.

Signed-off-by: Xueming Li <xuemingl@nvidia.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-02-10 15:59:17 +01:00
Jiayu Hu
53d3f4778c vhost: integrate dmadev in asynchronous data-path
Since dmadev is introduced in 21.11, to avoid the overhead of vhost DMA
abstraction layer and simplify application logics, this patch integrates
dmadev in asynchronous data path.

Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Signed-off-by: Sunil Pai G <sunil.pai.g@intel.com>
Tested-by: Yvonne Yang <yvonnex.yang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-02-10 15:59:17 +01:00
Yunjian Wang
8b8dd4451d ethdev: remove unnecessary null check
This NULL check is unnecessary, 'eth_dev' is never NULL.

Fixes: 58b43c1ddf ("ethdev: add telemetry endpoint for device info")
Cc: stable@dpdk.org

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2022-02-10 12:00:22 +01:00
Akhil Goyal
8507a16902 security: add IPsec option for IP reassembly
A new option is added in IPsec to enable and attempt reassembly
of inbound IP packets.

Signed-off-by: Akhil Goyal <gakhil@marvell.com>
2022-02-10 11:23:17 +01:00
Akhil Goyal
3c059b2c56 ethdev: add mbuf dynfield for incomplete IP reassembly
Hardware IP reassembly may be incomplete for multiple reasons like
reassembly timeout reached, duplicate fragments, etc.
To save application cycles to process these packets again, a new
mbuf dynflag is added to show that the mbuf received is not
reassembled properly.

Now if this dynflag is set, application can retrieve corresponding
chain of mbufs using mbuf dynfield set by the PMD. Now, it will be
up to application to either drop those fragments or wait for more time.

Signed-off-by: Akhil Goyal <gakhil@marvell.com>
2022-02-10 11:23:17 +01:00
Akhil Goyal
a75ab6e519 ethdev: introduce IP reassembly offload
IP Reassembly is a costly operation if it is done in software.
The operation becomes even more costlier if IP fragments are encrypted.
However, if it is offloaded to HW, it can considerably save application
cycles.

Hence, a new offload feature is exposed in eth_dev ops for devices which
can attempt IP reassembly of packets in hardware.
- rte_eth_ip_reassembly_capability_get() - to get the maximum values
  of reassembly configuration which can be set.
- rte_eth_ip_reassembly_conf_set() - to set IP reassembly configuration
  and to enable the feature in the PMD (to be called before
  rte_eth_dev_start()).
- rte_eth_ip_reassembly_conf_get() - to get the current configuration
  set in PMD.

Now when the offload is enabled using rte_eth_ip_reassembly_conf_set(),
the resulting reassembled IP packet would be a typical segmented mbuf in
case of success.

And if reassembly of IP fragments is failed or is incomplete (if
fragments do not come before the reass_timeout, overlap, etc), the mbuf
dynamic flags can be updated by the PMD. This is updated in a subsequent
patch.

Signed-off-by: Akhil Goyal <gakhil@marvell.com>
2022-02-10 11:23:11 +01:00
Jie Wang
988cd040ee app/testpmd: add 6 types of L2TPv2 message
This patch adds L2TPv2 control message and 5 types of data message
support for testpmd.

The added L2TPv2 message types are listed below:
1. L2TPv2 control
2. L2TPv2
3. L2TPv2 + length option
4. L2TPv2 + sequence option
5. L2TPv2 + offset option
6. L2TPv2 + length option + sequence option

Signed-off-by: Jie Wang <jie1x.wang@intel.com>
Acked-by: Ori Kam <orika@nvidia.com>
2022-02-09 21:30:14 +01:00
Jie Wang
9747f6955b net: fix L2TPv2 common header
The fields of L2TPv2 common header were reversed in big endian and
little endian.

This patch fixes this error to ensure L2TPv2 can be parsed correctly.

For L2TP reference:
https://datatracker.ietf.org/doc/html/rfc2661#section-3.1

Fixes: 3a929df1f2 ("ethdev: support L2TPv2 and PPP procotol")
Cc: stable@dpdk.org

Signed-off-by: Jie Wang <jie1x.wang@intel.com>
Acked-by: Ori Kam <orika@nvidia.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2022-02-09 21:30:14 +01:00
Jie Wang
f840cf7713 ethdev: add L2TPv2 RSS offload type
This patch defines new RSS offload type for L2TPv2, which
is required when users want to distribute packets based on
the L2TPv2 session ID field.

Signed-off-by: Jie Wang <jie1x.wang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2022-02-09 21:30:14 +01:00
Michael Barker
ed57d08dfd eal: ignore gcc-compat warning in clang-only macro
When compiling with clang using -Wpedantic (or -Wgcc-compat) the use of
diagnose_if kicks up a warning:

.../include/rte_interrupts.h:623:1: error: 'diagnose_if' is a clang
extension [-Werror,-Wgcc-compat]
__rte_internal
^
.../include/rte_compat.h:36:16: note: expanded from macro '__rte_internal'
__attribute__((diagnose_if(1, "Symbol is not public ABI", "error"), \

This change ignores the '-Wgcc-compat' warning in the specific location
where the warning occurs.  It is safe to do in this circumstance as the
specific macro is only defined when using the clang compiler.

Signed-off-by: Michael Barker <mikeb01@gmail.com>
2022-02-12 14:37:47 +01:00
Stephen Hemminger
06c047b680 remove unnecessary null checks
Functions like free, rte_free, and rte_mempool_free
already handle NULL pointer so the checks here are not necessary.

Remove redundant NULL pointer checks before free functions
found by nullfree.cocci

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2022-02-12 12:07:48 +01:00
Stephen Hemminger
e7b1c4665f lib: update documentation of some *_free functions
These functions all behave like libc free() and do
nothing if handed a NULL pointer. The code is already doing
this, this patch just documents the behavior.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2022-02-12 12:05:01 +01:00
Stephen Hemminger
a0cc7be20d mem: cleanup multiprocess resources
The mp action resources in malloc should be cleaned up via
rte_eal_cleanup.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
2022-02-11 19:49:22 +01:00
Stephen Hemminger
e8dc971b63 eal: cleanup multiprocess hotplug resources
When rte_eal_cleanup is called, hotplug should unregister the
resources associated with the multi-process server.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2022-02-11 19:49:22 +01:00
Stephen Hemminger
6412941ae8 vfio: cleanup the multiprocess sync handle
When rte_eal_cleanup is called the rte_mp_action for VFIO
should be freed.

Fixes: edf73dd330 ("ipc: handle unsupported IPC in action register")
Cc: stable@dpdk.org

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
2022-02-11 19:49:22 +01:00
Stephen Hemminger
6e858b4d92 ipc: end multiprocess thread during cleanup
When rte_eal_cleanup is called, all control threads should exit.
For the mp thread, this best handled by closing the mp_socket
and letting the thread see that.

This also fixes potential problems where the mp_socket gets
another hard error, and the thread runs away repeating itself
by reading the same error.

Fixes: 85d6815fa6 ("eal: close multi-process socket during cleanup")
Cc: stable@dpdk.org

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
2022-02-11 19:49:22 +01:00
Stephen Hemminger
5f4eb82f3c log: close in cleanup stage
When application calls rte_eal_cleanup on shutdown,
the DPDK log should be closed and cleaned up.

This helps reduce false reports from tools like ASAN
and valgrind that track memory leaks.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2022-02-11 19:49:22 +01:00
Yunjian Wang
5f69ebbd85 mem: check allocation in dynamic hugepage init
The function malloc() could return NULL, the return value
need to be checked.

Fixes: 6f63858e55 ("mem: prevent preallocated pages from being freed")
Cc: stable@dpdk.org

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
2022-02-11 08:46:21 +01:00
Pavan Nikhilesh
264ff3f250 eal/arm: inline 128-bit atomic compare exchange with GCC
GCC [1] now assigns even register pairs for CASP, the fix has also been
backported to all stable releases of older GCC versions.
Removing the manual register allocation allows GCC to inline the
functions and pick optimal registers for performing CASP.

1: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=563cc649beaf

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>
2022-02-11 08:44:09 +01:00
Bruce Richardson
1d1126ad43 vhost: fix C++ include
The virtio kernel header includes are already noted as being
incompatible with C++. We can ensure that the header is safe for
inclusion in C++ code by not including those headers during C++ builds.
While not ideal, this does ensure that all DPDK headers can be included
in C++ code without errors.

Fixes: f8904d5636 ("vhost: fix header for strict compilation flags")
Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2022-02-10 23:05:32 +01:00
Bruce Richardson
097ea8e274 table: fix C++ include
Since C++ doesn't support automatic casting from void * to other types,
we need to explicitly add the casts to any header files in DPDK.

Fixes: ea7be0a038 ("lib/librte_table: add hash function headers")
Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2022-02-10 23:05:32 +01:00
Bruce Richardson
e82470e225 ipsec: fix C++ include
C++ does not have automatic casting to/from void pointers, so need
explicit cast if header is to be included in C++ code

Fixes: f901d9c826 ("ipsec: add helpers to group completed crypto-ops")
Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2022-02-10 23:05:32 +01:00
Bruce Richardson
ca6732316c graph: fix C++ include
C++ does not have automatic casting to/from void pointers, so need
explicit cast if header is to be included in C++ code

Fixes: 40d4f51403 ("graph: implement fastpath routines")
Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2022-02-10 23:05:32 +01:00
Bruce Richardson
153e7d8813 eventdev: fix C++ include
The eventdev headers had issues when used from C++

* Missing closing "}" for the extern "C" block
* No automatic casting to/from void *

Fixes: a6562f6d6f ("eventdev: introduce event timer adapter")
Fixes: 32e326869e ("eventdev: add tracepoints")
Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2022-02-10 23:05:29 +01:00
Bruce Richardson
59144f6edd eal: fix C++ include
C++ files could not include some headers because:

* "new" is a keyword in C++, so can't be a variable name
* there is no automatic casting to/from void *

Fixes: 184104fc61 ("ticketlock: introduce fair ticket based locking")
Fixes: 032a7e5499 ("trace: implement provider payload")
Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2022-02-10 23:02:35 +01:00
David Marchand
8adf5f528b stack: fix stubs header export
The stubs header is included as part of rte_stack.h for architectures
other than x86_64 and aarch64 (i.e. x86 32 bits and ppc).

Note: chkincs won't catch this issue since it checks headers from within
the source directory.

Fixes: 7911ba0473 ("stack: enable lock-free implementation for aarch64")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
2022-02-10 17:05:19 +01:00
Elena Agostini
d69bb47d21 gpudev: expose GPU memory to CPU
Enable the possibility to expose a GPU memory area and make it
accessible from the CPU.

GPU memory has to be allocated via rte_gpu_mem_alloc().

This patch allows the gpudev library to map (and unmap),
through the GPU driver, a chunk of GPU memory and to return
a memory pointer usable by the CPU to access the GPU memory area.

Signed-off-by: Elena Agostini <eagostini@nvidia.com>
2022-02-10 10:06:56 +01:00
Christophe Fontaine
5e0099dc70 vhost: remove payload size limitation
FDs at the end of the VhostUserMessage structure limits the size
of the payload. Move them to an other englobing structure, before
the header & payload of a VhostUserMessage.
Also removes a reference to fds in the VHUMsg structure defined in
drivers/net/virtio/virtio_user/vhost_user.c

Signed-off-by: Christophe Fontaine <cfontain@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
2022-02-08 12:19:33 +01:00
Yuan Wang
8b764f460f vhost: fix guest to host physical address mapping
Async copy fails when looking up hpa in the gpa to hpa mapping table.
This happens because the gpa is matched exactly in the merged
mapping table, and the merge loses the mapping entries.
A new range comparison method is introduced to solve this issue.

Fixes: 6563cf9238 ("vhost: fix async copy on multi-page buffers")
Cc: stable@dpdk.org

Signed-off-by: Yuan Wang <yuanx.wang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-02-08 12:13:22 +01:00
Jerin Jacob
0de345e9a0 ethdev: support queue-based priority flow control
Based on device support and use-case need, there are two different ways
to enable PFC. The first case is the port level PFC configuration, in
this case, rte_eth_dev_priority_flow_ctrl_set() API shall be used to
configure the PFC, and PFC frames will be generated using based on VLAN
TC value.

The second case is the queue level PFC configuration, in this
case, Any packet field content can be used to steer the packet to the
specific queue using rte_flow or RSS and then use
rte_eth_dev_priority_flow_ctrl_queue_configure() to configure the
TC mapping on each queue.
Based on congestion selected on the specific queue, configured TC
shall be used to generate PFC frames.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2022-02-08 14:02:28 +01:00
Xiaoyun Li
d178f693bb net: add UDP/TCP checksum in mbuf segments
Add functions to call rte_raw_cksum_mbuf() to calculate IPv4/6
UDP/TCP checksum in mbuf which can be over multi-segments.

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Aman Singh <aman.deep.singh@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Tested-by: Sunil Pai G <sunil.pai.g@intel.com>
2022-02-04 13:44:55 +01:00