Matan Azrad [Wed, 6 Dec 2017 17:57:53 +0000 (17:57 +0000)]
net/mlx4: merge Tx queue rings management
The Tx queue send ring was managed by Tx block head,tail,count and mask
management variables which were used for managing the send queue remain
space and next places of empty or completed work queue entries.
This method suffered from an actual addresses recalculation per packet,
an unnecessary Tx block based calculations and an expensive dual
management of Tx rings.
Move send queue ring calculation to be based on actual addresses while
managing it by descriptors ring indexes.
Add new work queue entry pointer to the descriptor element to hold the
appropriate entry in the send queue.
Matan Azrad [Wed, 6 Dec 2017 17:57:52 +0000 (17:57 +0000)]
net/mlx4: optimize Tx multi-segment case
mlx4 Tx block can handle up to 4 data segments or control segment + up
to 3 data segments. The first data segment in each not first Tx block
must validate Tx queue wraparound and must use IO memory barrier before
writing the byte count.
The previous multi-segment code used "for" loop to iterate over all
packet segments and separated first Tx block data case by "if"
statements.
Use switch case and unconditional branches instead of "for" loop can
optimize the case and prevents the unnecessary checks for each data
segment; This hints to compiler to create optimized jump table.
Optimize this case by switch case and unconditional branches usage.
Matan Azrad [Wed, 6 Dec 2017 17:57:49 +0000 (17:57 +0000)]
net/mlx4: fix Tx packet drop application report
When invalid lkey is sent to HW, HW sends an error notification in
completion function.
The previous code wouldn't crash but doesn't add any application report
in case of completion error, so application cannot know that packet
actually was dropped in case of invalid lkey.
Return back the lkey validation to Tx path.
Fixes: 2eee458746bc ("net/mlx4: remove error flows from Tx fast path") Cc: stable@dpdk.org Signed-off-by: Matan Azrad <matan@mellanox.com> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Nipun Gupta [Fri, 8 Dec 2017 05:21:27 +0000 (10:51 +0530)]
net/dpaa2: prefetch the parse results from next fd
As there were less number of CPU cycles in between when we access
the parse results and when we prefetch them, this patch modifies
the prefetch of the next parse result.
Nipun Gupta [Fri, 8 Dec 2017 05:21:25 +0000 (10:51 +0530)]
net/dpaa2: optimize Rx path packet parsing
Parsing the annotation has multiple if checks in the data path.
These are reduced for common cases like IPv4/IPv6 and UDP/TCP
packets to enhance performance of these generic cases.
Ashish Jain [Fri, 8 Dec 2017 05:21:22 +0000 (10:51 +0530)]
net/dpaa2: align the frame size in MTU set
Setting correct frame size in dpaa2_dev_mtu_set
api call. Also correcting the correct max frame size
setting in hardware while dev_configure for jumbo frames
On behalf of the DPDK Technical board, Hemant Agrawal observed that the
DPDK project's Intellectual Property Policy (http://dpdk.org/about/charter)
requires 3-Clause BSD license or an exception approval. However, two
vmxnet3 source files have 2-Clause BSD license.
This patch modifies those licenses to 3-Clause BSD license.
Declan Doherty [Thu, 30 Nov 2017 23:25:35 +0000 (23:25 +0000)]
net/bonding: do not drop LACPDUs on slaves Tx failure
In message (http://dpdk.org/ml/archives/dev/2017-November/081557.html)
it was noted that under congestion that the LACPDUs are dropped under
load.
This patch changes the drop logic to re-enqueue the LACPDU to the slaves
control message queue. This will allow resend attempts to be made in
subsequent tx_burst() calls on the bonded device.
Adrien Mazarguil [Thu, 23 Nov 2017 17:38:04 +0000 (18:38 +0100)]
net/mlx4: restore inner VXLAN RSS support
Inner VXLAN RSS was supported and performed by default prior to the entire
mlx4 refactoring that occurred in DPDK 17.11, however so far the new Verbs
RSS API did not provide means to enable it. This will be addressed in
Linux 4.15 and in RDMA core.
Thanks to RSS capabilities, the PMD can now probe for its support and
enable it again by default.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com> Acked-by: Neil Horman <nhorman@tuxdriver.com>
Adrien Mazarguil [Thu, 23 Nov 2017 17:38:02 +0000 (18:38 +0100)]
net/mlx4: restore UDP RSS by probing capabilities
Until now, UDP RSS support could not be relied on due to a problem in the
Linux kernel implementation and mlx4 RSS capabilities were not reported at
all, hence the PMD had to make assumptions.
Since both issues will be addressed simultaneously in Linux 4.15 (related
patches already upstream) and likely backported afterward, UDP RSS support
can be enabled by probing RSS capabilities.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com> Acked-by: Neil Horman <nhorman@tuxdriver.com>
Adrien Mazarguil [Thu, 23 Nov 2017 17:38:00 +0000 (18:38 +0100)]
net/mlx4: use function to get default RSS fields
Supported RSS hash fields are listed in function mlx4_conv_rss_hf() and
duplicated in mlx4_flow_prepare(); the latter are used when RSS is
requested without specifying any parameters.
This commit standardizes on mlx4_conv_rss_hf().
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com> Acked-by: Neil Horman <nhorman@tuxdriver.com>
Nélio Laranjeiro [Mon, 20 Nov 2017 15:35:47 +0000 (16:35 +0100)]
net/mlx5: fix Tx checksum offloads
Tx checksum offloads are correctly handled in a single Tx burst function
whereas the capability is always set.
This causes VXLAN packet with checksum offloads request to be ignored when
the (E)MPS Tx functions are selected.
Alejandro Lucero [Fri, 24 Nov 2017 15:31:49 +0000 (15:31 +0000)]
net/nfp: configure default RSS reta table
Some apps can enable RSS but not update the reta table nor the hash.
This patch adds a default reta table setup based on total number of
configured rx queues. The hash key is dependent on how the app
configures the rx_conf struct.
Alejandro Lucero [Fri, 24 Nov 2017 14:26:02 +0000 (14:26 +0000)]
net/nfp: fix CRC strip check behaviour
NFP does CRC strip by default and it is not configurable. But, even
if an app requests not to do it, that should not be a reason for PMD
configuration failure.
Alejandro Lucero [Fri, 24 Nov 2017 14:24:37 +0000 (14:24 +0000)]
net/nfp: fix jumbo settings
When jumbo frames is configured, the hardware mtu needs to be updated to
the specified max_rx_pkt_len. Also, changing mtu should be avoided once
the PMD port started.
Nélio Laranjeiro [Thu, 23 Nov 2017 09:22:34 +0000 (10:22 +0100)]
net/mlx5: remove 32-bit support
naddr variable was introduced in
commit 9a7fa9f76d9e ("net/mlx5: use vector types to speed up processing")
to avoid compilation errors on 32bits compilation, as x86_32 is no more
supported by rdma-core nor by MLNX_OFED, this variable becomes useless and
can be safely removed.
Nélio Laranjeiro [Thu, 23 Nov 2017 09:22:33 +0000 (10:22 +0100)]
net/mlx5: fix secondary process verification
Since the secondary process has its own devops, function which cannot be
called by the secondary don't need anymore to verify which process is
calling it.
Shijith Thotton [Mon, 20 Nov 2017 11:59:51 +0000 (17:29 +0530)]
net/liquidio: support queue re-configuration
Support for re-configuration of number of queues per port and descriptor
size. Renamed variable representing number of descriptors as nb_desc
from max_count.
Falcon support has been withdrawn from libefx, however, there is still
an obsolete Falcon-specific assertion that efx_mac_stats_upload()
and efx_port_poll() aren't concurrent. To be consistent with an overall
Falcon support revocation it's desirable to remove it.
Fix debug build invalid assertion failure.
Fixes: 19b64c6ac35f ("net/sfc/base: import libefx base") Fixes: 8c7c723dfe7c ("net/sfc/base: import MAC statistics") Cc: stable@dpdk.org Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Fix warning
"C6001: Using uninitialized memory '*sensor_maskp'"
which could occur when the npages argument to efx_mcdi_sensor_info()
is less than or equal to zero.
Fixes: dfb3b1ce15f6 ("net/sfc/base: import monitors access via MCDI") Cc: stable@dpdk.org Signed-off-by: Andrew Lee <alee@solarflare.com> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Andrew Lee [Thu, 16 Nov 2017 08:04:37 +0000 (08:04 +0000)]
net/sfc/base: fix warnings from VS2015 C compiler (C4214)
Fix multiple level 4 warnings
"C4214: nonstandard extension used: bit field types other than int";
no functional changes.
Fixes: f9565517ff4f ("net/sfc/base: import filters support") Fixes: 457beb2c4d3e ("net/sfc/base: support filters for encapsulated packets") Cc: stable@dpdk.org Signed-off-by: Andrew Lee <alee@solarflare.com> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Andrew Lee [Thu, 16 Nov 2017 08:04:36 +0000 (08:04 +0000)]
net/sfc/base: fix warnings from VS2015 C compiler (C4057)
Fix two level 4 warnings
"C4057: 'function': 'const uint8_t *' differs in indirection to
slightly different base types from 'caddr_t'"; no functional changes.
Fixes: 354df7eadf66 ("net/sfc/base: import bootrom configuration") Cc: stable@dpdk.org Signed-off-by: Andrew Lee <alee@solarflare.com> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Andrew Lee [Thu, 16 Nov 2017 08:04:33 +0000 (08:04 +0000)]
net/sfc/base: fix warnings from VS2015 C compiler (C4245)
Fix level 4 warning
"C4245: 'initializing': conversion from 'int' to 'uint32_t',
signed/unsigned mismatch" warning; no functional changes.
Fixes: f9565517ff4f ("net/sfc/base: import filters support") Fixes: daa007afd04b ("net/sfc/base: split local MAC I/G back into separate flags") Fixes: 23c6d0dbac80 ("net/sfc/base: improve API to get supported filter matches") Fixes: 457beb2c4d3e ("net/sfc/base: support filters for encapsulated packets") Cc: stable@dpdk.org Signed-off-by: Andrew Lee <alee@solarflare.com> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Mark Spender [Thu, 16 Nov 2017 08:04:29 +0000 (08:04 +0000)]
net/sfc/base: fix diagnostics support build without Siena
The compilation failed because __efx_sram_pattern_fns was used in
efx_nic.c, but defined in efx_sram.c which is only needed when
supporting Siena.
To fix it move all the code using __efx_sram_pattern_fns into
Siena-specific files (except for the definition in efx_sram.c itself,
as that file only needs to be included in Siena-supporting builds
anyway).
The functions to test registers and tables are unlikely to apply to any
new hardware and so can be moved into Siena files. Since Huntington
such tests have been implemented in firmware.
Fixes: 7571c3168798 ("net/sfc/base: import diagnostics support") Cc: stable@dpdk.org Signed-off-by: Mark Spender <mspender@solarflare.com> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Mark Spender [Thu, 16 Nov 2017 08:04:17 +0000 (08:04 +0000)]
net/sfc/base: request info about outer frame in Rx events
For encapsulated packets, the firmware gives info about the inner frame
fields by default. When not using encapsulation offload, ask for info
about the outer frame instead.
On SFN8xxx with firmware version before v6.4.2.1007 driver reload is
needed after switching from full-feature to low-latency firmware
variant since the driver still thinks that firmware supports
encapsulation, but firmware does not tolerate request to provide info
about outer frame in Rx events.
Signed-off-by: Mark Spender <mspender@solarflare.com> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Mark Spender [Thu, 16 Nov 2017 08:04:16 +0000 (08:04 +0000)]
net/sfc/base: ignore error in completion event on MCDIv2 HW
With MCDIv2, the reponse length can be to big to fit into the
CMDDONE_DATALEN field in the MCDI completion event. But rather that
the length being truncated, it can overflow into the CMDDONE_ERRNO
field (this is a longstanding firmware bug). Hence the CMDDONE_ERRNO
field may not be valid.
It isn't necessary to use the value in the CMDDONE_ERRNO field though,
so it can be ignored. The actual error code is already read from the
response header on MCDIv2 capable hardware and stored in emr_rc, so
that can be used instead.
Signed-off-by: Mark Spender <mspender@solarflare.com> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
In the case of packed stream real size of the buffer does not fit in
Rx descriptor byte count. Real size is specified on Rx queue setup.
Non-zero fake should be used to bypass hardware checks.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Andrew Rybchenko [Thu, 16 Nov 2017 08:04:10 +0000 (08:04 +0000)]
net/sfc/base: provide simple access to RxQ state in EvQ
Packed stream Rx datapath requires access to packed stream state
stored in event queue. Number of credits is upstead in event handler
on a new buffer, packets parsing on 64k boundary crossing and
Rx doorbell push to give credits back.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Andrew Rybchenko [Thu, 16 Nov 2017 08:04:09 +0000 (08:04 +0000)]
net/sfc/base: optimize credits overflow check
Apply check against firmware maximum just before pushing.
However, it does not save from overflow inside firmware,
if firmware still have some credits.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Andrew Rybchenko [Thu, 16 Nov 2017 08:04:08 +0000 (08:04 +0000)]
net/sfc/base: clarify meaning of Rx desc lbits in PS mode
There is no point to add mask plus one before mask applying since it
still does not help to avoid overflow on subtract. Modulo mask
arithmetic works perfectly for unsigned integers of the same type.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>