Shahaf Shuler [Wed, 10 Jan 2018 09:16:58 +0000 (11:16 +0200)]
net/mlx5: add device configuration structure
Move device configuration and features capabilities to its own structure.
This structure is filled by mlx5_pci_probe(), outside of this function
it should be treated as *read only*.
This configuration struct will be used for the Tx/Rx queue setup to
select the Tx/Rx queue parameters based on the user configuration and
device capabilities.
In addition it will be used by the burst selection function to decide
on the best pkt burst to be used.
Shahaf Shuler [Wed, 10 Jan 2018 09:16:57 +0000 (11:16 +0200)]
net/mlx5: change pkt burst select function prototype
Change the function prototype to return the function pointer of the
selected Tx/Rx burst function instead of assigning it directly to the
device context.
Such change will enable to use those select functions to query the burst
function that will be selected according to the device configuration.
Yongseok Koh [Tue, 9 Jan 2018 17:38:50 +0000 (09:38 -0800)]
net/mlx5: fix overwriting bit-fields in SW Rx queue
Bit-fields in mlx5_rxq_data can be changed on the fly by a control plane -
e.g. rxq->mark. However, vectorized Rx uses a bit-field to mark pending
errors. Even if one bit is written, consequence is to write the whole
integer and this can cause a synchronization issue - two entities write to
a same block without locking. As the pending_err bit is entirely internal
use for the datapath, this can be replaced with a local variable.
Moti Haimovsky [Thu, 4 Jan 2018 16:12:03 +0000 (18:12 +0200)]
net/mlx4: verify Tx max sges
Max number of Tx scatter-gather entries is a property of the device
and is queried at init. This value was not changed in a while and
most probably will not be changed in the future, Therefore and
in order to enhance Tx performance, the Tx max-sge value is hardcoded
in mlx4 PRM code.
This patch adds a verification that the above assumption still holds
and that the hardcoded value is still supported by the mlx4 hardware.
Add description of raw flow type mode for flow_director_filter
command in testpmd. Modify description of flow type parameter
for functions set_hash_global_config, set_hash_input_set and
set_fdir_input_set.
Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com> Acked-by: John McNamara <john.mcnamara@intel.com> Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Olivier Matz [Wed, 3 Jan 2018 14:29:23 +0000 (15:29 +0100)]
net/i40e: fix VSI MAC filter on primary address change
When primary address mac is changed, the mac filters were not updated in
the VSI with the new mac addr and incoming packets with this destination
address are dropped by the hardware filters.
This patch removes the VSI mac filter for the previous mac address and
adds a new one for new mac address.
Add a new Rx function using AVX2 instructions for higher
performance. For now, this functionality is limited to platforms
with Intel Xeon Scalable Processor(SP). The function to be used
is selected at runtime, not just at compile-time.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Add a new Tx function using AVX2 instructions for higher
performance. For now, this functionality is limited to platforms
with Intel Xeon Scalable Processor(SP). The function to be used
is selected at runtime, not just at compile-time.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Qiming Yang [Wed, 10 Jan 2018 16:04:36 +0000 (00:04 +0800)]
net/ixgbe/base: clear sync register during init
This patch clears software resource bits in synchronization
register and updates host interface resource bit error case for
X540. It also fixes compile warnings of using GCC 7.
Signed-off-by: Qiming Yang <qiming.yang@intel.com> Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Qi Zhang [Tue, 9 Jan 2018 20:30:19 +0000 (15:30 -0500)]
net/i40e/base: fix reading LLDP configuration
Previous method for reading LLDP config was based on hard-coded offsets.
It happened to work, because of structured architecture of the NVM memory.
In the new approach, known as FLAT, we need to calculate the absolute
address, instead of using relative values. Needed defines for memory
location were added.
Qi Zhang [Tue, 9 Jan 2018 20:30:18 +0000 (15:30 -0500)]
net/i40e/base: fix compile issue for GCC 6.3
When using GCC 6.3.0 and EXTRA_CFLAGS=-Og, the compiler is not smart
enough to see that when you have an integrated VF that just one of the
if statemets has to be true so that ntu is always set. Fix the way that
the code is for integrated VFs so that the compiler won't complain.
Fixes: 9783eb15eb98 ("i40e/base: wrap the register definitions for PF and VF") Cc: stable@dpdk.org Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Acked-by: Beilei Xing <beilei.xing@intel.com>
Qi Zhang [Tue, 9 Jan 2018 20:30:13 +0000 (15:30 -0500)]
net/i40e/base: fix link LED blink
This fix solves an issue occurring while calling i40e_led_set function
from the driver with "blink" parameter set as TRUE. This call resulted
in Activity LED blinking instead of Link LED, which may lead to errors
in physically identyfying the port, since Activity LED may be blinking
for different reasons aswell.
Qi Zhang [Tue, 9 Jan 2018 20:30:11 +0000 (15:30 -0500)]
net/i40e/base: add NVM update preservation flags
Add preservation flags support on X722 devices for NVM update AdminQ
function wrapper. Add new parameter and handling to nvm update admin
queue function intended to allow nvmupdate tool to configure the
preservation flags in the AdminQ command.
Qi Zhang [Tue, 9 Jan 2018 20:30:10 +0000 (15:30 -0500)]
net/i40e/base: clean up
1. Cleanup logical in __i40e_read_nvm_word and reuse it in
i40e_read_nvm_word.
2. Change couple functions to static so we can remove uncessary function
declarations
3. Cleanup logical in i40e_validate_nvm_checksum.
4. Add more debug information in PF reset
5. correct comments
6. Minor code style fix.
Qi Zhang [Tue, 9 Jan 2018 20:30:07 +0000 (15:30 -0500)]
net/i40e/base: add link speed convert function
Introduce a helper function which can convert the AdminQ link speed
definition into a virtchnl definition. This can then be used by host
driver implementations in order to safely convert to the interface
recognized by the virtual functions.
Qi Zhang [Tue, 9 Jan 2018 20:30:04 +0000 (15:30 -0500)]
net/i40e/base: add byte swaps in PHY register access
Add byte swap commandwhen transferring data between memory and firmware
while using PHY register access functions. Endianness also need to be
handled correctly during these swaps.
Qi Zhang [Tue, 9 Jan 2018 20:30:03 +0000 (15:30 -0500)]
net/i40e/base: retry AQC to overcome IRCRead hangs
When the I2C is busy, the PHY reads are delayed. The firmware will
return EGAIN in these cases with an expectation that the SW will trigger
the reads again. This patch retries the operation for a maximum period
of 500ms.
Yanglong Wu [Wed, 10 Jan 2018 01:51:36 +0000 (09:51 +0800)]
net/ixgbe: fix the failure of number of Tx queue check
Tx_q check fails when the SRIOV is active and tx_q > rx_q. It has
to use the maximum HW queue number for calculation, to get the
right number of queue can be used.
Fixes: 27b609cbd1c6 ("ethdev: move the multi-queue mode check to specific drivers") Cc: stable@dpdk.org Signed-off-by: Yanglong Wu <yanglong.wu@intel.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Qi Zhang [Mon, 11 Dec 2017 18:09:51 +0000 (13:09 -0500)]
net/i40e: exclude LLDP packet count
When use port stats register to calculate the packet count, LLDP packets
are counted in statistics which is not expected, the patch exclude this
number from total number.
net/i40e: turn off flexible payload on driver init
Function i40e_GLQF_reg_init() overwrites global register for
flexible payload, forcing extraction of first 16 bytes of
L2/L3/L4 payload to the field vector even if flexible payload
is not used by an application. Such unconditional turn on of
flexible payload effectively disables ability to use outer
IP Destination address for RSS/FDIR for tunnelled packets,
as flexible payload overwrites outer IP destination address
on the field vector.
Now flexible payload turned on only when flow director is
enabled and configured.
Wei Dai [Tue, 9 Jan 2018 08:56:07 +0000 (16:56 +0800)]
net/i40e: determine number of queues per VF at run time
Without this patch, the number of queues per i40e VF is set to 4
by CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_VF=4 in config/common_base.
It is a fixed value determined at compile time and can't be changed
at run time.
With this patch, the number of queues per i40e VF can be determined
at run time. For example, if the PCI address of an i40e PF is
aaaa:bb.cc, with the EAL parameter -w aaaa:bb.cc,queue-num-per-vf=8,
the number of queues per VF created from this PF is set to 8.
If there is no "queue-num-per-vf" setting in EAL parameters, it uses
the default value of 4. And if the value after the "queue-num-per-vf"
is invalid, it will also use the default value. The valid values can
be 1, 2, 4, 8, or 16.
Signed-off-by: Wei Dai <wei.dai@intel.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Beilei Xing [Wed, 27 Dec 2017 06:01:49 +0000 (14:01 +0800)]
net/i40e: change VF default ITR interval
Current default ITR interval I40E_QUEUE_ITR_INTERVAL_DEFAULT is
used by both DPDK PF and DPDK VF, but this ITR interval value
will cause lots of interrupts when using VF. This patch modifies
VF default ITR interval to reduce interrupts.
ITR interval can be reconfigured by RTE_LIBRTE_I40E_ITR_INTERVAL
if expecting low latency.
Wei Zhao [Tue, 9 Jan 2018 06:44:30 +0000 (14:44 +0800)]
net/ixgbe: move RSS to flow API
Rte_flow was defined to include RSS, this patch moves ixgbe
existing RSS to rte_flow. The old RSS configuration is kept
as it was, and can be deprecated in the future.
Signed-off-by: Wei Zhao <wei.zhao1@intel.com> Acked-by: Wei Dai <wei.dai@intel.com>
Wei Zhao [Tue, 9 Jan 2018 06:44:29 +0000 (14:44 +0800)]
net/e1000: move RSS to flow API
Rte_flow was defined to include RSS, this patch moves igb
existing RSS functionalities into rte_flow. The old RSS
configuration method is kept as it was, and can be deprecated in
the future.
Signed-off-by: Wei Zhao <wei.zhao1@intel.com> Acked-by: Wei Dai <wei.dai@intel.com>
Andrew Rybchenko [Sun, 24 Dec 2017 10:46:44 +0000 (10:46 +0000)]
doc: add sfc tunnels support to release features
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru> Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Andrew Rybchenko [Sun, 24 Dec 2017 10:46:42 +0000 (10:46 +0000)]
net/sfc: correct Rx checksum offloads for tunnel packets
In the case of tunnel packet, PKT_RX_{IP,L4}_CSUM_* flags correspond
to inner packet checksums. There is only one flag to indicate bad
external IPv4 header checksum.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Andrew Rybchenko [Sun, 24 Dec 2017 10:46:41 +0000 (10:46 +0000)]
net/sfc: support VXLAN and NVGRE packet types classification
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru> Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Andrew Rybchenko [Sun, 24 Dec 2017 10:46:39 +0000 (10:46 +0000)]
net/sfc: support UDP tunnel ports configuration
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru> Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Andrew Rybchenko [Sun, 24 Dec 2017 10:46:37 +0000 (10:46 +0000)]
net/sfc/base: allow to request inner classes for Rx packets
If HW/FW supports tunnel encapsulations, Rx event may contain
either inner or outer packet classes. By default outer classes
are requested. Make it possible to request inner classes to
have more information about packet type and allow to interpret
inner frame checksum validation results correctly.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andy Moreton <amoreton@solarflare.com> Reviewed-by: Mark Spender <mspender@solarflare.com>
Andrew Rybchenko [Sun, 24 Dec 2017 10:46:36 +0000 (10:46 +0000)]
net/sfc/base: add function to create packed stream RxQ
Encoding packed stream buffer size in RxQ type is not a future-proof
idea taking into account a new RxQ types with extra parameters.
To be consistent make packet stream buffer size a separate parameter.
In order to avoid blowing of the default RxQ create function prototype
add a dedicated function to create packed stream RxQ without not
applicable paramters.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andy Moreton <amoreton@solarflare.com> Reviewed-by: Mark Spender <mspender@solarflare.com>
Andrew Rybchenko [Sun, 24 Dec 2017 10:46:35 +0000 (10:46 +0000)]
net/sfc/base: control RxQ scatter using flag instead of type
Rx scatter may be applicable to different Rx queue types.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andy Moreton <amoreton@solarflare.com> Reviewed-by: Mark Spender <mspender@solarflare.com>
Andrew Rybchenko [Sun, 24 Dec 2017 10:46:34 +0000 (10:46 +0000)]
net/sfc: retry port start to handle MC reboot in the middle
MC reboot may be provoked by the other function which is either
starting in parallel or, for example, reconfiguring UDP tunnel
ports.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andy Moreton <amoreton@solarflare.com> Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Andrew Rybchenko [Sun, 24 Dec 2017 10:46:33 +0000 (10:46 +0000)]
net/sfc: handle MC reboot event
Implement handling of the MC reboot event received on management
event queue or detected by MCDI processing.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru> Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Andrew Rybchenko [Sun, 24 Dec 2017 10:46:32 +0000 (10:46 +0000)]
net/sfc: do not hold management event queue lock while MCDI
MCDI execution may require MCDI proxy handling which involves
management event queue polling. So, it is a bad idea to hold
managment event queue lock when MCDI is executed.
Event queue creation and destruction are MCDI operations.
Fixes: 4650ed44c120 ("net/sfc: support MCDI proxy") Cc: stable@dpdk.org Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru> Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Andrew Rybchenko [Sun, 24 Dec 2017 10:46:31 +0000 (10:46 +0000)]
net/sfc: fix label name to be consistent
Management event queue is the right name of event queue 0.
Fixes: 3b809c27b1fe ("net/sfc: support link status change interrupt") Cc: stable@dpdk.org Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru> Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Pavan Nikhilesh [Tue, 19 Dec 2017 18:01:45 +0000 (23:31 +0530)]
event/octeontx: fix Rx adapter port id mapping
When octeontx event dev receives a packet for the event Rx adapter, the
mbuf port id should contain the appropriate ethdev id instead of
internal channel info.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Tested-by: Maxime Coquelin <maxime.coquelin@redhat.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Radu Nicolau [Fri, 15 Dec 2017 11:34:37 +0000 (11:34 +0000)]
net/tap: renamed netlink functions
Functions like nl_recev and nl_send name clash functions in the
libnl library (https://www.infradead.org/~tgr/libnl/).
All functions declared in tap_netlink.h were decorated with tap_
for consistency.
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Elza Mathew [Wed, 6 Dec 2017 00:25:07 +0000 (16:25 -0800)]
ethdev: optimize xstats by ids APIs
Introduced a check to detect if the stats IDs being
requested are all basic stats IDs. In that case,
ensured that only the basic stats would be retrieved.
Previously, both basic stats and xstats were being
retrieved even if all the IDs were basic stats IDs.
Signed-off-by: Elza Mathew <elza.mathew@intel.com> Reviewed-by: Lee Daly <lee.daly@intel.com>