Pavan Nikhilesh [Fri, 9 Aug 2019 09:55:59 +0000 (15:25 +0530)]
doc: announce ethdev API changes in offload flags
Add new offload flags ``DEV_RX_OFFLOAD_RSS_HASH`` and
``DEV_RX_OFFLOAD_FLOW_MARK``.
Add new function ``rte_eth_dev_set_supported_ptypes`` to allow application
to set specific ptypes to be updated in ``rte_mbuf::packet_type``
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com> Acked-by: Andrew Rybchenko <arybchenko@solarflare.com> Acked-by: Jerin Jacob <jerinj@marvell.com> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Thomas Monjalon [Tue, 6 Aug 2019 13:31:35 +0000 (15:31 +0200)]
doc: announce removal of old port count function
The function rte_eth_dev_count() was marked as deprecated in DPDK 18.05
in commit d9a42a69febf ("ethdev: deprecate port count function").
It is planned to be removed after the next LTS release.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: David Marchand <david.marchand@redhat.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com> Acked-by: Andrew Rybchenko <arybchenko@solarflare.com> Acked-by: Jerin Jacob <jerinj@marvell.com>
Andrew Rybchenko [Tue, 23 Jul 2019 14:07:51 +0000 (15:07 +0100)]
doc: announce ethdev functions will not return void
void return value is bad for get API (like rte_eth_dev_info-get())
since caller does not know if the function does its job or not and
output value is filled in.
void return value is bad for state changing API (like
rte_eth_promiscuous_enable()) since caller should use get API
to understand if state is really changed.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com> Acked-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Jerin Jacob <jerinj@marvell.com>
Tell users about upcoming changes to rte_ether_addr and
rte_ether_header.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Andrew Rybchenko <arybchenko@solarflare.com> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com> Acked-by: Thomas Monjalon <thomas@monjalon.net>
David Marchand [Thu, 8 Aug 2019 09:31:29 +0000 (11:31 +0200)]
doc: announce lcore config struct removal from ABI
New accessors have been introduced to provide the hidden information.
This symbol can now be kept internal.
Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Jerin Jacob <jerinj@marvell.com> Acked-by: Andrew Rybchenko <arybchenko@solarflare.com> Acked-by: Thomas Monjalon <thomas@monjalon.net>
David Marchand [Thu, 8 Aug 2019 09:32:06 +0000 (11:32 +0200)]
doc: announce malloc virt2phys function removal
This symbol has been deprecated for quite some time.
Let's drop it as soon as possible.
Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com> Acked-by: Jerin Jacob <jerinj@marvell.com> Acked-by: Andrew Rybchenko <arybchenko@solarflare.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
David Marchand [Thu, 8 Aug 2019 09:30:46 +0000 (11:30 +0200)]
doc: announce CPU flags check function removal
This symbol has been deprecated for quite some time.
Let's drop it as soon as possible.
Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Aaron Conole <aconole@redhat.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com> Acked-by: Andrew Rybchenko <arybchenko@solarflare.com> Acked-by: Jerin Jacob <jerinj@marvell.com> Acked-by: Thomas Monjalon <thomas@monjalon.net>
Gagandeep Singh [Thu, 8 Aug 2019 12:13:20 +0000 (17:43 +0530)]
eal: increase maximum different hugepage sizes on Arm
ARM is supporting maximum 4 hugepage sizes (64K, 2M, 32M
and 1G) when granule is 4KB since very long and DPDK
support maximum 3 hugepage sizes.
With all 4 hugepage sizes enabled, applications and some
stacks like VPP which are working over DPDK and using
"in-memory" eal option, or using separate mount points
on ARM based platform, fails at huge page initialization,
reporting error messages from eal:
EAL: FATAL: Cannot get hugepage information.
EAL: Cannot get hugepage information.
EAL: Error - exiting with code: 1
This issue is originated from Linux 5.0
(a21b0b78eaf7 "arm64: hugetlb: Register hugepages during arch init")
where kernel is by default creating directories for each supported
hugepage size in /sys/kernel/mm/hugepages/
On earlier Stable Kernel LTR's, the directories visible in
/sys/kernel/mm/hugepages/ were dependent upon what hugepage
sizes are configured at boot time.
This change increases the maximum supported hugepage sizes
to 4 for ARM based platforms.
Congwen Zhang [Thu, 8 Aug 2019 00:37:20 +0000 (08:37 +0800)]
net/ixgbe/base: fix product version check
The "and" condition offset == 0 && offset == NVM_INVALID_PTR
can never be true.
Fixes: cf3af5aa56c9 ("net/ixgbe/base: add functions to get version info") Cc: stable@dpdk.org Signed-off-by: Congwen Zhang <zhang.congwen@zte.com.cn> Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
net/mlx5: fix completion request for multi-segment
The copying of sent mbufs pointers might be deferred to the end of
tx_burst() routine to be copied in one call of rte_memcpy.
For the multi segment packets this optimization is not applicable,
because number of packets does not match with number of mbufs and
we do not have linear array of pointers in pkts parameter.
The completion request generating routine wrongly took into account
the inconsistent (for multi-segment packets) deferred pointer copying.
Aaron Conole [Wed, 7 Aug 2019 14:58:44 +0000 (10:58 -0400)]
test/mcslock: wait for lcore completion
It's possible that the mcsunlock occurs before the test_mcslock_try has
a chance to execute, which will result in the trylock being successful,
making the test case fail. Fix this by waiting until all lcores have
completed their test before unlocking the master lock.
Fixes: 32dcb9fd2a22 ("test/mcslock: add MCS queued lock unit test") Signed-off-by: Aaron Conole <aconole@redhat.com> Acked-by: Phil Yang <phil.yang@arm.com> Reviewed-by: David Marchand <david.marchand@redhat.com>
Amit Gupta [Wed, 7 Aug 2019 13:12:09 +0000 (18:42 +0530)]
app/testpmd: fix latency stats deinit on signal
On receiving signal, testpmd showing warning as
"LATENCY_STATS: failed to remove Rx/Tx callback"
because rte_latencystats_uninit is called without
checking if latencystats is enabled or not.
After this fix, rte_latencystats_uninit will be
called only if latencystats is enabled.
Fixes: 62d3216d6194 ("app/testpmd: add latency statistics calculation") Cc: stable@dpdk.org Signed-off-by: Amit Gupta <agupta3@marvell.com> Acked-by: Jerin Jacob <jerinj@marvell.com> Tested-by: Jerin Jacob <jerinj@marvell.com>
Jerin Jacob [Wed, 7 Aug 2019 03:11:34 +0000 (08:41 +0530)]
net/memif: fix build with gcc 9.1
gcc-9 is stricter on NULL arguments for printf.
Fix the following build error by avoiding NULL argument to printf.
In file included from drivers/net/memif/memif_socket.c:26:
In function 'memif_socket_create',
inlined from 'memif_socket_init' at net/memif/memif_socket.c:965:12:
net/memif/rte_eth_memif.h:35:2: error:
'%s' directive argument is null [-Werror=format-overflow=]
35 | rte_log(RTE_LOG_ ## level, memif_logtype, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
36 | "%s(): " fmt "\n", __func__, ##args)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Thomas Monjalon [Tue, 30 Jul 2019 15:57:26 +0000 (17:57 +0200)]
doc: remove deprecated ethdev features
As legacy filter API "filter_ctrl" is superseded since 2017
by the rte_flow API, and got the deprecated attribute in DPDK 19.05,
it is time to remove the associated features from the matrix.
Not documenting deprecated features as supported will avoid confusion.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Andrew Rybchenko <arybchenko@solarflare.com> Acked-by: Jerin Jacob <jerinj@marvell.com> Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
The shared Infiniband device context should be included
into memory event callback list only once on context creation,
and removed from the list only once on context destroying.
Multiple insertions of the same object caused the infinite
loop on the list processing.
Xiaoyu Min [Wed, 24 Jul 2019 11:31:56 +0000 (19:31 +0800)]
net/mlx5: fix RSS expand for IP-in-IP
The RSS expand function for IP-in-IP tunnel type is missed,
which leads to create following flow failed:
flow create 0 ingress pattern eth / ipv4 proto is 4 /
ipv4 / udp / end actions rss queues 0 1 end level 2
types ip ipv4-other udp ipv4 ipv4-frag end /
mark id 221 / count / end
In order to make RSS expand function working correctly,
now the way to check whether a IP tunnel existing is to
check whether there is the second IPv4/IPv6 item and whether the
first IPv4/IPv6 item's next protocl is IPPROTO_IPIP/IPPROTO_IPV6.
For example:
... pattern eth / ipv4 proto is 4 / ipv4 / ....
Fixes: 5e33bebdd8d3 ("net/mlx5: support IP-in-IP tunnel") Signed-off-by: Xiaoyu Min <jackmin@mellanox.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Thomas Monjalon [Mon, 5 Aug 2019 15:32:20 +0000 (17:32 +0200)]
doc: remove useless console syntax in mlx guides
It is not needed to use "console" syntax highlighting
for literal blocks.
The file is easier to read by removing the code-block lines
and simply having double colons in previous line.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Raslan Darawsheh <rasland@mellanox.com>
Thomas Monjalon [Mon, 5 Aug 2019 15:32:18 +0000 (17:32 +0200)]
doc: improve firmware configuration in mlx5 guide
The command mlxconfig was not enough explained and too much verbose
at the same time.
The syntax is now explained in introduction before listing the options,
without repeating the commands.
Some options, which are explained elsewhere in the doc,
are added to this list.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Raslan Darawsheh <rasland@mellanox.com>
Dekel Peled [Mon, 5 Aug 2019 11:51:19 +0000 (14:51 +0300)]
net/mlx5: fix UDP checksum zeroing
Function flow_dv_zero_encap_udp_csum() uses a while loop to iterate
over vlan items in flow rule.
Pointer next_hdr is incremented to the next item before it is used,
so the first item is skipped.
This patch moves the incrementing of next_hdr to the correct place.
Fixes: bf1d7d9a033a ("net/mlx5: zero out UDP checksum in encapsulation") Signed-off-by: Dekel Peled <dekelp@mellanox.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Xiaoyu Min [Mon, 5 Aug 2019 08:02:03 +0000 (16:02 +0800)]
net/mlx5: fix link speed info when link is down
When the link is down, the link speed returned by ethtool is
UINT32_MAX and the link status is 0.
In this case, the DPDK ethdev link speed should be set to
ETH_SPEED_NUM_NONE.
Otherwise since link speed is non-zero but link status is zero, this
is an inconsistent situation and -EAGAIN is returned, which is not right.
Fixes: 188408719888 ("net/mlx5: fix support for newer link speeds") Cc: stable@dpdk.org Signed-off-by: Xiaoyu Min <jackmin@mellanox.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
net/mlx5: fix completion queue overflow for large burst
There is the limit on completion descriptor fetch to improve
latency. If burst size is large there might be not enough
resources freed in completion processing. This fix reiterates
sending loop and allows multiple completion descriptor fetch
and processing.
This patch fixes the default settings for packet size to inline
with Enhanced Multi-Packet Write feature, allowing 256B packets
to be inlined with Out-Of-the-Box settings.
If the minimal inline data are required the data inline feature
must be engaged. There were the incorrect settings enabling the
entire small packet inline (in size up to 82B) which may result
in sending rate declining if there is no enough cores. The same
problem was raised if inline was enabled to support VLAN tag
insertion by software.
The completion loop speed optimizations for error-free
operations are done - no CQE field fetch on each loop
iteration. Also, code size is oprimized - the flush
buffers routine is invoked once.
The patch [Fixes] sets the default value of required minimal
inline data to 0 bytes. On some configurations (depends
on switchdev/legacy settings and FW version/settings)
the ConnectX-4LX NIC requires minimal 18 bytes of
Tx descriptor inline data to operate correctly.
Wrongly set to 0 default value may prevent NIC from operating
with out-of-the-box settings, this patch reverts default
value for ConnectX-4LX back to 18 bytes (inline L2).
Dekel Peled [Mon, 5 Aug 2019 07:07:05 +0000 (10:07 +0300)]
net/mlx5: fix flow rule configuration
Some flow rules were not configured.
Part of the code in function flow_dv_matcher_enable() is enclosed in
'#ifdef HAVE_MLX5DV_DR' preprocessor directive.
Using this directive is not needed here, and prevents compilation of
relevant code.
This patch removes the unnecessary preprocessor directive.
Function mlx5_flow_validate_item_vlan() validates the user setting
is supported by NIC, using a mask with TCI mask 0x0fff.
This check will reject a flow rule specifying a vlan pcp item.
This patch updates mlx5_flow_validate_item_vlan() to use mask 0xffff,
so flow rules with vlan pcp item are accepted.
net/mlx4: fix crash on info query in secondary process
mlx4_dev_info_get calls mlx4_get_ifname, but mlx4_get_ifname
uses priv->ctx which is not a valid pointer in a secondary
process. The fix is to cache the value in primary.
In the primary process, get and store the interface index of
the device so that secondary process can see it.
Bugzilla ID: 320 Fixes: 61cbdd419478 ("net/mlx4: separate device control functions") Cc: stable@dpdk.org Reported-by: Suyang Ju <sju@paloaltonetworks.com> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Matan Azrad <matan@mellanox.com>
The function mlx5_set_min_inline() includes a switch() that checks
various PCI device IDs in order to set the txq_inline_min value. No
value is set when the PCI device ID matches the ConnectX-5 adapters,
resulting in an assert() failure later in the function
mlx5_set_txlimit_params().
This error was encountered on an IBM Power 9 system running RHEL 7.6
w/o Mellanox OFED installed.
Fixes: 38b4b397a57d ("net/mlx5: add Tx configuration and setup") Signed-off-by: David Christensen <drc@linux.vnet.ibm.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
net/mlx5: add workaround for VLAN in virtual machine
On some virtual setups (particularly on ESXi) when we have SR-IOV and
E-Switch enabled there is the problem to receive VLAN traffic on VF
interfaces. The NIC driver in ESXi hypervisor does not setup E-Switch
vport setting correctly and VLAN traffic targeted to VF is dropped.
The patch provides the temporary workaround - if the rule
containing the VLAN pattern is being installed for VF the VLAN
network interface over VF is created, like the command does:
ip link add link vf.if name mlx5.wa.1.100 type vlan id 100
The PMD in DPDK maintains the database of created VLAN interfaces
for each existing VF and requested VLAN tags. When all of the RTE
Flows using the given VLAN tag are removed the created VLAN interface
with this VLAN tag is deleted.
The name of created VLAN interface follows the format:
evmlx.d1.d2, where d1 is VF interface ifindex, d2 - VLAN ifindex
Implementation limitations:
- mask in rules is ignored, rule must specify VLAN tags exactly,
no wildcards (which are implemented by the masks) are allowed
- virtual environment is detected via rte_hypervisor() call,
and the type of hypervisor is checked. Currently we engage
the workaround for ESXi and unrecognized hypervisors (which
always happen on platforms other than x86 - it means workaround
applied for the Flow over PCI VF). There are no confirmed data
the other hypervisors (HyperV, Qemu) need this workaround,
we are trying to reduce the list of configurations on those
workaround should be applied.
Xiao Zhang [Mon, 5 Aug 2019 23:20:54 +0000 (07:20 +0800)]
net/fm10k: fix address of first segment
This patch fixes (dereference after null check) coverity issue.
The address of first segmented packets was not set correctly during
reassembling packets which led to this issue.
Xiao Zhang [Mon, 5 Aug 2019 23:20:53 +0000 (07:20 +0800)]
net/iavf: fix address of first segment
This patch fixes (dereference after null check) coverity issue.
The address of first segmented packets was not set correctly during
reassembling packets which led to this issue.
Xiao Zhang [Mon, 5 Aug 2019 23:20:52 +0000 (07:20 +0800)]
net/i40e: fix address of first segment
This patch fixes (dereference after null check) coverity issue.
The address of first segmented packets was not set correctly during
reassembling packets which led to this issue.
Coverity issue: 343422, 343403 Fixes: ca74903b75cf ("net/i40e: extract non-x86 specific code from vector driver") Cc: stable@dpdk.org Signed-off-by: Xiao Zhang <xiao.zhang@intel.com> Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
Xiao Zhang [Mon, 5 Aug 2019 23:20:51 +0000 (07:20 +0800)]
net/ice: fix address of first segment
This patch fixes (dereference after null check) coverity issue.
The address of first segmented packets was not set correctly during
reassembling packets which led to this issue.
Coverity issue: 343452, 343407 Fixes: c68a52b8b38c ("net/ice: support vector SSE in Rx") Cc: stable@dpdk.org Signed-off-by: Xiao Zhang <xiao.zhang@intel.com> Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
Xiao Zhang [Mon, 5 Aug 2019 23:20:50 +0000 (07:20 +0800)]
net/ixgbe: fix address of first segment
This patch fixes (dereference after null check) coverity issue.
The address of first segmented packets was not set correctly during
reassembling packets which led to this issue.
Coverity issue: 13245 Fixes: 8a44c15aa57d ("net/ixgbe: extract non-x86 specific code from vector driver") Cc: stable@dpdk.org Signed-off-by: Xiao Zhang <xiao.zhang@intel.com> Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
Example BPF programs t2.c, t3.c in folder examples/bpf are
failing to compile with latest dpdk.org master.
The reason is changes in some core DPDK header files, that causes
now inclusion of x86 specific headers.
To overcome the issue, minimize inclusion of DPDK header files
into BPF source code.
Bugzilla ID: 321
Fixes: 9dfc06c26a8b ("test/bpf: add samples") Cc: stable@dpdk.org Reported-by: Michel Machado <michel@digirati.com.br> Suggested-by: Michel Machado <michel@digirati.com.br> Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Xiaoyun Li [Mon, 5 Aug 2019 05:57:28 +0000 (13:57 +0800)]
examples/ntb: fix error handling
This patch adds return value checking for fseek function to fix
error handling issue found by coverity scan.
Coverity issue: 344996 Fixes: c5eebf85badc ("examples/ntb: add example for NTB") Cc: stable@dpdk.org Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com> Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
Vamsi Attunuru [Fri, 2 Aug 2019 06:57:16 +0000 (12:27 +0530)]
common/octeontx2: fix mbox memory access
Octeontx2 PMD's mailbox client uses device memory to send messages
to mailbox server in the admin function Linux kernel driver.
The device memory used for the mailbox communication needs to
be qualified as volatile memory type to avoid unaligned device
memory accesses because of compiler's memory access coalescing.
This patch modifies the mailbox request and responses as volatile
type which were non-volatile earlier and accessed from unaligned
memory addresses which resulted in bus errors on Fedora 30 with
gcc 9.1.1.
Liron Himi [Mon, 5 Aug 2019 10:16:56 +0000 (13:16 +0300)]
net/mvpp2: remove resources when port is closed
Since 18.11, it is suggested that driver should release all its private
resources at the dev_close routine. So all resources previously released
in remove routine are now released at the dev_close routine, and the
dev_close routine will be called in driver remove routine in order to
support removing a device without closing its ports.
Above behavior changes are supported by setting RTE_ETH_DEV_CLOSE_REMOVE
flag during probe stage.
Amit Gupta [Mon, 5 Aug 2019 08:00:44 +0000 (13:30 +0530)]
net/thunderx: fix crash on detach
Fix the PCIe detach segfault by releasing eth_dev resources
by adding nicvf cleanup support on PCI detach.
Fixes: fdf91e0f2fac ("drivers/net: do not use ethdev driver") Cc: stable@dpdk.org Signed-off-by: Amit Gupta <agupta3@marvell.com> Acked-by: Jerin Jacob <jerinj@marvell.com>
Update workaround changes for erratas that are fixed on 96xx A1.
This patch also enables cq drop for all the passes for
maintaining performance along with updating a default
Rx ring size in dev_info.
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com> Acked-by: Jerin Jacob <jerinj@marvell.com>
Patch extends minimum supported max_sqb_count devarg value
such that it can limit the max sqb count to 8 buffers and
also defines NIX_DEF_SQB and uses it to compute the number
of sqe buffers required for the egress traffic.
NIX_DEF_SQB is defined as 16 which is optimal across multiple
octeontx2 platforms to scale up the performance proportional
to the corresponding port/queue to lcore mappings.
Jerin Jacob [Tue, 30 Jul 2019 14:27:19 +0000 (19:57 +0530)]
net/octeontx2: drop Rx and L2 error packets
From B0 HW revision onwards, HW can drop the Rx and L2 error packets.
Enable this by default if the feature is available.
Since this bit field is used as reserved in old HW revisions,
No need to have additional HW version check.
Signed-off-by: Jerin Jacob <jerinj@marvell.com> Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Maciej Bielski [Thu, 1 Aug 2019 11:45:36 +0000 (13:45 +0200)]
net/ena: fix L4 checksum Tx offload
During an if-condition evaluation, a 2-bit flag evaluates to 'true' for
'0x1', '0x2' and '0x3'. Thus, from this perspective these flags are
indistinguishable. To make them distinct, respective bits must be
extracted with a mask and then checked for strict equality.
Specifically here, even if `PKT_TX_UDP_CKSUM` (value '0x3') was set, the
expression `mbuf->ol_flags & PKT_TX_TCP` (the second flag of value
'0x1') is evaluated first and the result is 'true'. In consequence, for
UDP packets the execution flow enters an incorrect branch.
Fixes: 56b8b9b7e5d2 ("net/ena: convert to new Tx offloads API") Cc: stable@dpdk.org Reported-by: Eduard Serra <eserra@vmware.com> Signed-off-by: Maciej Bielski <mba@semihalf.com> Acked-by: Michal Krawczyk <mk@semihalf.com>
When using RTE_PKTMBUF_HEADROOM as 0, virito ethdev driver throws
compilation error
virtio_ethdev.c:1851:2: note: in expansion of macro ‘RTE_BUILD_BUG_ON’
RTE_BUILD_BUG_ON(RTE_PKTMBUF_HEADROOM
< sizeof(struct virtio_net_hdr_mrg_rxbuf));
Thomas Monjalon [Tue, 30 Jul 2019 17:34:13 +0000 (19:34 +0200)]
devtools: restore null test
This small testpmd test was not working for a long time
because of several changes in EAL and mempool.
The 3 main issues solved are:
- Make --no-huge working by specifying an amount of memory
to allocate in legacy mode, and disabling mlockall.
- Load a mempool handler in shared library case.
- Support meson
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
rte_panic causes a backtrace (which is uniformative since all
these calls are in main). Instead use rte_exit and try and make the
messages informative.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
Since testpmd has several issues which keep it from working correctly
as a secondary process; abort if user tries to do it, rather than
running into later problems.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
David Marchand [Mon, 5 Aug 2019 06:23:26 +0000 (08:23 +0200)]
bus/pci: always check IOMMU capabilities
IOMMU capabilities won't change and must be checked even if no PCI device
seem to be supported yet when EAL initialised.
This is to accommodate with SPDK that registers its drivers after
rte_eal_init(), especially on PPC platform where the IOMMU does not
support VA.
Fixes: 703458e19c16 ("bus/pci: consider only usable devices for IOVA mode") Signed-off-by: David Marchand <david.marchand@redhat.com> Reviewed-by: David Christensen <drc@linux.vnet.ibm.com> Acked-by: Jerin Jacob <jerinj@marvell.com> Tested-by: Jerin Jacob <jerinj@marvell.com> Tested-by: Takeshi Yoshimura <tyos@jp.ibm.com>
Thomas Monjalon [Tue, 30 Jul 2019 17:21:53 +0000 (19:21 +0200)]
eal: warn on legacy memory allocation requirement
When using --no-huge mode, dynamic allocation is not supported.
Because of this limitation, the option --legacy-mem is implied
and -m may be needed to specify the amount of memory to allocate.
Otherwise the default amount MEMSIZE_IF_NO_HUGE_PAGE will be allocated.
The option --socket-mem can also be used with --legacy-mem
when hugepages are supported.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Aaron Conole [Fri, 2 Aug 2019 21:25:52 +0000 (17:25 -0400)]
ci: enable unit tests with Travis
When building under Travis (or another linux CI service), enable
running the fast-tests when the RUN_TESTS environment variable is set.
For the Travis service, introduce two new shared builds, since the
shared builds are the ones passing. Builds that are statically
linked still show some issues in some of the eal_flags tests. We make
new builds for this, rather than piggybacking, because 'at a glance'
it is difficult to determine why a build fails, and if tests were
enabled for all builds, then looking at the logs for any build would
take a significant amount of time.
Finally, the command to invoke fast tests includes a timeout
multiplier, since some CI environments don't have enough resources to
complete the tests in the default 10s timeout period.
Signed-off-by: Aaron Conole <aconole@redhat.com> Acked-by: Michael Santana <msantana@redhat.com> Reviewed-by: David Marchand <david.marchand@redhat.com>
Michael Santana [Fri, 2 Aug 2019 21:25:51 +0000 (17:25 -0400)]
test: allow running shared build without installing
Currently many unit tests fail when running tests under shared builds.
This happens because of missing driver dependencies. This is fixed by
explicitly linking in missing drivers for the test application.
before and after (clang):
https://travis-ci.com/Maickii/dpdk-2/jobs/212329160#L623
https://travis-ci.com/Maickii/dpdk-2/jobs/212335912#L620
Suggested-by: Bruce Richardson <bruce.richardson@intel.com> Suggested-by: David Marchand <david.marchand@redhat.com> Signed-off-by: Michael Santana <msantana@redhat.com> Signed-off-by: Aaron Conole <aconole@redhat.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Reviewed-by: David Marchand <david.marchand@redhat.com> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
David Marchand [Wed, 31 Jul 2019 18:56:30 +0000 (20:56 +0200)]
test/eal: fix command array sizes
Following removal of -c and -n options, the array should have been
shrunk to avoid launch_proc to access unitialised strings.
Fixes: b4dbacdb1ad7 ("test/eal: set core mask/list config only in dedicated test") Fixes: 501fa9a40298 ("test/eal: set memory channel config only in dedicated test") Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Michael Santana <msantana@redhat.com>
Left-shift of an integer constant is represented as 'int' type, but a left
shift of 1 by 31 bits in 'int' is undefined. Use the U suffix to force
a representation as unsigned.
Caught while running with ubsan under gcc.
Fixes: dc276b5780c2 ("acl: new library") Cc: stable@dpdk.org Signed-off-by: Aaron Conole <aconole@redhat.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
The unit test for the flow classify introduced undefined behavior by using
a corrupted list. Remove these tests as the invalid data is impossible to
detect with the current API.