Commit Graph

12333 Commits

Author SHA1 Message Date
Pavan Nikhilesh
08f683174e eal: add functions for previous power of 2 alignment
Add 32b and 64b API's to align the given integer to the previous power
of 2. Update common auto test to include test for previous power of 2 for
both 32 and 64bit integers.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
2018-04-04 17:33:08 +02:00
Pavan Nikhilesh
5120203d75 eal: add macros to align value to multiple
Add macros to align given value to the multiple of the supplied
integer.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
2018-04-04 13:43:34 +02:00
Stephen Hemminger
2f35377892 mem: use z specifier to format size_t
The recommended way to format size_t in printf is to use the
z modifier which handles the case where size_t maybe 32 or 64 bits.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2018-04-04 13:43:33 +02:00
Stephen Hemminger
97d4aaffa7 pci: use z specifier to format size_t
This addresses potential issues where size_t and off_t can vary
on some platforms.  For size_t the best way to format the value
is to use the z modifier to printf. For off_t need to cast to
long long to handle 64 bit offset on 32 bit platforms.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2018-04-04 13:43:33 +02:00
Stephen Hemminger
aded107a74 config: remove old log level option
The old RTE_LOG_LEVEL has been replaced by RTE_DP_LOG_LEVEL and
is not used anywhere in the current source tree.

It is a merge leftover.

Fixes: 43e9f17ce7 ("log: remove log level config option")
Cc: stable@dpdk.org

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2018-04-04 13:43:33 +02:00
Jerin Jacob
8437489fa6 doc: update Marvell driver link
Change the incorrect driver documentation link to fix
following documentation build warning.

$ make doc-guides-html
sphinx processing guides-html...
doc/guides/rel_notes/release_17_11.rst:58:
WARNING: unknown document: ../nics/mrvl

Fixes: fe93968722 ("net/mrvl: rename PMD as mvpp2")

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
2018-04-04 13:43:33 +02:00
Pablo de Lara
79bf1844cd devtools: do not create kernel dir
get-maintainer script requires the creation of
some folders, including "kernel". Since now this folder
exists in DPDK folder, it is not required to create it.

Fixes: acaa9ee991 ("move kernel modules directories")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-04-04 13:43:33 +02:00
Thomas Monjalon
5d3cd28b4d config: remove useless lines for DPAA2
Some comments are not relevant in a config which only overrides
the default config.

The option CONFIG_RTE_LIBRTE_DPAA2_DEBUG_DRIVER is already disabled
by default so it can be removed from this file.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
2018-04-04 00:03:25 +02:00
Shreyansh Jain
5644a1f692 crypto/dpaa2_sec: support dynamic logging
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-04-03 00:05:07 +02:00
Shreyansh Jain
79c271ee4f crypto/dpaa2_sec: fix debug logs
Digest and IV length variable declarations have changed.
These were escaping builds as the debugging macro was disabled.
During dynamic logging change, they were discoverd.

Fixes: 0fbd75a99f ("cryptodev: move IV parameters to session")
Fixes: 7f0034275a ("cryptodev: remove digest length from crypto op")
Cc: stable@dpdk.org

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-04-03 00:04:59 +02:00
Shreyansh Jain
a016a88cbf bus/fslmc: remove unused debug macros
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-04-02 23:42:35 +02:00
Shreyansh Jain
358309f367 event/dpaa2: support dynamic logging
Some changes had already been pushed via SHA:72654f090a11 patch. This
patch updates them.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Nipun Gupta <nipun.gupta@nxp.com>
2018-04-02 23:42:23 +02:00
Shreyansh Jain
a10a988a0b net/dpaa2: support dynamic logging
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-04-02 23:42:15 +02:00
Shreyansh Jain
3646ccf0b0 mempool/dpaa2: support dynamic logging
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-04-02 23:42:03 +02:00
Shreyansh Jain
ce9efbf5bb bus/fslmc: support dynamic logging
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-04-02 23:41:45 +02:00
Beilei Xing
db2ed70bbb net/i40e: remove unnecessary FDIR mask configuration
Remove unnecessary FDIR mask configuration, otherwise
flow directory mask will be changed when configuring
hash input set.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Reviewed-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-03-30 17:25:45 +02:00
Jianfeng Tan
768274ebbd vhost: avoid populate guest memory
It's not necessary to populate guest memory from vhost side unless
zerocopy is enabled or users want better performance.

Update the doc for guest memory requirement clarification.

Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2018-03-30 17:25:45 +02:00
Tonghao Zhang
d64c43773a vhost: add pipe event for optimizing negotiation
When vhost-user connects qemu successfully, dpdk will call
the vhost_user_add_connection to add unix socket fd to poll.
And fdset_add only set the socket fd to a fdentry while poll
may sleep now. In a general case, this is no problem. But if
we use hot update for vhost-user, most downtime of VMs network
is 750+ms. This patch adds pipe event, so after connections are
ok, dpdk rebuild the poll immediately. With this patch, the
most downtime is 20~30ms.

Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2018-03-30 17:25:45 +02:00
Tonghao Zhang
9426ee2678 vhost: move stdbool include
The vhost.h file uses bool type, but not include stdbool
header file. If other c files include vhost.h directly,
there will be a compile error.

This patch will be used in the next patch.

Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2018-03-30 14:08:44 +02:00
Tonghao Zhang
ce5bd5fcae vhost: add fdset-event thread name
This patch adds the name for vhost fdset thread.
It can help us to know whether the thread is running.

Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
2018-03-30 14:08:44 +02:00
Tonghao Zhang
2db2d3220b vhost: raise error on fdset-thread creation
When first call the 'rte_vhost_driver_start', the
fdset_event_dispatch thread should be created successfully.
Because the vhost uses it to poll socket events for vhost
server or clients. Without it, for example, vhost will not
get the connection event.

This patch returns err code directly when created not successful.

Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
2018-03-30 14:08:44 +02:00
Junjie Chen
30a701a537 net/vhost: fix crash when creating vdev dynamically
When creating vdev dynamically, vhost pmd driver starts directly without
checking TX/RX queues are ready or not, and thus causes segmentation fault
when vhost library accesses queues. This patch adds a flag to check whether
queues are setup or not, and adds queues setup into dev_start function to
allow user to start them after setting up.

Fixes: aed0b12930 ("net/vhost: fix socket file deleted on stop")
Cc: stable@dpdk.org

Signed-off-by: Junjie Chen <junjie.j.chen@intel.com>
Tested-by: Zhiyong Yang <zhiyong.yang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2018-03-30 14:08:44 +02:00
Maxime Coquelin
394313fff3 vhost: avoid concurrency when logging dirty pages
This patch aims at fixing a migration performance regression
faced since atomic operation is used to log pages as dirty when
doing live migration.

Instead of setting a single bit by doing an atomic read-modify-write
operation to log a page as dirty, this patch write 0xFF to the
corresponding byte, and so logs 8 page as dirty.

The advantage is that it avoids concurrent atomic operations by
multiple PMD threads, the drawback is that some clean pages are
marked as dirty and so are transferred twice.

Fixes: 897f13a1f7 ("vhost: make page logging atomic")
Cc: stable@dpdk.org

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
2018-03-30 14:08:44 +02:00
Matan Azrad
f0e1180cb6 ethdev: fix port accessing after release
rte_eth_dev_pci_release() function wrongly releases an ethdev port and
then releases internal fields of this port.
This behavior is problematic, because after the release, the port may
be reallocated again by another thread or just be invalid for any
usage.

Move the release operation to the end of the function.

Fixes: dcd5c8112b ("ethdev: add PCI driver helpers")
Cc: stable@dpdk.org

Suggested-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2018-03-30 14:08:44 +02:00
Harish Patil
c152cbe252 net/qede: fix to prevent overwriting packet type
Fixes: 3f72dd780e ("net/qede: check tunnel L3 header")
Cc: stable@dpdk.org

Signed-off-by: Harish Patil <harish.patil@cavium.com>
2018-03-30 14:08:44 +02:00
Rasesh Mody
83ade1ebdb net/qede: fix device stop to remove primary MAC
This fix is to remove primary MAC filter during dev stop. Without the
fix device start attempt to add the primary MAC fails. Perform MAC set
remove under IS_PF() check.

Fixes: dd28bc8c6e ("net/qede: fix VF port creation sequence")
Cc: stable@dpdk.org

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-03-30 14:08:44 +02:00
Rasesh Mody
612ce81b20 net/qede: add devargs to disable NPAR Tx switching
Added a run-time argument npar_tx_switching to enable/disable
Tx switching for multi-fucntion devices (NPAR).
Rename vf_txswitch option to vf_tx_switching.

Sample usage to disable Tx switching for NPAR or VF is something like...

 -w 05:00.0,npar_tx_switching=0 -w 05:00.1,npar_tx_switching=0
 -w 05:00.0,vf_tx_switching=0 -w 05:00.1,vf_tx_switching=0

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-03-30 14:08:44 +02:00
Harish Patil
e1e38962c9 net/qede: enable IPGRE offload support
Signed-off-by: Harish Patil <harish.patil@cavium.com>
2018-03-30 14:08:44 +02:00
Harish Patil
946dfd18a4 net/qede: convert to new Rx/Tx offloads API
Ethdev RX/TX offloads API has changed since:
commit ce17eddefc ("ethdev: introduce Rx queue offloads API")
commit cba7f53b71 ("ethdev: introduce Tx queue offloads API")

This patch makes use of new offload flags as suggested and fix
the default RX/TX configuration. Also indent the code properly
around those changes.

Signed-off-by: Harish Patil <harish.patil@cavium.com>
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-03-30 14:08:44 +02:00
Natalie Samsonov
fe93968722 net/mrvl: rename PMD as mvpp2
The name "mrvl" for Marvell PMD driver for PPv2 Marvell PPv2
(Packet Processor v2) 1/10 Gbps adapter is too generic and causes
problem for adding new PMD drivers for other Marvell devices.
Changed to "mvpp2" for specific Marvell PPv2 PMD.

This patch doesn't introduce any change except renaming.

Signed-off-by: Natalie Samsonov <nsamsono@marvell.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-03-30 14:08:44 +02:00
Andrew Rybchenko
f3129efdb4 net/sfc: support Medford2 family adapters
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
2018-03-30 14:08:44 +02:00
Andrew Rybchenko
714bff55a4 net/sfc: support runtime VI window size
Medford2 uses a configurable VI window size, and requires
updates to register accesses to use a runtime VI window size
rather than the *_STEP register constants used for earlier
controllers.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
2018-03-30 14:08:44 +02:00
Andrew Rybchenko
f82e33afbb net/sfc: support link speeds up to 100G
Add 25G, 50G and 100G.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
2018-03-30 14:08:44 +02:00
Ferruh Yigit
c3482deb7c net/avf: fix link autoneg value
Intention of the logic is:
If ETH_LINK_SPEED_FIXED is set in dev_conf, set link_autoneg to
ETH_LINK_FIXED, else set it to ETH_LINK_AUTONEG

ETH_LINK_SPEED_FIXED value is 1, and ETH_LINK_FIXED is 0;

Current logic is broken, fix it according above values.

Fixes: 48de41ca11 ("net/avf: enable link status update")
Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-03-30 14:08:44 +02:00
Kirill Rybalchenko
e46a1e0beb net/i40e: fix support DDP packages group 0xff
Group ID 0xFF indicates that packages does not change parser
graph so compatible with any other packages.

Fixes: b1ec717bff ("net/i40e: fix multiple DDP packages conflict")
Cc: stable@dpdk.org

Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-03-30 14:08:44 +02:00
Beilei Xing
36f1faf69c net/i40e: add log when setting input set
This patch adds log when setting input set since global
configuration is changed.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Reviewed-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-03-30 14:08:44 +02:00
Yunjian Wang
91fbf1791c net/ixgbe: fix intr callback unregister by adding retry
The nic's interrupt source has some active callbacks, when
the port hotplug. Add a retry to give more port's a chance
to uninit before returning an error.

Fixes: 2866c5f1b8 ("ixgbe: support port hotplug")
Cc: stable@dpdk.org

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-03-30 14:08:44 +02:00
Tiwei Bie
7a36967029 vhost: do not generate signal when sendmsg fails
More precisely, do not generate a SIGPIPE signal if the peer
has closed the connection. Otherwise, it will terminate the
process by default. As a library, we should avoid terminating
the application process when error happens and just need to
return with an error.

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2018-03-30 14:08:44 +02:00
Tiwei Bie
71d93e9dd6 vhost: support sending fds via slave channel
This function will be used to send fds to QEMU via slave channel.

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2018-03-30 14:08:44 +02:00
Zhiyong Yang
ac860c86e3 net/virtio: add check for cvq
Add checking for cvq to judge if virtio_ack_link_announce should be called.
The existing code doesn't cause issue, and add the checking just to look
more reasonable.

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2018-03-30 14:08:44 +02:00
Zhiyong Yang
7c7f2e6088 net/virtio: fix queues pointer check
It is necessary to add pointer checking because in some case the
code will cause crash. For example, the code goes here before
memory allocation of rxvq is finished.

Fixes: 7365504f77 ("net/virtio: support guest announce")
Cc: stable@dpdk.org

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2018-03-30 14:08:44 +02:00
Ning Li
791b43e088 net/virtio-user: specify MAC of the tap
When using virtio-user with vhost-kernel to exchange
packet with kernel networking stack, application can
set the MAC of the tap interface via parameter.

Signed-off-by: Ning Li <muziding001@163.com>
Reviewed-by: Seán Harte <seanbh@gmail.com>
Tested-by: Seán Harte <seanbh@gmail.com>
Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
2018-03-30 14:08:44 +02:00
Rahul Lakkireddy
2aa5c722c6 net/cxgbe: convert to SPDX license tags
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
2018-03-30 14:08:44 +02:00
Kumar Sanghvi
0c4a5dfc2f net/cxgbe: support setting MAC address
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
2018-03-30 14:08:44 +02:00
Kumar Sanghvi
a0a344a8f7 net/cxgbe: add VF port statistics
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
2018-03-30 14:08:44 +02:00
Kumar Sanghvi
880ead4e14 net/cxgbe: update Tx and Rx path for VF
On TX path, add fw_eth_tx_pkt_vm_wr to transmit packets over VF.
Use is_pf4() to correctly calculate the work request size and
offsets within the work request.  On RX path, use pktshift to adjust
data offset within the mbuf.

Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
2018-03-30 14:08:44 +02:00
Kumar Sanghvi
bfcb257d30 net/cxgbe: enable RSS for VF
Query firmware and configure RSS for VF.

Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
2018-03-30 14:08:44 +02:00
Kumar Sanghvi
5e59e39a1d net/cxgbe: initialize SGE and queues for VF
Query firmware and initialize SGE parameters and enable queue
allocation for VF.  Calculate pcie channel and queue congestion
management for VF.

Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
2018-03-30 14:08:44 +02:00
Kumar Sanghvi
5e80364a03 net/cxgbe: add probe to initialize VF devices
Add probe to initialize VF devices.  Separate init/de-init paths
for PF and VF.  Do firmware state initialization wrt VF and retrieve
various operational parameters by querying firmware.  Finally configure
and initialize ports.

Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
2018-03-30 14:08:44 +02:00
Kumar Sanghvi
d2adea1746 net/cxgbe: add base for enabling VF ports
Add base to enable VF ports in subsequent patches.

Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
2018-03-30 14:08:44 +02:00