The log history uses rte_mempool. In order to remove the mempool
dependency in EAL (and improve the build), this feature is deprecated.
The ABI is kept but the behaviour is now voided because it seems this
function was not used. The history can be read from syslog.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: David Marchand <david.marchand@6wind.com>
prefetch the next packet data address in advance in forwarding loop
for performance improvement.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Enhance the logs related to mbuf pool creation. Display an info level
log when creating the mbuf, and display the error as a string on failure.
After the patch, we have:
[...]
EAL: probe driver: 8086:10fb rte_ixgbe_pmd
USER1: create a new mbuf pool <mbuf_pool_socket_0>: n=331456, \
size=2176, socket=0
EAL: Error - exiting with code: 1
Cause: Creation of mbuf pool for socket 0 failed: Cannot allocate \
memory
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
"port config all txqflags <value>" allows for
specifying txq_flags value in command line.
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
"port config all scatter on|off" allows for
controlling rxmode.enable_scatter in command line.
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
This parameter allows for controlling rxmode.enable_scatter
which in turn allow for multi-segment packet receive tests.
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Now that mempool library provide functions to populate with anonymous
mmap'd memory, we can remove this specific code from test-pmd.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
This commit renames mempool_obj_ctor_t as mempool_obj_cb_t.
In next commits, we will add the ability to populate the
mempool and iterate through objects using the same function.
We will use the same callback type for that. As the callback is
not a constructor anymore, rename it into rte_mempool_obj_cb_t.
The rte_mempool_obj_iter_t that was used to iterate over objects
will be removed in next commits.
No functional change.
In this commit, the API is preserved through a compat typedef.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Many drivers provide their own implementation of rte_mbuf_raw_alloc(),
duplicating the code. Introduce a new public function in rte_mbuf to
allocate a raw mbuf (uninitialized).
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
CID 13307 (#1 of 1): Copy into fixed size buffer (STRING_OVERFLOW)
fixed_size_dest: You might overrun the 128 byte fixed-size string fwd_modes
by copying fwd_eng->fwd_mode_name without checking the length.
Fixes: 769ce6b178 ("app/testpmd: list forwarding engines")
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
With LIBRTE_PMD_XENVIRT enabled testpmd is built in a way to ONLY work
in XEN environments.
It will surface as:
PMD: gntalloc: ioctl error
EAL: Error - exiting with code: 1
Cause: Creation of mbuf pool for socket 0 failed
With LIBRTE_PMD_XENVIRT enabled this now tries the xen style grant
table allocation, but falls back gracefully for the normal allocation.
The only thing left in the log will be the
PMD: gntalloc: ioctl error
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
The link speed configuration is now done with bitmaps so 100G speed
requires only a new bit flag.
The actual link speed is a number so its size must be increased from
16-bit to 32-bit.
Signed-off-by: Marc Sune <marcdevel@gmail.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Tested-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Tested-by: Matej Vido <vido@cesnet.cz>
This patch redesigns the API to set the link speed/s configuration
of an ethernet port. Specifically:
- it allows to define a set of advertised speeds for
auto-negociation.
- it allows to disable link auto-negociation (single fixed speed).
- default: auto-negociate all supported speeds.
A flag autoneg in struct rte_eth_link indicates if link speed was a
result of auto-negociation or was fixed by configuration.
Signed-off-by: Marc Sune <marcdevel@gmail.com>
Tested-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Tested-by: Beilei Xing <beilei.xing@intel.com>
Tested-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
The speed numbers ETH_LINK_SPEED_ are renamed ETH_SPEED_NUM_.
The prefix ETH_LINK_SPEED_ is kept for AUTONEG and will be used
for bit flags in next patch.
Signed-off-by: Marc Sune <marcdevel@gmail.com>
The code for checking and parsing speed/duplex was duplicated.
The new function is also checking the speed/duplex combination.
Signed-off-by: Marc Sune <marcdevel@gmail.com>
Define and use ETH_LINK_UP and ETH_LINK_DOWN where appropriate.
Signed-off-by: Marc Sune <marcdevel@gmail.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Build log:
/root/dpdk/app/test-pmd/cmdline.c:6687:45: error: no member named
's6_addr32' in 'struct in6_addr'
rte_be_to_cpu_32(res->ip_value.addr.ipv6.s6_addr32[i]);
This is caused by macro "s6_addr32" not defined on FreeBSD and testpmd
swap big endian parameter to host endian. Move the swap action to i40e
ethdev will fix this issue.
Fixes: 7b1312891b ("ethdev: add IP in GRE tunnel")
Signed-off-by: Marvin Liu <yong.liu@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Tested-by: Bruce Richardson <bruce.richardson@intel.com>
This patch extends the commands for changing flow director filter's input
set. It adds vlan as a possible filter input field.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
This patch extends commands for changing a flow director filter's input
set. It adds tos, protocol and ttl as filter's input fields, and removes
the words selection from flex payloads.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
This patch fixes error #188: enumerated type mixed with another type,
when uint32_t is casted on enum type in icc.
Fixes: 05f1b9c82e ("app/testpmd: add commands for L2 tunnel config")
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Comment for "ierrors" counter says that it counts erroneous received
packets. But for some reason "imissed" counter is added to "ierrors"
counter in most drivers.
It is a mistake, because missed packets are obviously not received.
This patch fixes it.
Fixes: 70bdb18657 ("ethdev: add Rx error counters for missed, badcrc and badlen packets")
Fixes: 6bfe648406 ("i40e: add Rx error statistics")
Fixes: 856505d303 ("cxgbe: add port statistics")
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Added testpmd support to validate zero nb_rxq/nb_txq
changes of ethdev (d505ba8).
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Change the fields of outer_mac and inner_mac in struct
rte_eth_tunnel_filter_conf from pointer to struct in order to
keep the code's readability.
Signed-off-by: Xutao Sun <xutao.sun@intel.com>
Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
The names of function for tunnel port configuration are not
accurate. They're tunnel_add/del, better change them to
tunnel_port_add/del.
The old functions are directly replaced because the API and ABI
compatibility of ethdev are already broken in 16.04.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Add the CLIs to support the E-tag operation.
1, Offloading of E-tag insertion and stripping.
2, Forwarding the E-tag packets to pools based on the GRP and E-CID_base.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Shaopeng He <shaopeng.he@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Tested-by: Yong Liu <yong.liu@intel.com>
Add CLIs to config ether type of l2 tunnel, and to enable/disable
a type of l2 tunnel.
Now only e-tag tunnel is supported.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Shaopeng He <shaopeng.he@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Tested-by: Yong Liu <yong.liu@intel.com>
In order to set ether type of VLAN for single VLAN, inner
and outer VLAN, the VLAN type as an input parameter is added
to 'rte_eth_dev_set_vlan_ether_type()'.
In addition, corresponding changes in e1000, ixgbe and i40e
are also added.
It is an ABI break but ethdev library is already bumped for 16.04.
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Previously, max_socket was set to the highest numbered socket with
an enabled lcore. The intent is to set it to the highest socket
regardless of it being enabled.
Fixes: 7acf894d07 ("app/testpmd: detect numa socket count")
Signed-off-by: Stephen Hurd <shurd@broadcom.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
When using testpmd, sometimes we forget the right order of port_id and
vid in "tx_vlan set (port_id) vlan_id[, vlan_id_outer]\n" command, and
input "tx_vlan set 51 0", we'll get a strange prompt saying "Error, as
QinQ has been enabled.".
In cmd_tx_vlan_set_parsed function, the first thing we do is checking
the port's vlan_offload capability, rather than checking validity of the
port_id, therefore if it's an invalid port_id we'll get the above wrong
message. We should always make sure that we get a valid port_id before
we do other things.
It's the similar issue for cmd_tx_vlan_set_qinq_parsed function.
Fixes: 92ebda07ee ("app/testpmd: add qinq stripping and insertion")
Signed-off-by: Wang Xiao W <xiao.w.wang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Fixed issue of byte order in ethdev library that the structure
for setting fdir's mask and flow entry is inconsist and made
inputs of mask be in big endian.
Fixes: 2d4c1a9ea2 ("ethdev: add new flow director masks")
Fixes: 76c6f89e80 ("ixgbe: support new flow director masks")
Reported-by: Yaacov Hazan <yaacovh@mellanox.com>
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Zhe Tao <zhe.tao@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Several NICs can handle 512 entries/queues in their RETA table,
an 8 bit field is not large enough for them.
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
fix the error reported by checkpatch:
"ERROR: return is not a function, parentheses are not required"
remove parentheses in return like:
"return (logical expressions)"
remove parentheses in return a function like:
"return (rte_mempool_lookup(...))"
Fixes: 6307b909b8 ("lib: remove extra parenthesis after return")
Signed-off-by: Huawei Xie <huawei.xie@intel.com>
IEEE1588 forwarding mode uses same port to receive and transmit packets.
In this mode, the MAC address in the packets are not touched,
and therefore, packets could be sent with the same destination
MAC address as the MAC address of the port that is transmitting,
which causes the packet to be dropped in some NICs.
In order to avoid this scenario, MAC addresses are swapped
before packet is sent out.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
The standard for DPDK is to use memset() not bzero which
is a leftover BSD-ism.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Fixes: ab3257e13d ("app/testpmd: add command to display queue info")
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Testpmd was only printing out second values when printing
RX/TX timestamp value, instead of both second and nanoseconds.
Since resolution of time counters is in nanoseconds,
testpmd should print out both.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Reviewed-by: John McNamara <john.mcnamara@intel.com>
For CSUM forwarding mode add ability to copy & split outgoing packet
into the new mbuf that consists of multiple segments.
For TXONLY and CSUM forwarding modes add ability to make number of
segments in the outgoing packet to vary on a per packet basis.
Number of segments and size of each segment is controlled by
'set txpkts' command.
Split policy is controlled by 'set txsplit' command.
Possible values are: on | off | rand.
Tha allows to increase test coverage for TX PMD codepaths.
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
It fixes compile issue on ICC 13.0.0.
Error logs:
app/test-pmd/cmdline.c(8160): error #188: enumerated type mixed
with another type
entry.input.flow.tunnel_flow.tunnel_type =
str2fdir_tunneltype(res->tunnel_type);
Fixes: 53b2bb9b7e ("app/testpmd: new flow director commands")
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
icmp echo forward engine relies on the core rank rather than the number of
queues available.
This fix is still wrong, because if we set a nb-rxq > nb-txq, then we will
use an invalid txq, but with this, we are aligned on other fwd engines.
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
After implementing the fdir new modes for x550, the CLIs are modified.
Forgot to update the related help info and doc.
Fixes: 53b2bb9b7e ("app/testpmd: new flow director commands")
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Test commands are added to support selecting different length of GRE key.
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Signed-off-by: Andrey Chilikin <andrey.chilikin@intel.com>
Test commands are added to support selecting input set, or adding
new input set per different pctype.
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Signed-off-by: Andrey Chilikin <andrey.chilikin@intel.com>
This patch adds a command to display DCB info in ports.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>