Joyce Kong [Mon, 27 Apr 2020 07:58:51 +0000 (15:58 +0800)]
eal: introduce bit operations API
Bitwise operation APIs are defined and used in a lot of PMDs,
which caused a huge code duplication. To reduce duplication,
this patch consolidates them into a common API family.
Signed-off-by: Joyce Kong <joyce.kong@arm.com> Reviewed-by: Gavin Hu <gavin.hu@arm.com> Reviewed-by: Phil Yang <phil.yang@arm.com> Acked-by: Morten Brørup <mb@smartsharesystems.com>
Dmitry Kozlyuk [Mon, 15 Jun 2020 00:43:54 +0000 (03:43 +0300)]
eal/windows: implement basic memory management
Basic memory management supports core libraries and PMDs operating in
IOVA as PA mode. It uses a kernel-mode driver, virt2phys, to obtain
IOVAs of hugepages allocated from user-mode. Multi-process mode is not
implemented and is forcefully disabled at startup. Assign myself as a
maintainer for Windows file and memory management implementation.
Dmitry Kozlyuk [Mon, 15 Jun 2020 00:43:53 +0000 (03:43 +0300)]
eal/windows: initialize hugepage info
Add hugepages discovery ("large pages" in Windows terminology)
and update documentation for required privilege setup. Only 2MB
hugepages are supported and their number is estimated roughly
due to the lack or unstable status of suitable OS APIs.
Assign myself as maintainer for the implementation file.
Dmitry Kozlyuk [Mon, 15 Jun 2020 00:43:52 +0000 (03:43 +0300)]
doc: split build and run instructions in Windows guide
With memory management implemented for Windows, the guide for running
sample applications is going to be extended with hugepages and driver
setup. Move run instructions to a separate file to give space for
planned expansion.
Dmitry Kozlyuk [Mon, 15 Jun 2020 00:43:51 +0000 (03:43 +0300)]
eal/windows: improve CPU and NUMA node detection
1. Map CPU cores to their respective NUMA nodes as reported by system.
2. Support systems with more than 64 cores (multiple processor groups).
3. Fix magic constants, styling issues, and compiler warnings.
4. Add EAL private function to map DPDK socket ID to NUMA node number.
Dmitry Kozlyuk [Mon, 15 Jun 2020 00:43:50 +0000 (03:43 +0300)]
eal/windows: complete queue.h data structures
Limited version imported previously lacks at least SLIST macros.
Import a complete file from FreeBSD, since its license exception is
already approved by Technical Board.
Dmitry Kozlyuk [Mon, 15 Jun 2020 00:43:49 +0000 (03:43 +0300)]
eal/windows: add tracing stubs
EAL common code depends on tracepoint calls, but generic implementation
cannot be enabled on Windows due to missing standard library facilities.
Add stub functions to support tracepoint compilation, so that common
code does not have to conditionally include tracepoints until proper
support is added.
Dmitry Kozlyuk [Mon, 15 Jun 2020 00:43:48 +0000 (03:43 +0300)]
trace: add size_t field emitter
It is not guaranteed that sizeof(long) == sizeof(size_t). On Windows,
sizeof(long) == 4 and sizeof(size_t) == 8 for 64-bit programs.
Tracepoints using "long" field emitter are therefore invalid there.
Add dedicated field emitter for size_t and use it to store size_t values
in all existing tracepoints.
Dmitry Kozlyuk [Mon, 15 Jun 2020 00:43:47 +0000 (03:43 +0300)]
mem: extract common dynamic memory allocation
Code in Linux EAL that supports dynamic memory allocation (as opposed to
static allocation used by FreeBSD) is not OS-dependent and can be reused
by Windows EAL. Move such code to a file compiled only for the OS that
require it. Keep Anatoly Burakov maintainer of extracted code.
Dmitry Kozlyuk [Mon, 15 Jun 2020 00:43:46 +0000 (03:43 +0300)]
mem: extract common memseg list initialization
All supported OS create memory segment lists (MSL) and reserve VA space
for them in a nearly identical way. Move common code into EAL private
functions to reduce duplication.
Windows uses different APIs for memory mapping and reservation, while
Unices reserve memory by mapping it. Introduce EAL private functions to
support memory reservation in common code:
Wrappers follow POSIX semantics limited to DPDK tasks, but their
signatures deliberately differ from POSIX ones to be more safe and
expressive. New symbols are internal. Being thin wrappers, they require
no special maintenance.
Dmitry Kozlyuk [Mon, 15 Jun 2020 00:43:44 +0000 (03:43 +0300)]
eal: introduce internal wrappers for file operations
Introduce OS-independent wrappers in order to support common EAL code
on Unix and Windows:
* eal_file_open: open or create a file.
* eal_file_lock: lock or unlock an open file.
* eal_file_truncate: enforce a given size for an open file.
Implementation for Linux and FreeBSD is placed in "unix" subdirectory,
which is intended for common code between the two. These thin wrappers
require no special maintenance.
Common code supporting multi-process doesn't use the new wrappers,
because it is inherently Unix-specific and would impose excessive
requirements on the wrappers.
Dmitry Kozlyuk [Mon, 15 Jun 2020 00:43:43 +0000 (03:43 +0300)]
eal: replace page sizes enum with a set of constants
Clang on Windows follows MS ABI where enum values are limited to 2^31-1.
Enum rte_page_sizes has members valued above this limit, which get
wrapped to zero, resulting in compilation error (duplicate values in
enum). Using MS ABI is mandatory for Windows EAL to call Win32 APIs.
Remove rte_page_sizes and replace its values with #define's.
This enumeration is not used in public API, so there's no ABI breakage.
Announce API changes for 20.08 in documentation.
Suggested-by: Jerin Jacob <jerinjacobk@gmail.com> Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Pallavi Kadam [Thu, 11 Jun 2020 19:50:55 +0000 (12:50 -0700)]
eal/windows: fix warnings
Fixed bunch of warnings when compiling using clang on Windows
such as the use of an unsafe string function (strerror),
[-Wunused-variable], [-Wunused-function] in eal_common_options.c
[-Wunused-const-variable] in getopt.c and [-Wunused-parameter]
in eal_common_thread.c.
Also fixed warnings generated using Mingw:
[-Werror=old-style-definition], [-Werror=cast-function-type] and
[-Werror=attributes]
Signed-off-by: Ranjit Menon <ranjit.menon@intel.com> Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com> Tested-by: Narcisa Vasile <navasile@linux.microsoft.com> Acked-by: Narcisa Vasile <navasile@linux.microsoft.com>
Memzones are created in testpmd in order to test external data
buffers functionality. Each memzone is 2Mb in size and divided among
the pool of external memory buffers.
Memzone may not always be fully utilized because mbufs size can vary
and some space can be left unused at the tail of a memzone. This is
not handled properly and mbuf can get the address of this leftover
space since this address is still valid (part of memzone), but there
is not enough space to fit the whole packet data. As a result packet
data may overflow and cause the memory corruption.
Take mbuf size into account when distributing memory addresses from
a memzone to external mbufs. Skip the remaining tail in case there
is not enough room for a packet and move to a next memzone instead.
Fixes: 6c8e50c2e5 ("mbuf: create pool with external memory buffers") Cc: stable@dpdk.org Signed-off-by: Alexander Kozyrev <akozyrev@mellanox.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com> Acked-by: Olivier Matz <olivier.matz@6wind.com>
Xiaolong Ye [Tue, 9 Jun 2020 07:12:56 +0000 (15:12 +0800)]
mbuf: remove unused next member in dynamic flag/field
TAILQ_ENTRY next is not needed in struct mbuf_dynfield_elt and
mbuf_dynflag_elt, since they are actually chained by rte_tailq_entry's
next field when calling TAILQ_INSERT_TAIL(mbuf_dynfield/dynflag_list, te,
next).
Fixes: 4958ca3a443a ("mbuf: support dynamic fields and flags") Cc: stable@dpdk.org Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com> Acked-by: Olivier Matz <olivier.matz@6wind.com>
Ruifeng Wang [Fri, 5 Jun 2020 05:20:55 +0000 (13:20 +0800)]
net/i40e: enable NEON Rx/Tx in meson
The i40e neon vector implementation is not compiled with meson.
Add the file to meson for Arm platform.
Fixes: e940646b20fa ("drivers/net: build Intel NIC PMDs with meson") Cc: stable@dpdk.org Reported-by: David Marchand <david.marchand@redhat.com> Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com> Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com> Reviewed-by: Phil Yang <phil.yang@arm.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Hongbo Zheng [Wed, 3 Jun 2020 09:32:01 +0000 (17:32 +0800)]
net/hns3: check TSO segment size during Tx
Base on hns3 network engine, when the rte_eth_tx_burst API is called
by Upper Level Process, if PKT_TX_TCP_SEG flag is set and tso_segsz
is 0 in the input parameter structure rte_mbuf, hns3 PMD driver will
process this packet as an non-TSO packet, otherwise hardware will enter
an abnormal state.
Fixes: 6dca716c9e1d ("net/hns3: support TSO") Cc: stable@dpdk.org Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com> Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Wei Hu (Xavier) [Wed, 3 Jun 2020 09:32:00 +0000 (17:32 +0800)]
net/hns3: fix VLAN tags reported in Rx
Currently, based on hns3 network engine, driver always reports the
incoming packet's VLAN tags to the structure rte_mbuf those are the
output parameter pointers in '.rx_pkt_burst' ops implementation
function, and never reports PKT_RX_VLAN_STRIPPED flag to the structure
rte_mbuf even if Upper Level Process configured hardware strip by
calling rte_eth_dev_configure or rte_eth_dev_set_vlan_offload API
function. It makes the ULP unable to know the stripping of VLAN.
It is supposed to present the stripped flags to the mbuf ol_flags, and
report the right VLAN tag.
And as hardware constraints, the stripped VLAN tag will always in the Rx
descriptor. Even if setting a PVID based on the function, the PVID will
be reported to the Rx descriptor. So the driver need to determine which
VLAN tag should be reported to output the structure rte_mbuf in
'.rx_pkt_burst' ops implementation function named hns3_recv_pkts.
Fixes: bba636698316 ("net/hns3: support Rx/Tx and related operations") Fixes: 411d23b9eafb ("net/hns3: support VLAN") Cc: stable@dpdk.org Signed-off-by: Chengchang Tang <tangchengchang@huawei.com> Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Chengchang Tang [Wed, 3 Jun 2020 09:31:59 +0000 (17:31 +0800)]
net/hns3: fix VLAN strip configuration when setting PVID
Currently, based on hns3 PF device, hardware will strip 2 vlan tags when
ULP calls rte_eth_dev_set_vlan_pvid API function to set a PVID whether
vlan strip related offload is turned on by calling rte_eth_dev_configure
or rte_eth_dev_set_vlan_offload API function.
When receiving a QinQ packet with the pvid tag, if ULP does not
configure the vlan strip by the method mentioned above, a layer of vlan
tag will be lost to ULP, which is not the expected result.
It is supposed to configure the vlan strip according to the upper level
process's configuration.
Fixes: 411d23b9eafb ("net/hns3: support VLAN") Cc: stable@dpdk.org Signed-off-by: Chengchang Tang <tangchengchang@huawei.com> Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Maximum burst size of Vectorized Rx burst routine is set to
MLX5_VPMD_RX_MAX_BURST(64). This limits the performance of any
application that would like to gather more than 64 packets from
the single Rx burst for batch processing (i.e. VPP).
The situation gets worse with a mix of zipped and unzipped CQEs.
They are processed separately and the Rx burst function returns
small number of packets every call.
Repeat the cycle of gathering packets from the vectorized Rx routine
until a requested number of packets are collected or there are no
more CQEs left to process.
Suanming Mou [Mon, 1 Jun 2020 06:09:43 +0000 (14:09 +0800)]
net/mlx5: add reclaim memory mode
Currently, when flow destroyed, some memory resources may still be kept
as cached to help next time create flow more efficiently.
Some system may need the resources to be more flexible with flow create
and destroy. After peak time, with millions of flows destroyed, the
system would prefer the resources to be reclaimed completely, no cache
is needed. Then the resources can be allocated and used by other
components. The system is not so sensitive about the flow insertion
rate, but more care about the resources.
Both DPDK mlx5 PMD driver and the low level component rdma-core have
provided the flow resources to be configured cached or not, but there is
no APIs or parameters exposed to user to configure the flow resources
cache mode. In this case, introduce a new PMD devarg to let user
configure the flow resources cache mode will be helpful.
This commit is to add a new "reclaim_mem_mode" to help user configure if
the destroyed flows' cache resources should be kept or not.
Their will be three mode can be chosen:
1. 0(none). It means the flow resources will be cached as usual. The
resources will be cached, helpful with flow insertion rate.
2. 1(light). It will only enable the DPDK PMD level resources reclaim.
3. 2(aggressive). Both DPDK PMD level and rdma-core low level will be
configured as reclaimed mode.
With these three mode, user can configure the resources cache mode with
different levels.
Suanming Mou [Mon, 1 Jun 2020 06:09:42 +0000 (14:09 +0800)]
common/mlx5: add memory reclaim glue function
While flow destroyed, rdma-core may still cache some resources for more
efficiently flow recreate. In case the peak time that millions of flows
created and destroyed, the cached resources will be very huge.
Currently, rdma-core provides the new function to configure the flow
resources not to be cached. Add the memory reclaim function to avoid
too many resources be cached.
This is the first patch for the memory reclaim. A new devarg will be
added to PMD to support the reclaim can be configured.
Suanming Mou [Thu, 28 May 2020 09:22:09 +0000 (17:22 +0800)]
net/mlx5: fix interrupt installation timing
Currently, the DevX counter query works asynchronously with Devx
interrupt handler return the query result. When port closes, the
interrupt handler will be uninstalled and the Devx comp obj will
also be destroyed. Meanwhile the query is still not cancelled.
In this case, counter query may use the invalid Devx comp which
has been destroyed, and query failure with invalid FD will be
reported.
Adjust the shared interrupt install and uninstall timing to make
the counter asynchronous query stop before interrupt uninstall.
Suanming Mou [Thu, 28 May 2020 06:59:49 +0000 (14:59 +0800)]
net/mlx5: fix secondary process resources release
When secondary process starts, it will allocate its own process private
data, and also does remap to UAR register of the Tx queue. Once the
secondary process exits, these resources should be released accordingly.
And the shared resources owned by primary should not be touched.
Currently, once one port in the secondary process spawn failed, all the
other spawned ports will also be released during process exits. However,
the mlx5_dev_close() function does not add the cases for secondary
process, it means call the mlx5_dev_close() function directly in
secondary process releases the resources it should not touch.
Add the case for secondary process release to its own resources in
mlx5_dev_close() function to help it quits gracefully.
Fixes: 942d13e6e7d1 ("net/mlx5: fix sharing context destroy order") Fixes: 3a8207423a0f ("net/mlx5: close all ports on remove") Cc: stable@dpdk.org Signed-off-by: Suanming Mou <suanmingm@mellanox.com> Acked-by: Matan Azrad <matan@mellanox.com>
Michael Baum [Wed, 27 May 2020 08:37:57 +0000 (08:37 +0000)]
net/mlx5: fix unreachable MPLS error path
The mlx5_flow_validate_item_mpls function checks MPLS item validation.
It first checks if the device supports MPLS, it is done using the ifdef
condition that if it fails to skip to endif and return the appropriate
error.
When MPLS is supported, the preprocessor will copy the body of the
function ending with return 0 followed by the lines that report MPLS
support.
In fact, these lines are unreachable because before them the function
returns 0 and in any case they are unnecessary.
Replace the endif by else and move endif to the end of the
function.
Fixes: 23c1d42c7138 ("net/mlx5: split flow validation to dedicated function") Cc: stable@dpdk.org Signed-off-by: Michael Baum <michaelba@mellanox.com> Acked-by: Matan Azrad <matan@mellanox.com>
The mlx5_txq_obj_new function defines a pointer named txq_data and
assign value into it. After assigning, the code writer is sure that the
variable does not point to NULL and even express it using assertion.
During the function, the function does dereferencing to the pointer
several times and at no point change its value. However, at the end of
the function at the error label when it wants to free one of the fields
of the structure that txq_data points to, it checks again whether
txq_data is invalid.
This check is unnecessary since it knows for sure that txq_data is
valid.
Remove the aforementioned needless check.
Fixes: 644906881881 ("net/mlx5: add free on completion queue") Cc: stable@dpdk.org Signed-off-by: Michael Baum <michaelba@mellanox.com> Acked-by: Matan Azrad <matan@mellanox.com>
Michael Baum [Wed, 27 May 2020 08:37:55 +0000 (08:37 +0000)]
net/mlx5: fix socket close
The mlx5_pmd_socket_handle function calls the accept function that
returns the socket descriptor into the conn_sock variable. The socket
descriptor value can be 0 (according to accept API) or positive and so
immediately after calling the function it checks whether conn_sock < 0.
Later in the function when other things fail it jumps to the error label
and release previously allocated resources (such as socket or file).
During the resource release, it checks whether the variable conn_sock
containing the socket descriptor is positive and if it is, it releases
it. However, in this check it misses the case where conn_sock == 0, in
this case the socket will not be released and there will be a Resource
leak.
Extend the close condition for 0 value too.
Fixes: e6cdc54cc0ef ("net/mlx5: add socket server for external tools") Cc: stable@dpdk.org Signed-off-by: Michael Baum <michaelba@mellanox.com> Acked-by: Matan Azrad <matan@mellanox.com>
Michael Baum [Wed, 27 May 2020 08:37:54 +0000 (08:37 +0000)]
net/mlx5: remove unnecessary init in socket creation
In the mlx5_pmd_socket_handle function it calls the recvmsg function
which returns the number of bytes read. The function assigns this return
value into a ret variable defined at the beginning of the function.
Similarly in the mlx5_pmd_socket_init function the it calls the socket
function which returns a file descriptor for the new socket. The
function also assigns this return value into a ret variable defined at
the beginning of the function.
In both functions they initialize the variable when defining it,
however, in both cases they do not use any ret variable before assigning
the return value from the function, so the initialization is
unnecessary.
Clean the aforementioned unnecessary initializations.
Fixes: e6cdc54cc0ef ("net/mlx5: add socket server for external tools") Cc: stable@dpdk.org Signed-off-by: Michael Baum <michaelba@mellanox.com> Acked-by: Matan Azrad <matan@mellanox.com>
The mlx5_rxq_obj_hairpin_new function defines a pointer named tmpl and
allocates memory for it using the rte_zmalloc_socket function.
Later, this function allocates memory to a variable inside tmpl using
the mlx5_devx_cmd_create_rq function.
In both cases, if the allocation fails, the code jumps to the error
label and frees allocated resources. However, in the first jump there
are still no resources to free and the jump only for the line return
NULL is unnecessary. Even worse, when it jumps to error label with
invalid tmpl it actually does dereference to a null pointer.
In contrast, the second jump needs to free the tmpl variable but the
function instead of freeing, tries to free the variable that it just
failed to allocate.
In addition, for another error, the function returns NULL without
freeing the tmpl variable before, causing a memory leak.
Delete the error label and replace each jump with local return NULL and
free tmpl variable if needed.
Fixes: e79c9be91515 ("net/mlx5: support Rx hairpin queues") Cc: stable@dpdk.org Signed-off-by: Michael Baum <michaelba@mellanox.com> Acked-by: Matan Azrad <matan@mellanox.com>
The mlx5_txq_obj_hairpin_new function defines a pointer named tmpl and
allocates memory for it using the rte_zmalloc_socket function.
Later, this function allocates memory to a variable inside tmpl using
the mlx5_devx_cmd_create_sq function.
In both cases, if the allocation fails, the code jumps to the error
label and frees allocated resources. However, in the first jump there
are still no resources to free and the jump only for the line return
NULL is unnecessary. Even worse, when it jumps to error label with
invalid tmpl it actually does dereference to a null pointer.
In contrast, the second jump needs to free the tmpl variable but the
function instead of freeing, tries to free the variable that it just
failed to allocate, and another variable that has never been allocated.
In addition, for another error, the function returns NULL without
freeing the tmpl variable before, causing a memory leak.
Delete the error label and replace each jump with local return NULL and
free tmpl variable if needed.
Fixes: ae18a1ae9692 ("net/mlx5: support Tx hairpin queues") Cc: stable@dpdk.org Signed-off-by: Michael Baum <michaelba@mellanox.com> Acked-by: Matan Azrad <matan@mellanox.com>
Mike Baucom [Fri, 22 May 2020 23:55:01 +0000 (19:55 -0400)]
net/bnxt: fix mark action if rule is at index zero
In the ingress path, the cfa_code field in Rx completion identifies the
CFA action rule that was used for the incoming packet. It is possible
that the packet could hit the rule at index 0 in the table.
The mark action code was too restrictive by disallowing a cfa_code of
zero.
This code loosens the requirement and allows zero.
Fixes: b87abb2e55cb ("net/bnxt: support marking packet") Cc: stable@dpdk.org Signed-off-by: Mike Baucom <michael.baucom@broadcom.com> Reviewed-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com> Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Jeff Guo [Wed, 27 May 2020 07:16:50 +0000 (15:16 +0800)]
net/iavf: fix flow uninit
When closing VF device, the process of shutdown adminq should be after
the process of uninit the flow, since the VF might still need to use the
adminq to uninit flow.
Fixes: 9e03acd726cf ("net/iavf: fix flow access") Fixes: ff2d0c345c3b ("net/iavf: support generic flow API") Cc: stable@dpdk.org Signed-off-by: Jeff Guo <jia.guo@intel.com> Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
The original code would deadlock itself if a link change event
happened with link state interrupt enabled. The problem is that
the link state changed message would be seen while reading
the host to guest ring (under lock) and then the driver would
send a query to the host to see the new link state. The response
would never be seen (stuck in a while loop) waiting for the
response.
The solution is to use the link change indication to trigger
a DPDK alarm. The alarm will happen in a different thread and
in that context it can send request for new link state and
also do interrupt callback. This is similar to how the bonding
driver is handling the same thing.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
When the primary device link state is queried, there is no
need to query the VF state as well. The application only sees
the state of the synthetic device.
Fixes: dc7680e8597c ("net/netvsc: support integrated VF") Cc: stable@dpdk.org Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
The code to unset owner of VF device was changing port to invalid
value before calling unset.
Fixes: 4a9efcddaddd ("net/netvsc: fix VF support with secondary process") Cc: stable@dpdk.org Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
These functions are useful for applications and debugging.
The netvsc PMD also transparently handles the rx/tx descriptor
functions for underlying VF device.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Ajit Khaparde [Fri, 22 May 2020 21:27:31 +0000 (14:27 -0700)]
net/bnxt: fix crash during close
We are freeing flow_stats a little early. This results in a
segfault when the driver accesses the members during cleanup.
Move the call to bnxt_free_flow_stats_info() to prevent this.
Rahul Gupta [Fri, 22 May 2020 17:42:09 +0000 (23:12 +0530)]
net/bnxt: fix performance for Arm
Eliminate unnecessary rte_smp_wmb() before writing to request/completion
doorbells. Use rte_cio_wmb() memory barrier instead of rte_io_wmb()
before writing to tx/rx request queue doorbells and use
rte_compiler_barrier() before writing to tx/rx completion queue
doorbells.
Kalesh AP [Fri, 22 May 2020 17:42:08 +0000 (23:12 +0530)]
net/bnxt: fix setting link speed
bnxt PMD uses the macro BNXT_SUPPORTED_SPEEDS to validate
the user requested speed. But this has all the speed values
supported by the PMD and is not chip specific.
The check against this macro returns success when the user
tries set the speed to 100G on a port even if the chip does
not support 100G speed.
Fixed it to use bnxt_get_speed_capabilities() to check the
supported speeds by the chip.
Lijun Ou [Fri, 22 May 2020 09:21:18 +0000 (17:21 +0800)]
net/hns3: fix key length when configuring RSS
When users set the length of RSS hash key greater than the supported
length by hardware, the driver should intercept and can not configure
the wrong key into the hardware.
Fixes: c37ca66f2b27 ("net/hns3: support RSS") Cc: stable@dpdk.org Signed-off-by: Lijun Ou <oulijun@huawei.com> Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Lijun Ou [Fri, 22 May 2020 09:21:17 +0000 (17:21 +0800)]
net/hns3: add RSS hash offload to Rx configuration
Rx offload flag `DEV_RX_OFFLOAD_RSS_HASH` which can be used to
enable/disable PMDs write to `rte_mbuf::hash::rss`. The hns3 PMD driver
already can notify the validity of `rte_mbuf::hash:rss` to the
application by enabling `PKT_RX_RSS_HASH` flag in `rte_mbuf::ol_flags`.
Fixes: 19a3ca4c99cf ("net/hns3: add start/stop and configure operations") Fixes: c37ca66f2b27 ("net/hns3: support RSS") Cc: stable@dpdk.org Signed-off-by: Lijun Ou <oulijun@huawei.com> Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Wei Hu (Xavier) [Fri, 22 May 2020 09:21:16 +0000 (17:21 +0800)]
net/hns3: fix Tx less than 60 bytes
Currently, when running testpmd application based on hns3 network engine
with csum fwd mode by "set fwd csum" command in the prompt line, sending
42 consecutive bytes of ARP packets to network port with packets
generator. But in fact hardware can't send the ARP packets and the
related logs as below:
"Preparing packet burst to failed: Invalid argument"
The hardware doesn't support transmit packets less than 60 bytes, and in
the '.tx_pkt_burst' ops implementation function named hns3_xmit_pkts
appending operation has been added for less than 60 bytes packets. So
the interception needs to be removed in the '.tx_pkt_prepare' ops
implementation function named hns3_prep_pkts.
Fixes: de620754a109 ("net/hns3: fix sending packets less than 60 bytes") Fixes: bba636698316 ("net/hns3: support Rx/Tx and related operations") Cc: stable@dpdk.org Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com> Signed-off-by: Hao Chen <chenhao164@huawei.com> Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Chengchang Tang [Fri, 22 May 2020 09:21:15 +0000 (17:21 +0800)]
net/hns3: clear promiscuous on PF uninit
Currently, promiscuous mode configuration are not cleared during
uninstallation based on hns3 PF device. The residual entries may cause
unnecessary bandwidth usage.
So, we need clear the PF's promisc mode status during the uninit.
Jeff Guo [Sun, 24 May 2020 05:52:30 +0000 (13:52 +0800)]
net/iavf: fix RSS protocol field selector
When VFs configure the rss rule by virtchnl, it need to set bit mask
into the field selector for the protocol, then PF got the configure
massage and parse the field selector to the corresponding protocol
field.
Fixes: 7be10c3004be ("net/iavf: add RSS configuration for VF") Cc: stable@dpdk.org Signed-off-by: Jeff Guo <jia.guo@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com> Tested-by: Zhiwei He <zhiwei.he@intel.com>
Thomas Monjalon [Tue, 26 May 2020 20:29:20 +0000 (22:29 +0200)]
doc: fix API index
With Doxygen 1.8.18, a warning appears when tagging
the main markdown header with {#index}.
That's why the tag has been removed from the API index in DPDK 20.05.
Unfortunately it makes the index page classified as a standard
"related page" instead of being the "main page".
The tag {#mainpage} could be used instead of {#index}.
Another solution, chosen here, is to specify the main page file
in the Doxygen configuration with the variable USE_MDFILE_AS_MAINPAGE.
Fixes: 76fb8fc486f9 ("doc: fix build with doxygen 1.8.18") Cc: stable@dpdk.org Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Tested-by: David Marchand <david.marchand@redhat.com>
Gaetan Rivet [Wed, 13 May 2020 10:42:44 +0000 (12:42 +0200)]
doc: remove old devargs deprecation notice
When modifying the rte_devargs implementation, a deprecation notice was
done for v18.11, regarding internal rte_devargs structure and exposed
functions.
Most of the changes were part of v18.11, but the notice was not removed.
Jerin Jacob [Mon, 25 May 2020 08:15:41 +0000 (13:45 +0530)]
doc: announce removal of non-kernel based PCI probing
In order to optimize the DPDK PCI enumeration management, RTE_KDRV_NONE
based device driver probing will be removed in v20.08.
The legacy virtio is the only consumer of RTE_KDRV_NONE based
device driver probe scheme.
The legacy virtio support will be available through existing VFIO/UIO
based kernel driver scheme.
More details at https://patches.dpdk.org/patch/69351/
Signed-off-by: Jerin Jacob <jerinj@marvell.com> Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com> Acked-by: Olivier Matz <olivier.matz@6wind.com> Acked-by: Thomas Monjalon <thomas@monjalon.net>
Ferruh Yigit [Wed, 4 Mar 2020 09:57:20 +0000 (09:57 +0000)]
doc: announce splitting ethdev ops struct
For the ABI compatibility it is better to hide internal data structures
from the application as much as possible. But because of some inline
functions 'struct eth_dev_ops' can't be hidden completely.
Plan is to split the 'struct eth_dev_ops' into two as ones used by
inline functions and ones not used, and hide the second part that not
used by inline functions completely to the application.
Because of ABI break the work will be done in 20.11
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com> Acked-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Andrew Rybchenko <arybchenko@solarflare.com> Acked-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com> Reviewed-by: Phil Yang <phil.yang@arm.com> Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com> Acked-by: Jerin Jacob <jerinj@marvell.com> Acked-by: David Christensen <drc@linux.vnet.ibm.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
doc: announce ethdev TM API back to experimental status
Based on the discussion in mail thread, it is concluded that
all traffic manager API's (rte_tm.h) need to be marked experimental
till few more releases to support further improvements to spec.
Ferruh Yigit [Wed, 26 Feb 2020 15:01:14 +0000 (15:01 +0000)]
doc: announce deprecation of ethdev HW Rx done API
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com> Acked-by: Jerin Jacob <jerinj@marvell.com> Acked-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Andrew Rybchenko <arybchenko@solarflare.com> Acked-by: David Marchand <david.marchand@redhat.com>
Ferruh Yigit [Mon, 17 Jun 2019 16:06:47 +0000 (17:06 +0100)]
doc: clarify security pre-release end of embargo date
Clarify that a fixed date will be used for end of embargo (public
disclosure) date while communicating with downstream stakeholders.
Initial document got a review that it gives an impression that
communicated embargo date can be a range like 'less than a week' which
is not the case. The range applies when defining the end of the embargo
date but a fix date will be communicated.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com> Acked-by: John McNamara <john.mcnamara@intel.com>
Muhammad Bilal [Thu, 26 Mar 2020 05:46:54 +0000 (10:46 +0500)]
doc: fix typo in contributors guide
Bugzilla ID: 422 Fixes: 9e0e4a00df77 ("doc: suggest to keep doc and code in same patch") Cc: stable@dpdk.org Signed-off-by: Muhammad Bilal <m.bilal@emumba.com>
Ferruh Yigit [Thu, 21 May 2020 15:11:06 +0000 (16:11 +0100)]
doc: update igb_uio module status in Linux guide
igb_uio kernel module disabled by default starting from v20.02,
document this to prevent confusion.
And add note about long term igb_uio plans/directions to move it to
another repo based on DPDK technical board decision:
http://mails.dpdk.org/archives/dev/2019-November/151763.html
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Neil Horman [Thu, 16 Apr 2020 14:54:14 +0000 (10:54 -0400)]
devtools: remove old ABI validation script
Since we've moved away from our initial validate-abi.sh script,
in favor of check-abi.sh, which uses libabigail,
remove the old script from the tree, and update the docs accordingly.
Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Pablo de Lara [Thu, 21 May 2020 09:15:12 +0000 (10:15 +0100)]
doc: add NASM installation steps
The intel-ipsec-mb library requires NASM as a dependency.
Steps on how to get and install NASM are added on the documentation
of the crypto PMDs which requires the library.
Bugzilla ID: 417 Cc: stable@dpdk.org Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Kevin Traynor <ktraynor@redhat.com>