The current code is sending 8 packet in each internal loop.
In some of the conditions, mbuf is being allocated or freed.
In case of error, the code is returning without taking care of
such buffer. It is better to send already prepared buffer and err
for the current failure only.
Fixes: 9e5f3e6d36 ("net/dpaa2: handle non-hardware backed buffer pool")
Cc: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
name alignment for check command and result functions
putting them as separate functions instead of changing the original
functions.
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
QMan5.0 supports up to 32 frames in one volatile dequeue
command. For the older Qman versions which only support
up to 16 frames, the highest bit in NUMF will be ignored.
Signed-off-by: Haiying Wang <haiying.wang@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
The word_copy is not as efficient as expected, so remove it from
this driver.
Signed-off-by: Haiying Wang <haiying.wang@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
The compilation with gcc-6.3.0 and EXTRA_CFLAGS=-Og gives the following
error:
CC cperf_test_verify.o
cperf_test_verify.c: In function ‘cperf_verify_op’:
cperf_test_verify.c:382:5: error: ‘auth’ may be used uninitialized
in this function
[-Werror=maybe-uninitialized]
if (auth == 1) {
^
cperf_test_verify.c:371:5: error: ‘cipher’ may be used uninitialized
in this function
[-Werror=maybe-uninitialized]
if (cipher == 1) {
^
cperf_test_verify.c:384:11: error: ‘auth_offset’ may be used
uninitialized in this function
[-Werror=maybe-uninitialized]
res += memcmp(data + auth_offset,
^~~~~~~~~~~~~~~~~~~~~~~~~~
vector->digest.data,
~~~~~~~~~~~~~~~~~~~~
options->digest_sz);
~~~~~~~~~~~~~~~~~~~
cperf_test_verify.c:377:11: error: ‘cipher_offset’ may be used
uninitialized in this function
[-Werror=maybe-uninitialized]
res += memcmp(data + cipher_offset,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
vector->plaintext.data,
~~~~~~~~~~~~~~~~~~~~~~~
options->test_buffer_size);
~~~~~~~~~~~~~~~~~~~~~~~~~~
There is no default case in the switch statement, so if options->op_type
is an unknown value, the function will use uninitialized values. Fix it
by adding a default.
Fixes: f8be1786b1 ("app/crypto-perf: introduce performance test application")
Cc: stable@dpdk.org
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
data is allocated but never freed.
Fixes: f8be1786b1 ("app/crypto-perf: introduce performance test application")
Cc: stable@dpdk.org
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
The compilation with gcc-6.3.0 and EXTRA_CFLAGS=-Og gives the following
error:
CC rte_metrics.o
rte_metrics.c: In function
‘rte_metrics_reg_names’: rte_metrics.c:153:22: error: ‘entry’
may be used uninitialized in this function
[-Werror=maybe-uninitialized]
entry->idx_next_set = 0;
~~~~~~~~~~~~~~~~~~~~^~~
This is a false positive, gcc is not able to see that we always go in
the loop at least once, initializing entry.
Fix the warning by initializing entry to NULL.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
The compilation with gcc-6.3.0 and EXTRA_CFLAGS=-Og gives the following
error:
CC cmdline_parse.o
cmdline_parse.c: In function ‘match_inst’:
cmdline_parse.c:227:5: error: ‘token_p’ may be used uninitialized in
this function [-Werror=maybe-uninitialized]
if (token_p) {
^
This is a false positive, gcc is not able to see that we always go in
the loop at least once, initializing token_p.
Fix the warning by initializing token_p to NULL.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
The compilation with gcc-6.3.0 and EXTRA_CFLAGS=-Og gives the following
error:
CC eal_pci_uio.o
eal_pci_uio.c: In function ‘pci_get_uio_de ’:
eal_pci_uio.c:221:9: error: ‘uio_num’ may be used uninitialized in
this function [-Werror=maybe-uninitialized]
return uio_num;
^~~~~~~
This is a false positive: gcc is not able to see that when e != NULL,
uio_num is always set. Fix the warning by initializing uio_num to -1,
and by the way, change the type to int.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
The compilation with gcc-6.3.0 and EXTRA_CFLAGS=-Og gives the following
error:
CC qede_rxtx.o
qede_rxtx.c: In function ‘qede_start_queues’:
qede_rxtx.c:797:9: error: ‘rc’ may be used uninitialized in this
function [-Werror=maybe-uninitialized]
return rc;
^~
If there is no Rx or Tx queue, rc will not be initialized. Fix it
by initializing rc to -1.
Fixes: 4c4bdadfa9 ("net/qede: refactoring multi-queue implementation")
Cc: stable@dpdk.org
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Harish Patil <harish.patil@cavium.com>
The compilation with gcc-6.3.0 and EXTRA_CFLAGS=-Og gives the following
error:
CC rte_pmd_bnxt.o
rte_pmd_bnxt.c: In function ‘rte_pmd_bnxt_set_all_queues_drop_en’:
rte_pmd_bnxt.c:116:6: error: ‘rc’ may be used uninitialized in this
function [-Werror=maybe-uninitialized]
int rc;
^~
This can happen if both bp->nr_vnics and bp->pf.active_vfs are 0.
Fix it by initializing rc to -EINVAL.
Fixes: 49947a13ba ("net/bnxt: support Tx loopback, set VF MAC and queues drop")
Cc: stable@dpdk.org
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
If vectorized Rx burst is short of mbufs in replenishment, Rx SW ring can
overflow as the Rx burst handles 4 packets in a loop. This is because the
function fills SW ring and its mbufs first and checks validity of
each completion later. So, there should be some buffer slots at the tail of
the ring to protect mbufs which are already owned by application.
Fixes: 6cb559d67b ("net/mlx5: add vectorized Rx/Tx burst for x86")
Cc: stable@dpdk.org
Reported-by: Martin Weiser <martin.weiser@allegro-packets.com>
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
One of the main identified use cases for the tap PMD is to be used in
combination with the fail-safe PMD as a fallback for a physical device.
Fail-safe is very strict about making sure its current configuration is
properly applied to all slave devices, they get rejected otherwise in
order to maintain a consistent state.
The problem is that tap's RSS support is currently limited to the
default (non-Toeplitz) balancing performed by the kernel on all Rx
queues. While proper RSS support emulation in the tap PMD is a work in
progress, the lack of rte_flow counterpart prevents validation of the
above use case in the meantime.
Given that unlike most PMDs, tap is more about convenience than
performance, support for the RSS action can be temporarily faked with
a minimum amount of code and mostly correct behavior by treating it
like a QUEUE action. Traffic is directed to the first queue of the set.
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Pascal Mazon <pascal.mazon@6wind.com>
This patch sets TEID of GTP-C and GTP-U as filter type
by replacing existed filter types inner_mac and TUNNEL_KEY.
This configuration will be set when adding GTP-C or
GTP-U filter rules, and it will be invalid only by
NIC core reset.
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
This patch adds i40e_flow_parse_gtp_filter parsing
function for GTP-C and GTP-U to support cloud filter.
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
This patch adds FDIR support for GTP-C and GTP-U. The
input set of GTP-C and GTP-U is TEID.
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Reviewed-by: Seán Harte <seanbh@gmail.com>
rte_eth_fdir_* structures are still used in FDIR functions.
This patch adds i40e private FDIR related structures and
functions to finish integration FDIR with generic flow API.
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Update new packet type and new pctype info when downloading
profile.
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
We were hardcoding the max MAC addresses to 32, while the HW
can support more than that. This was restricting the number of VMDQ
pools that we could support. Use the value obtained from FW instead.
Fixes: 804e746c7b ("net/bnxt: add hardware resource manager init code")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Add support for ntuple filtering.
Only RTE_5TUPLE_FLAGS is supported currently.
RTE_2TUPLE_FLAGS is not supported.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Remove unnecessary check for new flow type for rss hash filter update.
Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Add new commands to manipulate with dynamic flow type to
pctype mapping table in i40e PMD.
Commands allow to print table, modify it and reset to default value.
Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Add new functions which allow modify, return or reset to default
the contents of flow type to pctype dynamic mapping table.
Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Implement dynamic mapping of software flow types to hardware pctypes.
This allows to add new flow types and pctypes for DDP without changing
API of the driver. The mapping table is located in private
data area for particular network adapter and can be individually
modified with set of appropriate functions.
Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Update 'ddp get info' command to display protocols defined in a profile
Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
This patch adds new package info types to get list of protocols,
pctypes and ptypes defined in a profile
Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>