Amr Mokhtar [Thu, 11 Jan 2018 19:23:22 +0000 (19:23 +0000)]
examples/bbdev: add sample app
- sample application performing a loop-back over ethernet using
a bbbdev device
- 'turbo_sw' PMD must be enabled for the app to be functional
- a packet is received on an ethdev port -> enqueued for baseband
encode operation -> dequeued -> enqueued for baseband decode
operation-> dequeued -> compared with original signal -> looped-back
to the ethdev port
Signed-off-by: Amr Mokhtar <amr.mokhtar@intel.com>
Amr Mokhtar [Thu, 11 Jan 2018 19:23:21 +0000 (19:23 +0000)]
app/testbbdev: add test application for bbdev
- full test suite for bbdev
- test App works seamlessly on all PMDs registered with bbdev
framework
- a python script is provided to make our life easier
- supports execution of tests by parsing Test Vector files
- test Vectors can be added/deleted/modified with no need for
re-compilation
- various tests can be executed:
(a) Throughput test
(b) Offload latency test
(c) Operation latency test
(d) Validation test
(c) Sanity checks
Signed-off-by: Amr Mokhtar <amr.mokhtar@intel.com>
Amr Mokhtar [Thu, 11 Jan 2018 19:23:20 +0000 (19:23 +0000)]
bb/turbo_sw: add software turbo driver
- bbdev 'turbo_sw' is the software accelerated version of 3GPP L1
Turbo coding operation using the optimized Intel FlexRAN SDK libraries.
- 'turbo_sw' pmd is disabled by default
Signed-off-by: Amr Mokhtar <amr.mokhtar@intel.com> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Amr Mokhtar [Thu, 11 Jan 2018 19:23:19 +0000 (19:23 +0000)]
bb/null: add null base band device driver
- 'bbdev_null' is a basic pmd that performs a minimalistic
bbdev operation
- useful for bbdev smoke testing and in measuring the overhead
introduced by the bbdev library
- 'bbdev_null' pmd is enabled by default
Signed-off-by: Amr Mokhtar <amr.mokhtar@intel.com> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Amr Mokhtar [Thu, 11 Jan 2018 19:23:18 +0000 (19:23 +0000)]
bbdev: introduce wireless base band device lib
- wireless baseband device (bbdev) library files
- bbdev is tagged as EXPERIMENTAL
- Makefiles and configuration macros definition
- bbdev library is enabled by default
- release notes of the initial version
Signed-off-by: Amr Mokhtar <amr.mokhtar@intel.com> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Pavan Nikhilesh [Thu, 18 Jan 2018 13:44:33 +0000 (19:14 +0530)]
mempool/octeontx: fix natural alignment being optimized out
The mbox messages are naturally aligned and in some cases compiler
optimization might disregard natural alignment.
Use volatile key word to force compiler to disable optimizing and
maintain alignment.
Olivier Matz [Fri, 8 Dec 2017 15:46:51 +0000 (16:46 +0100)]
mbuf: fix performance of freeing with non atomic refcnt
When RTE_MBUF_REFCNT_ATOMIC=n, the decrement of the mbuf reference
counter uses an atomic operation. This is not necessary and impacts
the performance (seen with TRex traffic generator).
We cannot replace rte_atomic16_add_return() by rte_mbuf_refcnt_update()
because it would add an additional check.
Solves this by introducing __rte_mbuf_refcnt_update(), which
updates the reference counter without doing anything else.
Fixes: 8f094a9ac5d7 ("mbuf: set mbuf fields while in pool") Cc: stable@dpdk.org Suggested-by: Hanoch Haim <hhaim@cisco.com> Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Phil Yang [Mon, 15 Jan 2018 05:43:33 +0000 (13:43 +0800)]
test/memzone: fix freeing test
When reserving memzone for mz[], it will out of mz[RTE_MAX_MEMZONE] memory
bound after the counter reached to RTE_MAX_MEMZONE. It will flush the
counter's memory and lead to mz[] memory cannot be freed.
Fixd by extend to mz[RTE_MAX_MEMZONE + 1].
Fixes: ff909fe21f0a ("mem: introduce memzone freeing") Cc: stable@dpdk.org Signed-off-by: Phil Yang <phil.yang@arm.com> Acked-by: Jianbo Liu <jianbo.liu@arm.com> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Thu, 21 Dec 2017 18:19:44 +0000 (18:19 +0000)]
test/memzone: fix wrong test
When reserving memzones in autotest, it makes no sense to expect a
failed memzone reserve when we specify both size flags - instead,
we should expect a memzone reserved with one of the two sizes.
Anatoly Burakov [Thu, 21 Dec 2017 15:53:05 +0000 (15:53 +0000)]
test/table: fix uninitialized parameter
delete_bulk() copies metadata to pointers provided by the entries
parameter, but in the unit test, they are uninitialized, leading
to rte_table attempting to memcpy into random garbage pointers.
Memsetting pointer table to zero will prevent that from happening.
Anatoly Burakov [Fri, 22 Dec 2017 10:21:51 +0000 (10:21 +0000)]
test: register test as failed if setup failed
If test set up couldn't be completed, the test was previously
shown as succeeding, even though setup failed. Fix this to report
test as failed, and count all tests that should've been executed,
as failed as well.
Fixes: ffac67b1f71b ("app/test: new assert macros and test suite runner") Cc: stable@dpdk.org Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> Acked-by: Declan Doherty <declan.doherty@intel.com>
Harry van Haaren [Thu, 11 Jan 2018 17:50:35 +0000 (17:50 +0000)]
test/crypto: use skipped return result
The cryptodev tests are updated to return SKIPPED instead
of failing if the PMD is not enabled, allowing test
infrastructure to identify that the test was not able to run.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Harry van Haaren [Thu, 11 Jan 2018 17:50:34 +0000 (17:50 +0000)]
test: add skipped return result
This commit allows a test to return "skipped", indicating
that it cannot be run. This is useful for PMDs which have
not been compiled due to the unavailability of dependencies,
or their explicit disabling in the build configuration.
The result printing is updated to correctly indicate if a
test has been skipped.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Harry van Haaren [Thu, 11 Jan 2018 17:50:33 +0000 (17:50 +0000)]
test: use env variable to run tests
With this patch the test binary checks the DPDK_TEST
environment variable and if set, the contents of the var
are inserted on the test app command line, and run.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com> Reviewed-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Anatoly Burakov [Fri, 12 Jan 2018 18:27:29 +0000 (18:27 +0000)]
app/procinfo: add compilation option in config
Unlike every other DPDK application's compilation, proc_info's
compilation cannot be turned off on Linux. Fix it by adding a
config option to base linuxapp config.
Wei Dai [Fri, 12 Jan 2018 11:31:22 +0000 (19:31 +0800)]
app/testpmd: fix invalid Tx queue number setting
If an invalid number of TX queues is configured from testpmd run-time
command like "port config all txq number" or from --txq in the command
to start testpmd, the global variable nb_txq is updated by this invalid
value without this patch. It may cause testpmd crash. This patch refuses
invalid txq setting and keeps its last correct value.
Fixes: ce8d561418d4 ("app/testpmd: add port configuration settings") Cc: stable@dpdk.org Signed-off-by: Wei Dai <wei.dai@intel.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com> Tested-by: Yuan Peng <yuan.peng@intel.com>
Wei Dai [Fri, 12 Jan 2018 11:31:21 +0000 (19:31 +0800)]
app/testpmd: fix invalid Rx queue number setting
If an invalid number of RX queues is configured from testpmd run-time
command like "port config all rxq number" or from --rxq in the command
to start testpmd, the global variable nb_rxq is updated by this invalid
value without this patch. It may cause testpmd crash. This patch refuses
invalid rxq setting and keeps its last correct value.
Fixes: ce8d561418d4 ("app/testpmd: add port configuration settings") Cc: stable@dpdk.org Signed-off-by: Wei Dai <wei.dai@intel.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com> Tested-by: Yuan Peng <yuan.peng@intel.com>
Pavan Nikhilesh [Sat, 9 Dec 2017 13:23:58 +0000 (18:53 +0530)]
log: remove log level config option
Remove RTE_LOG_LEVEL config option, use existing RTE_LOG_DP_LEVEL config
option for controlling datapath log level.
RTE_LOG_LEVEL is no longer needed as dynamic logging can be used to
control global and module specific log levels.
Xiao Wang [Mon, 1 Jan 2018 22:00:10 +0000 (14:00 -0800)]
igb_uio: allow multi-process access
In some case, one device are accessed by different processes via
different BARs, so one uio device may be opened by more than one
process, for this case we just need to enable interrupt once, and
pci_clear_master only when the last process closed.
Fixes: 5f6ff30dc507 ("igb_uio: fix interrupt enablement after FLR in VM") Cc: stable@dpdk.org Signed-off-by: Xiao Wang <xiao.w.wang@intel.com> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
We cannot assume external applications will include rte_config.h on their
own, neither directly nor through a -include parameter like DPDK does
internally.
This not only causes obvious compilation failures that can be reproduced
with check-includes.sh such as:
[...]/rte_memory.h:88:43: error: ‘RTE_CACHE_LINE_SIZE’ was not declared in
this scope
#define __rte_cache_aligned __rte_aligned(RTE_CACHE_LINE_SIZE)
^
It also results in less visible issues, for instance rte_hash_crc.h relying
on RTE_ARCH_X86_64's presence to provide dedicated inline functions.
This patch partially reverts the commit below and adds missing include
lines to the remaining files.
Fixes: f1a7a5c5f404 ("remove include of generated config header") Cc: stable@dpdk.org Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com> Acked-by: Thomas Monjalon <thomas@monjalon.net>
Adrien Mazarguil [Thu, 21 Dec 2017 13:00:02 +0000 (14:00 +0100)]
member: fix ISO C in exported header
Reported by check-includes.sh:
[...]/rte_member.h:107:40: error: ISO C does not permit named variadic
macros [-Werror=variadic-macros]
#define RTE_MEMBER_LOG(level, fmt, args...) \
^
Adrien Mazarguil [Thu, 21 Dec 2017 12:59:59 +0000 (13:59 +0100)]
flow_classify: fix ISO C in exported header
Reported by check-includes.sh:
[...]/rte_flow_classify.h:85:47: error: ISO C does not permit named
variadic macros [-Werror=variadic-macros]
#define RTE_FLOW_CLASSIFY_LOG(level, fmt, args...) \
^
Jiayu Hu [Wed, 22 Nov 2017 03:19:42 +0000 (11:19 +0800)]
vhost: support Explicit Congestion Notification
In virtio, Explicit Congestion Notification (ECN) includes two parts:
guest ECN and host ECN. Guest ECN means the frontend can handle TSO
packets which have ECN set, and host ECN means the backend can handle
TSO packets which have ECN set.
The ECN features are rarely used. However, virtio-net enables them by
default, and vhost-net support both. To make live migration from
vhost-net to vhost-user possible, this patch announces to support
guest and host ECN in vhost-user.
Signed-off-by: Jiayu Hu <jiayu.hu@intel.com> Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
Xiao Wang [Wed, 10 Jan 2018 01:23:54 +0000 (09:23 +0800)]
net: add a helper for making RARP packet
Suggested-by: Maxime Coquelin <maxime.coquelin@redhat.com> Signed-off-by: Xiao Wang <xiao.w.wang@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Xiao Wang [Wed, 10 Jan 2018 01:23:53 +0000 (09:23 +0800)]
net/virtio: add packet injection method
This patch adds dev_pause, dev_resume and inject_pkts APIs to allow
driver to pause the worker threads and inject special packets into
Tx queue. The next patch will be based on this.
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Xiao Wang [Wed, 10 Jan 2018 01:23:52 +0000 (09:23 +0800)]
net/virtio: make control queue thread-safe
The virtio_send_command function may be called from app's configuration
routine, but also from an interrupt handler called when live migration
is done on the backup side. So this patch makes control queue
thread-safe first.
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Zhiyong Yang [Wed, 10 Jan 2018 06:01:01 +0000 (14:01 +0800)]
examples/vhost: fix startup check
For vhost sample, the operation if (dev_info.max_rx_queues >
MAX_QUEUES) in the function port_init causes startup failure
when using X710(i40e driver). X710 requires that MAX_QUEUES
should be defined no less than 320, however it is defined as
128 currently.
Such checking is overkill and Removal don't affect any
functionality (have already validated ixgbe and i40e).
The removal can avoid similar issue when introduing new physical NIC.
Fixes: 8bd6c395a568 ("examples/vhost: increase maximum queue number") Cc: stable@dpdk.org Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com> Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
Junjie Chen [Tue, 9 Jan 2018 11:03:48 +0000 (06:03 -0500)]
vhost: support virtqueue interrupt/notification suppression
The driver can suppress interrupt when VIRTIO_F_EVENT_IDX feature bit is
negotiated. The driver set vring flags to 0, and MAY use used_event in
available ring to advise device interrupt util reach an index specified
by used_event. The device ignore the lower bit of vring flags, and send
an interrupt when index reach used_event.
The device can suppress notification in a manner analogous to the ways
driver suppress interrupt. The device manipulates flags or avail_event in
the used ring in the same way the driver manipulates flags or used_event in
available ring.
Signed-off-by: Junjie Chen <junjie.j.chen@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com> Tested-by: Lei Yao <lei.a.yao@intel.com> Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
Yongseok Koh [Wed, 10 Jan 2018 17:46:49 +0000 (09:46 -0800)]
net/mlx5: fix deadlock of link status alarm
If mlx5_dev_link_status_handler() is executed while canceling the alarm,
deadlock can happen because rte_eal_alarm_cancel() waits for all callbackes
to finish execution and both calls are protected by priv->lock.
Fixes: 198a3c339a8f ("mlx5: handle link status interrupts") Cc: stable@dpdk.org Signed-off-by: Yongseok Koh <yskoh@mellanox.com> Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Qi Zhang [Wed, 27 Dec 2017 20:22:30 +0000 (15:22 -0500)]
net/e1000: fix mailbox interrupt handler
Mailbox interrupt handler only takecare of the PF reset notification,
for other message mbx->ops.read should not be called since it gets
chance to break the foreground VF to PF communication.
Fixes: 316f4f1adc2e ("net/igb: support VF mailbox interrupt for link up/down") Cc: stable@dpdk.org Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Acked-by: Wei Dai <wei.dai@intel.com>
Qi Zhang [Wed, 27 Dec 2017 20:22:29 +0000 (15:22 -0500)]
net/ixgbe: fix mailbox interrupt handler
Mailbox interrupt handler only takes care of PF reset notification, for
other message ixgbe_read_mbx should not be called since it gets chance
to break the foreground VF to PF communication.
This can be simply repeated by 'testpmd>rx_vlan rm all 0'.
Fixes: 77234603fba0 ("net/ixgbe: support VF mailbox interrupt for link up/down") Cc: stable@dpdk.org Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Acked-by: Wei Dai <wei.dai@intel.com>