Commit Graph

6674 Commits

Author SHA1 Message Date
Shahed Shaikh
318d7da312 net/qede: fix Rx buffer size calculation
- HW does not include CRC in received frame when passed to host,
   so no need to consider CRC length while calculating Rx buffer size.
 - In scattered Rx mode, driver may allocate Rx buffer larger than
   the size of mbuf because it tries to adjust the buffer size to cache
   line size by ceiling it. Fix this by flooring the size instead of
   ceiling.
 - Consider the rule imposed by HW regarding the minimum size of Rx buffer
   in scattered Rx mode -
   (MTU + Maximum L2 Header Size + 2) / ETH_RX_MAX_BUFF_PER_PKT

Fixes: f6033f2497 ("net/qede: fix minimum buffer size and scatter Rx check")
CC: stable@dpdk.org

Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
2018-09-28 01:41:01 +02:00
Shahed Shaikh
267d32de46 net/qede: support generic flow API
- Add support for rte_flow_validate(), rte_flow_create() and
  rte_flow_destroy() APIs
- This patch adds limited support for the flow items
  because of the limited filter profiles supported by HW.
- Only 4 tuples - src and dst IP (v4 or v6) addresses and
		  src and dst port IDs of TCP or UDP.
- also, only redirect to queue action is supported.

Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
2018-09-28 01:41:01 +02:00
Shahed Shaikh
f5765f66f9 net/qede: refactor flow director into generic aRFS
- In order to prepare the base for RTE FLOW support,
  convert common code used for flow director support
  into common aRFS code.

Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
2018-09-28 01:41:01 +02:00
Shahed Shaikh
7ffef6292b net/qede: fix flow director for IPv6 filter
- PMD does not fill vtc_flow field of IPv6 header while
  constructing a packet for IPv6 filter. Hence filter was
  not getting applied properly.
- IPv6 addresses got swapped while copying src and dst addresses.
- Same issue with UDP and TCP port ids.

Fixes: 622075356e ("net/qede: support ntuple and flow director filter")
Cc: stable@dpdk.org

Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
2018-09-28 01:41:01 +02:00
Shahed Shaikh
eb54ba75c7 net/qede: reorganize filter code
- rename qede_fdir.c to qede_filter.c
 - move all filter code to qede_filter.c

Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
2018-09-28 01:41:01 +02:00
Rasesh Mody
979582a1aa net/qede/base: use pointer for bytes length read
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-09-28 01:41:01 +02:00
Shahed Shaikh
2cf7a0faf4 net/qede/base: use trust mode for forced MAC limitations
When trust mode is set to ON, VF can change it's MAC address
inspite PF has set a forced MAC for that VF from HV.

Earlier similar functionality is provided by module parameter
"allow_vf_mac_change_mode" of qed.

This change makes few changes in behavior of VF shadow config -
 - Let driver track the VF mac in shadow config as long as trust
  mode is OFF.
 - Once trust mode is ON, we should not care about MACs in shadow
  config (because we never intend to fall back because of lack of restore
  implementation).
 - Delete existing shadow MAC (this helps when trust mode is turned OFF,
  and VF tries to add new MAC – it won’t fail that time since we have
  a clean slate).
 - Skip addition and deletion of MACs in shadow configs.

Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
2018-09-28 01:41:01 +02:00
Rasesh Mody
6d1be6d6f8 net/qede/base: fix logic for sfp get/set
Fix logic for sfp get rx_los, tx_fault, tx_disable, and sfp set tx_disable.

Fixes: bdc40630a8 ("net/qede/base: add APIs for xcvr")
Cc: stable@dpdk.org

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-09-28 01:41:01 +02:00
Rasesh Mody
657b762a87 net/qede/base: correct MCP error handler log verbosity
Correct the verbosity for slowpath message from DCB to SP.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-09-28 01:41:01 +02:00
Rasesh Mody
3f11cf0623 net/qede/base: limit number of non ethernet queues to 64
Limit the number of non ethernet queues to 64, allowing a max queues to
status block ratio of 2:1 in case of storage target. Theoretically a
non-target storage PF can have 128 queues and SBs.

This change is to support 64 entries for a target iSCSI/FCoE PF and 128
for a non-target.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-09-28 01:41:01 +02:00
Rasesh Mody
d5df6159dd net/qede: fix ethernet type in HW registers
Fix to program the HW registers with proper ether type.

Fixes: 36f45bce25 ("net/qede/base: fix to support OVLAN mode")
Cc: stable@dpdk.org

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-09-28 01:41:01 +02:00
Rasesh Mody
4fe58a3ecf net/qede/base: get pre-negotiated values for stag and bw
Request management FW for STAG and bandwidth values negotiated prior to
the driver load.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-09-28 01:41:01 +02:00
Rasesh Mody
ebbc55b871 net/qede/base: add OneView APIs
Add support for the following OneView APIs:
 - ecore_mcp_ov_update_mtu() - Send MTU value to the management FW.
 - ecore_mcp_ov_update_mac() - Send MAC address to the management FW.
 - ecore_mcp_ov_update_eswitch() - Send eswitch_mode to management FW
   after the firmware load.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-09-28 01:41:01 +02:00
Rasesh Mody
cb71992793 net/qede/base: fix to handle stag update event
This fix adds a ecore_mcp_update_stag() handler to handle the STAG update
events from management FW and program the STAG value.
It also clears the stag config on PF, when management FW invalidates
the stag value.

Fixes: ec94dbc573 ("qede: add base driver")
Cc: stable@dpdk.org

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-09-28 01:41:01 +02:00
Alejandro Lucero
0962b51d3c net/nfp: fix mbuf flags with checksum good
If checksum offload enabled and hardware reports checksum as good,
update mbuf ol_flags with proper *_CKSUM_GOOD bits.

Fixes: b812daadad ("nfp: add Rx and Tx")
Cc: stable@dpdk.org

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2018-09-28 01:41:01 +02:00
Bruce Richardson
589dd86aaf net/*/base: allow use of experimental APIs in base code
The driver setting of "allow_experimental_apis" was not being used when
building the base code. To allow this we can manually put in a check
in the base code files for the setting and set the appropriate cflag
if it's needed.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Tested-by: Ilya Maximets <i.maximets@samsung.com>
2018-09-28 01:41:01 +02:00
Xiao Wang
971c19c77c net/ifc: do not notify before HW ready
If the device is not clearly reset by the previous driver and holds
some invalid ring addr, and the relay thread kicks it before HW is
properly re-configured, a bad DMA request may happen.

Besides, the notify_addr which is used by the relay thread is set in
the vdpa_ifcvf_start function, if a kick relay happens before
vdpa_ifcvf_start finishes, a null addr is accessed.

Fixes: a3f8150eac ("net/ifcvf: add ifcvf vDPA driver")
Cc: stable@dpdk.org

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
2018-09-28 01:41:01 +02:00
Beilei Xing
55c7fbe42d net/i40e: remove driver log
Remove driver log when no interrupt event indicated
in alarm handler for both PF and VF, otherwise there
will be lots of prints which makes console unusable.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-09-28 01:41:01 +02:00
Xiaoyun Li
c11f654042 net/i40e: add option to use latest vector path
For IA, the AVX2 vector path is only recommended to be used on later
platforms (identified by AVX512 support, like SKL etc.) This is because
performance benchmark shows downgrade when running AVX2 vector path on
early platform (BDW/HSW) in some cases. But we still observe perf gain
with some real work loading.

So this patch introduced the new devarg use-latest-supported-vec to
force the driver always selecting the latest supported vec path. Then
apps are able to take AVX2 path on early platforms. And this logic can
be re-used if we will have AVX512 vec path in future.

This patch only affects IA platforms. The selected vec path would be
like the following:
  Without devarg/devarg = 0:
  Machine	vPMD
  AVX512F	AVX2
  AVX2	SSE4.2
  SSE4.2	SSE4.2
  <SSE4.2	Not Supported

  With devarg = 1
  Machine	vPMD
  AVX512F	AVX2
  AVX2	AVX2
  SSE4.2	SSE4.2
  <SSE4.2	Not Supported

Other platforms can also apply the same logic if necessary in future.

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-09-28 01:41:01 +02:00
Ori Kam
c322c0e558 net/mlx5: add bluefield VF support
Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2018-09-28 01:41:01 +02:00
Nelio Laranjeiro
1dd7c7e38c net/mlx4: support meson build
Compile Mellanox driver when their external dependencies are met.  A
glue version of the driver can still be requested by using the
-Denable_driver_mlx_glue=true

Meson will try to find the required external libraries.  When they are
not installed system wide, they can be provided though CFLAGS, LDFLAGS
and LD_LIBRARY_PATH environment variables, example (considering
RDMA-Core is installed in /tmp/rdma-core):

 # CLFAGS=-I/tmp/rdma-core/build/include \
   LDFLAGS=-L/tmp/rdma-core/build/lib \
   LD_LIBRARY_PATH=/tmp/rdma-core/build/lib \
   meson output
 # LD_LIBRARY_PATH=/tmp/rdma-core/build/lib \
   ninja -C output install

Note: LD_LIBRARY_PATH before ninja is necessary when the meson
configuration has changed (e.g. meson configure has been called), in
such situation the LD_LIBRARY_PATH is necessary to invoke the
autoconfiguration script.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2018-09-28 01:41:01 +02:00
Nelio Laranjeiro
96d7c62a70 net/mlx5: support meson build
Compile Mellanox driver when its external dependencies are met.  A
glue version of the driver can still be requested by using the
-Denable_driver_mlx_glue=true

Meson will try to find the required external libraries.  When they are
not installed system wide, they can be provided though CFLAGS, LDFLAGS
and LD_LIBRARY_PATH environment variables, example (considering
RDMA-Core is installed in /tmp/rdma-core):

 # CLFAGS=-I/tmp/rdma-core/build/include \
   LDFLAGS=-L/tmp/rdma-core/build/lib \
   LD_LIBRARY_PATH=/tmp/rdma-core/build/lib \
   meson output
 # LD_LIBRARY_PATH=/tmp/rdma-core/build/lib \
   ninja -C output install

Note: LD_LIBRARY_PATH before ninja is necessary when the meson
configuration has changed (e.g. meson configure has been called), in
such situation the LD_LIBRARY_PATH is necessary to invoke the
autoconfiguration script.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2018-09-28 01:41:01 +02:00
Beilei Xing
2b39bf0f75 net/e1000: fix queue number in RSS configuration
RSS configuration works for all e1000 NICs except 82576.
This patch fixes this issue by correcting queue number
in RSS configuration.

Fixes: 424ae915ba ("net/e1000: move RSS to flow API")
Fixes: ac8d22de23 ("ethdev: flatten RSS configuration in flow API")
Cc: stable@dpdk.org

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Zhao <wei.zhao1@intel.com>
2018-09-28 01:41:01 +02:00
Shreyansh Jain
eb5a9a7639 drivers/crypto: remove double assignment of driver
Removing double copy of driver information. 04664e5c83 has shifted
that from driver's probe to bus's probe.

Fixes: 04664e5c83 ("drivers/bus: fill driver reference after NXP probing")

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2018-09-28 18:02:58 +02:00
Shreyansh Jain
5fb08dd326 drivers/net: remove double assignment of driver
Removing double copy of driver information. 04664e5c83 has shifted
that from driver's probe to bus's probe.

Fixes: 04664e5c83 ("drivers/bus: fill driver reference after NXP probing")

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2018-09-28 18:02:49 +02:00
Thomas Monjalon
04664e5c83 drivers/bus: fill driver reference after NXP probing
The probing functions of NXP buses were missing to set
the driver used for successfully probing a device.

The NXP driver and the generic rte_driver are now set
in the device structures.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
2018-09-27 14:43:47 +02:00
Thomas Monjalon
2ed055c5e3 bus/ifpga: remove useless driver cast
The rte_afu_driver is assigned to rte_afu_device.driver during probing.
There is no need of accessing the rte_afu_driver via rte_device.driver
and type casting to its container.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Rosen Xu <rosen.xu@intel.com>
2018-09-27 14:43:47 +02:00
Luca Boccassi
7abb521d2c event/opdl: add in meson build
Signed-off-by: Luca Boccassi <bluca@debian.org>
2018-09-18 22:53:35 +02:00
Luca Boccassi
76ca29a7d6 event/opdl: rename map file to match library name
So that it can be used from Meson as well

Signed-off-by: Luca Boccassi <bluca@debian.org>
2018-09-18 22:53:35 +02:00
Luca Boccassi
8fabc16808 baseband/null: add in meson build
Signed-off-by: Luca Boccassi <bluca@debian.org>
2018-09-18 22:53:35 +02:00
Luca Boccassi
cd2b6458a1 crypto/scheduler: add in meson build
Signed-off-by: Luca Boccassi <bluca@debian.org>
2018-09-18 22:53:35 +02:00
Luca Boccassi
263b9ba2d3 net/vmxnet3: add in meson build
Note that the library built by meson will not have the _uio suffix:
librte_pmd_vmxnet3.so - as it follows the directory name, while the
legacy makefile rename it to librte_pmd_vmxnet3_uio.so.

Signed-off-by: Luca Boccassi <bluca@debian.org>
2018-09-18 22:53:35 +02:00
Luca Boccassi
30d3d01683 net/qede: add in meson build
Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Shahed Shaikh <shahed.shaikh@cavium.com>
2018-09-18 22:53:35 +02:00
Luca Boccassi
9fc43dbfd6 net/vdev_netvsc: add in meson build
Signed-off-by: Luca Boccassi <bluca@debian.org>
2018-09-18 22:49:39 +02:00
Luca Boccassi
095cae3668 net/tap: add in meson build
Use same autoconf generation mechanism as the MLX4/5 PMDs

Signed-off-by: Luca Boccassi <bluca@debian.org>
2018-09-18 22:48:49 +02:00
Bruce Richardson
77a5e7cdb2 build: fix compatibility with meson 0.41 onwards
Versions of meson prior to 0.47 flattened the parameters to the
"set_variable" function, which meant that the function could not take
array variables as a parameter. Therefore, we need to disable driver
tracking for those older versions, in order to maintain compatibility
with the minimum supported 0.41 version, and also v0.45 shipped in
Ubuntu 18.04 release.

Fixes: 806c45dd48 ("build: add configuration summary at end of config")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Timothy Redaelli <tredaelli@redhat.com>
2018-09-18 15:18:52 +02:00
Bruce Richardson
806c45dd48 build: add configuration summary at end of config
After running meson to configure a DPDK build, it can be useful to know
what was automatically enabled or disabled. Therefore, print out by way of
summary a categorised list of libraries and drivers to be built.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2018-09-17 13:58:40 +02:00
Luca Boccassi
60bd13a296 net/i40e: use -Wno-error=format-security for meson
This PMD is built with -Wno-format, which means GCC errors out if
-Wformat-security is used.

Fixes: e940646b20 ("drivers/net: build Intel NIC PMDs with meson")
Cc: stable@dpdk.org

Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2018-09-17 12:18:13 +02:00
Luca Boccassi
fd5a5cf7a9 raw/ifpga: use -Wno-error=format-security for meson
This PMD is built with -Wno-format, which means GCC errors out if
-Wformat-security is used.

Fixes: 56bb54ea1b ("raw/ifpga/base: add Intel FPGA OPAE share code")
Cc: stable@dpdk.org

Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2018-09-17 12:17:24 +02:00
Ashish Gupta
0b5284ad57 crypto/openssl: replace macros by static inline functions
Replace macros by static inline functions in openssl version
compatibility layer

Signed-off-by: Sunila Sahu <sunila.sahu@caviumnetworks.com>
Signed-off-by: Shally Verma <shally.verma@caviumnetworks.com>
Signed-off-by: Ashish Gupta <ashish.gupta@caviumnetworks.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
2018-08-30 05:10:50 +02:00
Fiona Trahe
df8cca4633 compress/qat: use compression specific driver name
The QAT compression driver was named "qat".
Rename to compress_qat for consistency with other compressdev drivers
and with crypto_qat.

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
2018-08-30 05:10:50 +02:00
Fiona Trahe
6a3e44717d crypto/qat: fix typo
Fixes: f9a3d7f68f ("crypto/qat: move code into appropriate files")

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
2018-08-30 05:10:50 +02:00
Ferruh Yigit
58c3b60969 net/i40e: remove invalid comment
Comments says "no csum error report support" but there is no check
related csum offloads. Removing the comment.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-09-14 20:19:57 +02:00
Stephen Hemminger
dc7680e859 net/netvsc: support integrated VF
Integrate accelerated networking support into netvsc PMD.
This allows netvsc to manage VF without using failsafe or vdev_netvsc.
For the exception vswitch path some tests like transmit
get a 22% increase in packets/sec.
For the VF path, the code is slightly shorter but has no
real change in performance.

Pro:
   * using netvsc is more like other DPDK NIC's
   * the exception packet uses less CPU
   * much smaller code size
   * no locking required on VF transmit/receive path
   * no legacy Linux network device to get mangled by userspace
   * much simpler (1K vs 9K) LOC
   * unified extended statistics

Con:
   * using netvsc has more complex startup model
   * no bifurcated driver support
   * no flow support (since host does not have flow API).
   * no tunnel offload support
   * no receive interrupt support

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
2018-09-14 20:08:41 +02:00
Stephen Hemminger
f6ddcf80ad net/netvsc: implement link state change callback
Implement callback functionality on link state changes.
This is not really driven off of interrupt file descriptor like most other
PMD's. Instead, it happens when a link state change message arrives
in the common ring buffer.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
2018-09-14 20:08:41 +02:00
Stephen Hemminger
85c4209189 net/netvsc: exhausting Tx descriptors is not an error
If application sends faster than vswitch can keep up, then the
transmit descriptor pool will be exhausted. This is not a failure
so change the name statistic and don't include it in oerrors.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
2018-09-14 20:08:41 +02:00
Stephen Hemminger
a25d39a3eb net/netvsc: allow tuning latency with devargs
Allow overriding default guest to host latency on per device basis
with devargs.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
2018-09-14 20:08:41 +02:00
Stephen Hemminger
cf2b90756c bus/vmbus: add devargs support
Take device arguments from command line and put
them in the device devargs.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
2018-09-14 20:08:41 +02:00
Ferruh Yigit
323e7b667f ethdev: make default behavior CRC strip on Rx
Removed DEV_RX_OFFLOAD_CRC_STRIP offload flag.
Without any specific Rx offload flag, default behavior by PMDs is to
strip CRC.

PMDs that support keeping CRC should advertise DEV_RX_OFFLOAD_KEEP_CRC
Rx offload capability.

Applications that require keeping CRC should check PMD capability first
and if it is supported can enable this feature by setting
DEV_RX_OFFLOAD_KEEP_CRC in Rx offload flag in rte_eth_dev_configure()

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Tomasz Duszynski <tdu@semihalf.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Jan Remes <remes@netcope.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Hyong Youb Kim <hyonkim@cisco.com>
2018-09-14 20:08:41 +02:00
Igor Romanov
83cf204a98 net/bonding: do not ignore RSS key on device config
Bonding driver ignores the value of RSS key (that is set in the port RSS
configuration) in bond_ethdev_configure(). So the only way to set
non-default RSS key is by using rss_hash_update(). This is not an
expected behaviour.

Make the bond_ethdev_configure() set default RSS key only if
requested key is set to NULL.

Fixes: 734ce47f71 ("bonding: support RSS dynamic configuration")
Cc: stable@dpdk.org

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Chas Williams <chas3@att.com>
2018-09-14 20:08:41 +02:00