Guinan Sun [Mon, 6 Jul 2020 08:11:58 +0000 (08:11 +0000)]
net/e1000/base: introduce flags for outstanding requests
Introduce flags to make flexible adjusting
number of outstanding requests.
Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>
Guinan Sun [Mon, 6 Jul 2020 08:11:57 +0000 (08:11 +0000)]
net/e1000/base: add ICL device ID
This patch contains a preliminary support for new LAN device ID.
Signed-off-by: Lotem Leder <lotem.leder@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>
Guinan Sun [Mon, 6 Jul 2020 08:11:56 +0000 (08:11 +0000)]
net/e1000/base: update for i210 slow system clock
This code is required for the update for system clock.
Signed-off-by: Todd Fujinaka <todd.fujinaka@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>
Simei Su [Tue, 7 Jul 2020 01:38:18 +0000 (09:38 +0800)]
net/ice: fix GTPU/PPPoE packets with no hash value
When RSS init, because of profile overlap, the GTPU_IPV4 packets
don't hit GTPU_INNER_IPV4 profile which causes no hash value. Because
of no PPPoE profile, the PPPoE packets also has no hash value. This
patch solves this issue by pulling GTPU_IPV4 profile into inner ipv4
group and creating related PPPoE profile at the same time.
Fixes:
4717a12cfaf1 ("net/ice: initialize and update RSS based on user config")
Signed-off-by: Simei Su <simei.su@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Pavel Ivashchenko [Thu, 2 Jul 2020 12:37:17 +0000 (12:37 +0000)]
net/i40e: fix getting EEPROM information
Fixes:
50130a0c4440 ("net/i40e/base: change AQ command for PHY access")
Cc: stable@dpdk.org
Signed-off-by: Pavel Ivashchenko <pivashchenko@nfware.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Shougang Wang [Mon, 6 Jul 2020 09:37:05 +0000 (09:37 +0000)]
net/ice: fix error log in generic flow
When create a RSS rule with void action, the error log is "Invalid
input set". This patch fix the issue by adding check for the type of
first actions item.
Fixes:
7615a6895009 ("net/ice: rework for generic flow enabling")
Cc: stable@dpdk.org
Signed-off-by: Shougang Wang <shougangx.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Simei Su [Thu, 2 Jul 2020 05:11:50 +0000 (13:11 +0800)]
net/ice: support PPPoE RSS
This patch enables PPPoE control packets with src mac and session id
and PPPoE data packets with ip address and L4 port in rte_flow.
Signed-off-by: Simei Su <simei.su@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Simei Su [Thu, 2 Jul 2020 05:11:49 +0000 (13:11 +0800)]
app/testpmd: support extended RSS offload types
This patch adds testpmd cmdline support for PPPoE.
Signed-off-by: Simei Su <simei.su@intel.com>
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Simei Su [Thu, 2 Jul 2020 05:11:48 +0000 (13:11 +0800)]
ethdev: add PPPoE RSS offload types
This patch defines new RSS offload types for PPPoE. Typically,
session id would be the RSS input set for a PPPoE packet, but
as a hint, each driver may have different default behaviors.
Signed-off-by: Simei Su <simei.su@intel.com>
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Ajit Khaparde [Thu, 2 Jul 2020 23:28:38 +0000 (16:28 -0700)]
doc: update release notes for bnxt
Update release notes with enhancements in Broadcom PMD.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Somnath Kotur [Thu, 2 Jul 2020 23:28:37 +0000 (16:28 -0700)]
net/bnxt: support count action in flow query
Use the flow counter manager to fetch the accumulated stats for
a flow.
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Somnath Kotur [Thu, 2 Jul 2020 23:28:36 +0000 (16:28 -0700)]
net/bnxt: add ULP flow counter manager
The Flow counter manager allocates memory to hold the software view
of the counters where the on-chip counter data will be accumulated
along with another memory block that will be shadowing the on-chip
counter data i.e where the raw counter data will be DMAed into from
the chip.
It also keeps track of the first HW counter ID as that will be needed
to retrieve the counter data in bulk using a TF API. It issues this cmd
in an rte_alarm thread that keeps running every second.
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Venkat Duvvuru [Thu, 2 Jul 2020 23:28:35 +0000 (16:28 -0700)]
net/bnxt: fill cfa action in Tx descriptor
Currently, only vfrep transmit requires cfa_action to be filled
in the tx buffer descriptor. However with truflow, dpdk(non vfrep)
to port also requires cfa_action to be filled in the tx buffer
descriptor.
This patch uses the correct cfa_action pointer while transmitting
the packet. Based on whether the packet is transmitted on non-vfrep
or vfrep, tx_cfa_action or vfr_tx_cfa_action inside txq will be
filled in the tx buffer descriptor.
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Venkat Duvvuru [Thu, 2 Jul 2020 23:28:34 +0000 (16:28 -0700)]
net/bnxt: add port default rules for ingress and egress
ingress & egress port default rules are needed to send the packet
from port_to_dpdk & dpdk_to_port respectively.
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Somnath Kotur [Thu, 2 Jul 2020 23:28:33 +0000 (16:28 -0700)]
net/bnxt: create default flow rules for port reprentor
Invoked 3 new APIs for the default flow create/destroy and to get
the action ptr for a default flow.
Changed ulp_intf_update() to accept rte_eth_dev as input and invoke
the same from the VF rep start function.
ULP Mark Manager will indicate if the cfa_code returned in the
Rx completion descriptor was for one of the default flow rules
created for the VF representor conduit. The mark_id returned
in such a case would be the VF rep's DPDK Port id, which can be
used to get the corresponding rte_eth_dev struct in bnxt_vf_recv
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Thu, 2 Jul 2020 23:28:32 +0000 (16:28 -0700)]
net/bnxt: add port representor and stat templates
The support for VF representor and counters is added to the
ulp templates.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Venkat Duvvuru [Thu, 2 Jul 2020 23:28:31 +0000 (16:28 -0700)]
net/bnxt: fill mapper parameters with default rules
Default rules are needed for the packets to be punted between the
following entities in the non-offloaded path
1. Device PORT to DPDK App
2. DPDK App to Device PORT
3. VF Representor to VF
4. VF to VF Representor
This patch fills all the relevant information in the computed fields
& the act_prop fields for the flow mapper to create the necessary
tables in the hardware to enable the default rules.
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Somnath Kotur [Thu, 2 Jul 2020 23:28:30 +0000 (16:28 -0700)]
net/bnxt: parse representors along with other devargs
Representor dev-args need to be parsed during pci probe as they determine
subsequent probe of VF representor ports as well.
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Venkat Duvvuru [Thu, 2 Jul 2020 23:28:29 +0000 (16:28 -0700)]
net/bnxt: manage VF to VFR conduit
When VF-VFR conduits are created, a mark is added to the mark database.
mark_flag indicates whether the mark is valid and has VFR information
(VFR_ID bit in mark_flag). Rx path was checking for this VFR_ID bit.
However, while adding the mark to the mark database, VFR_ID bit is not
set in mark_flag.
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Venkat Duvvuru [Thu, 2 Jul 2020 23:28:28 +0000 (16:28 -0700)]
net/bnxt: enhance port DB
1. Add "enum bnxt_ulp_intf_type” as the second parameter for the
port & func helper functions
2. Return vfrep related port & func information in the helper functions
3. Allocate phy_port_list dynamically based on port count
4. Introduce ulp_func_id_tbl array for book keeping func related
information indexed by func_id
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Venkat Duvvuru [Thu, 2 Jul 2020 23:28:27 +0000 (16:28 -0700)]
net/bnxt: enable port MAC qcfg command for trusted VF
Issue HWRM_PORT_MAC_QCFG command on trusted vf to fetch the port count.
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Thu, 2 Jul 2020 23:28:26 +0000 (16:28 -0700)]
net/bnxt: support conditional execution of mapper tables
Added support for conditional execution of the mapper tables so that
actions like count will have table processed only if action count
is configured.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Thu, 2 Jul 2020 23:28:25 +0000 (16:28 -0700)]
net/bnxt: support internal exact match entries
Added support for the internal exact match entries.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Thu, 2 Jul 2020 23:28:24 +0000 (16:28 -0700)]
net/bnxt: support global resource templates
Added support for the global resource templates, so that they
can be reused by the other regular templates.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Thu, 2 Jul 2020 23:28:23 +0000 (16:28 -0700)]
net/bnxt: add index opcode and operand to mapper table
Extended the regfile and computed field operations to a common
index opcode operation and added globlal resource operations are
also part of the index opcode operation.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Thu, 2 Jul 2020 23:28:22 +0000 (16:28 -0700)]
net/bnxt: disable Tx vector mode on TruFlow
The vector mode in the tx handler is disabled when truflow is
enabled since truflow now requires bd action record support.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Thu, 2 Jul 2020 23:28:21 +0000 (16:28 -0700)]
net/bnxt: support IF table processing
Added support for if table processing in the ulp mapper
layer. This enables support for the default partition action
record pointer interface table.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Mike Baucom [Thu, 2 Jul 2020 23:28:20 +0000 (16:28 -0700)]
net/bnxt: support internal encap records
Modifications to allow internal encap records to be supported:
- Modified the mapper index table processing to handle encap without an
action record
- Modified the session open code to reserve some 64 Byte internal encap
records on tx
- Modified the blob encap swap to support encap without action record
Signed-off-by: Mike Baucom <michael.baucom@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Thu, 2 Jul 2020 23:28:19 +0000 (16:28 -0700)]
net/bnxt: integrate with the latest TF core changes
ULP changes to integrate with the latest session open
interface in tf_core
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Peter Spreadborough [Thu, 2 Jul 2020 23:28:18 +0000 (16:28 -0700)]
net/bnxt: support EEM system memory
- Select EEM Host or System memory via config parameter
- Add EEM system memory support for kernel memory
- Dependent on DPDK changes that add support for the HWRM_OEM_CMD.
Signed-off-by: Peter Spreadborough <peter.spreadborough@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Jay Ding [Thu, 2 Jul 2020 23:28:17 +0000 (16:28 -0700)]
net/bnxt: add global config set and get functions
- Add support to update global configuration for ACT_TECT
and ACT_ABCR.
- Add support to allow Tunnel and Action global configuration.
- Remove register read and write operations.
- Remove the register read and write support.
Signed-off-by: Jay Ding <jay.ding@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Michael Wildt [Thu, 2 Jul 2020 23:28:16 +0000 (16:28 -0700)]
net/bnxt: add TF register and unregister
- Add TF register/unregister support. Session got session clients to
keep track of the ctrl-channels/function.
- Add support code to tfp layer
Signed-off-by: Michael Wildt <michael.wildt@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Jay Ding [Thu, 2 Jul 2020 23:28:15 +0000 (16:28 -0700)]
net/bnxt: implement IF tables set and get
- Implement set/get for PROF_SPIF_CTXT, LKUP_PF_DFLT_ARP,
PROF_PF_ERR_ARP with tunneled HWRM messages
- Add IF table for PROF_PARIF_DFLT_ARP
- Fix page size offset in the HCAPI code
- Fix Entry offset calculation
Signed-off-by: Jay Ding <jay.ding@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Randy Schacher [Thu, 2 Jul 2020 23:28:14 +0000 (16:28 -0700)]
net/bnxt: align CFA resources with RM
- HCAPI resources need to align for Resource Manager
- Clean up unnecessary debug messages
Signed-off-by: Randy Schacher <stuart.schacher@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Jay Ding [Thu, 2 Jul 2020 23:28:13 +0000 (16:28 -0700)]
net/bnxt: add external action allocate and free
- Link external action alloc and free to new hcapi interface
- Add parameter range checking
- Fix issues with index allocation check
Signed-off-by: Jay Ding <jay.ding@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Peter Spreadborough [Thu, 2 Jul 2020 23:28:12 +0000 (16:28 -0700)]
net/bnxt: remove table scope from session
- Remove table scope data from session. Added to EEM.
- Complete move to RM of table scope base and range.
- Fix some err messaging strings.
- Fix the tcam logging message.
Signed-off-by: Peter Spreadborough <peter.spreadborough@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Peter Spreadborough [Thu, 2 Jul 2020 23:28:11 +0000 (16:28 -0700)]
net/bnxt: update RM to support HCAPI only
- For the EM Module there is a need to only allocate the EM Records in
HCAPI RM but the storage control is requested to be outside of the RM
DB.
- Add TF_RM_ELEM_CFG_HCAPI_BA.
- Return error when the number of reserved entries for wc tcam is odd
number in tf_tcam_bind.
- Remove em_pool from session
- Use RM provided start offset and size
- HCAPI returns entry index instead of row index for WC TCAM.
- Move resource type conversion to hrwm set/free tcam functions.
Signed-off-by: Peter Spreadborough <peter.spreadborough@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Michael Wildt [Thu, 2 Jul 2020 23:28:10 +0000 (16:28 -0700)]
net/bnxt: update table get to use new design
- Move bulk table get implementation to new Tbl Module design.
- Update messages for bulk table get
- Retrieve specified table element using bulk mechanism
- Remove deprecated resource definitions
- Update device type configuration for P4.
- Update RM DB HCAPI count check and fix EM internal and host
code such that EM DBs can be created correctly.
- Update error logging to be info on unbind in the different modules.
- Move RTE RSVD out of tf_resources.h
Signed-off-by: Michael Wildt <michael.wildt@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Peter Spreadborough [Thu, 2 Jul 2020 23:28:09 +0000 (16:28 -0700)]
net/bnxt: support EM and TCAM lookup with table scope
- Support for table scope within the EM module
- Support for host and system memory
- Update TCAM set/free.
- Replace TF device type by HCAPI RM type.
- Update TCAM set and free for HCAPI RM type
Signed-off-by: Peter Spreadborough <peter.spreadborough@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Jay Ding [Thu, 2 Jul 2020 23:28:08 +0000 (16:28 -0700)]
net/bnxt: support two-level priority for TCAMs
Allow TCAM indexes to be allocated from top or bottom.
If the priority is set to 0, allocate from the
lowest tcam indexes i.e. from top. Any other value,
allocate it from the highest tcam indexes i.e. from
bottom.
Signed-off-by: Jay Ding <jay.ding@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Michael Wildt [Thu, 2 Jul 2020 23:28:07 +0000 (16:28 -0700)]
net/bnxt: update RM with residual checker
- Add residual checker to the TF Host RM as well as new RM APIs. On
close it will scan the DB and check of any remaining elements. If
found they will be logged and FW msg sent for FW to scrub that
specific type of resources.
- Update the module bind to be aware of the module type, for each of
the modules.
- Add additional type 2 string util functions.
- Fix the device naming to be in compliance with TF.
- Update the device unbind order as to assure TCAMs gets flushed
first.
- Update the close functionality such that the session gets
closed after the device is unbound.
Signed-off-by: Michael Wildt <michael.wildt@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Michael Wildt [Thu, 2 Jul 2020 23:28:06 +0000 (16:28 -0700)]
net/bnxt: update identifier with remap support
- Add Identifier L2 CTXT Remap to the P4 device and updated the
cfa_resource_types.h to get the type support.
Signed-off-by: Michael Wildt <michael.wildt@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Michael Wildt [Thu, 2 Jul 2020 23:28:05 +0000 (16:28 -0700)]
net/bnxt: support multiple device
Implement the Identifier, Table Type and the Resource Manager
modules.
Integrate Resource Manager with HCAPI.
Update open/close session.
Move to direct msgs for qcaps and resv messages.
Signed-off-by: Michael Wildt <michael.wildt@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Jay Ding [Thu, 2 Jul 2020 23:28:04 +0000 (16:28 -0700)]
net/bnxt: support TCAM access
Implement TCAM alloc, free, bind, and unbind functions
Update tf_core, tf_msg, etc.
Signed-off-by: Jay Ding <jay.ding@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Randy Schacher [Thu, 2 Jul 2020 23:28:03 +0000 (16:28 -0700)]
net/bnxt: add core changes for EM and EEM lookups
- Move External Exact and Exact Match to device module using HCAPI
to add and delete entries
- Make EM active through the device interface.
Signed-off-by: Randy Schacher <stuart.schacher@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Shahaji Bhosle <sbhosle@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Peter Spreadborough [Thu, 2 Jul 2020 23:28:02 +0000 (16:28 -0700)]
net/bnxt: support HCAPI interface
Add new hardware shim APIs to support multiple
device generations
Signed-off-by: Peter Spreadborough <peter.spreadborough@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Shahaji Bhosle [Thu, 2 Jul 2020 23:28:01 +0000 (16:28 -0700)]
net/bnxt: support two-level priority for TCAMs
Allow TCAM indexes to be allocated from top or bottom.
If the priority is set to 0, allocate from the
lowest tcam indexes i.e. from top. Any other value,
allocate it from the highest tcam indexes i.e. from
bottom.
Signed-off-by: Shahaji Bhosle <sbhosle@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Michael Wildt [Thu, 2 Jul 2020 23:28:00 +0000 (16:28 -0700)]
net/bnxt: update multi device design
- Implement the modules RM, Device (WH+), Identifier.
- Update Session module.
- Implement new HWRMs for RM direct messaging.
- Add new parameter check macro's and clean up the header includes for
i.e. tfp such that bnxt.h is not directly included in the new modules.
- Add cfa_resource_types, required for RM design.
Signed-off-by: Michael Wildt <michael.wildt@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Shahaji Bhosle [Thu, 2 Jul 2020 23:27:59 +0000 (16:27 -0700)]
net/bnxt: support bulk table get and mirror
- Add new bulk table type get using FW
to DMA the data back to host.
- Add flag to allow records to be cleared if possible
- Set mirror using tf_alloc_tbl_entry
Signed-off-by: Shahaji Bhosle <sbhosle@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Michael Wildt [Thu, 2 Jul 2020 23:27:58 +0000 (16:27 -0700)]
net/bnxt: support multi device
Introduce new modules for Device, Resource Manager, Identifier,
Table Types, and TCAM for multi device support.
Signed-off-by: Michael Wildt <michael.wildt@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Peter Spreadborough [Thu, 2 Jul 2020 23:27:57 +0000 (16:27 -0700)]
net/bnxt: use HWRM direct for exact match insert and delete
Modify Exact Match insert and delete to use the HWRM messages directly.
Remove tunneled EM insert and delete message types.
Signed-off-by: Peter Spreadborough <peter.spreadborough@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Peter Spreadborough [Thu, 2 Jul 2020 23:27:56 +0000 (16:27 -0700)]
net/bnxt: support exact match
- Add Exact Match support
- Create EM table pool of memory indices
- Insert exact match internal entry API
- Sends EM internal insert and delete request to firmware
Signed-off-by: Peter Spreadborough <peter.spreadborough@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Venkat Duvvuru [Thu, 2 Jul 2020 23:27:55 +0000 (16:27 -0700)]
net/bnxt: modify port DB to handle more info
Apart from func_svif, func_id & vnic, port_db now stores and
retrieves func_spif, func_parif, phy_port_id, port_svif, port_spif,
port_parif, port_vport. New helper functions have been added to
support the same.
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Venkat Duvvuru [Thu, 2 Jul 2020 23:27:54 +0000 (16:27 -0700)]
net/bnxt: support HWRM port PHY qcaps
Issue HWRM_PORT_PHY_QCAPS to the firmware to get the physical
port count of the device.
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Venkat Duvvuru [Thu, 2 Jul 2020 23:27:53 +0000 (16:27 -0700)]
net/bnxt: get port and function info
add helper functions to get port & function related information
like parif, physical port id & vport id.
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Venkat Duvvuru [Thu, 2 Jul 2020 23:27:52 +0000 (16:27 -0700)]
net/bnxt: modify port DB dev interface
Modify ulp_port_db_dev_port_intf_update prototype to take
"struct rte_eth_dev *" as the second parameter.
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Lance Richardson [Thu, 2 Jul 2020 23:27:51 +0000 (16:27 -0700)]
net/bnxt: initialize parent PF information
Add support to query parent PF information (MAC address,
function ID, port ID and default VNIC) from firmware.
Current firmware returns zero for parent default vnic,
a temporary Wh+-specific workaround is included until
that can be fixed.
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Somnath Kotur [Thu, 2 Jul 2020 23:27:50 +0000 (16:27 -0700)]
net/bnxt: get IDs for port representor endpoint
Use 'first_vf_id' and the 'vf_id' that is input as part of adding
a representor to obtain the PCI function ID(FID) of the VF(VFR endpoint).
Use the FID as an input to FUNC_QCFG HWRM cmd to obtain the default
vnic ID of the VF.
Along with getting the default vNIC ID by supplying the FW FID of
the VF-rep endpoint to HWRM_FUNC_QCFG, obtain and store it's
function svif.
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Somnath Kotur [Thu, 2 Jul 2020 23:27:49 +0000 (16:27 -0700)]
net/bnxt: support port representor data path
Added code to support Tx/Rx from a VF representor port.
The VF-reps use the RX/TX rings of the Trusted VF/PF.
For each VF-rep, the Trusted VF/PF driver issues a VFR_ALLOC FW cmd that
returns "cfa_code" and "cfa_action" values.
The FW sets up the filter tables in such a way that VF traffic by
default (in absence of other rules) gets punted to the parent function
i.e. either the Trusted VF or the PF.
The cfa_code value in the RX-compl informs the driver of the source VF.
For traffic being transmitted from the VF-rep, the TX BD is tagged with
a cfa_action value that informs the HW to punt it to the corresponding
VF.
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Somnath Kotur [Thu, 2 Jul 2020 23:27:48 +0000 (16:27 -0700)]
net/bnxt: add port representor infrastructure
Defines data structures and code to init/uninit
VF representors during pci_probe and pci_remove
respectively.
Most of the dev_ops for the VF representor are just
stubs for now and will be will be filled out in next patch.
To create a representor using testpmd:
testpmd -c 0xff -wB:D.F,representor=1 -- -i
testpmd -c 0xff -w05:02.0,representor=[1] -- -i
To create a representor using ovs-dpdk:
1. First add the trusted VF port to a bridge
ovs-vsctl add-port ovsbr0 vf_rep1 -- set Interface vf_rep1 type=dpdk
options:dpdk-devargs=0000:06:02.0
2. Add the representor port to the bridge
ovs-vsctl add-port ovsbr0 vf_rep1 -- set Interface vf_rep1 type=dpdk
options:dpdk-devargs=0000:06:02.0,representor=1
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Long Li [Thu, 25 Jun 2020 23:52:16 +0000 (16:52 -0700)]
maintainers: update for vmbus
Add Long Li as additional maintainer.
Signed-off-by: Long Li <longli@microsoft.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Long Li [Thu, 25 Jun 2020 20:29:46 +0000 (13:29 -0700)]
maintainers: update for netvsc
Add Long Li as additional maintainer.
Signed-off-by: Long Li <longli@microsoft.com>
Acked-by: Haiyang Zhang <haiyangz@microsoft.com>
Jakub Neruda [Wed, 10 Jun 2020 09:12:42 +0000 (11:12 +0200)]
maintainers: update for Netcope sze/nfb
Setting Martin Spinler as new and only maintainer for Netcope
libsze2/nfb drivers
Signed-off-by: Jakub Neruda <neruda@netcope.com>
Acked-by: Martin Spinler <spinler@cesnet.cz>
Shy Shyman [Sun, 28 Jun 2020 09:36:31 +0000 (12:36 +0300)]
net/mlx5: fix flow META item validation
When flow is inserted with meta match item it requires a certain
register support.
As part of the flow validation of such flows, the validation
function is missing a check that the mlx5 driver is not in
legacy mode in terms of extended meta data support
(MLX5_XMETA_MODE_LEGACY flag).
If the driver is in legacy mode it will cause downstream
function that allocates needed register for meta data.
The fix checks explicitly the conditions for support of
meta data in FDB mode. If the conditions are not met
an error message will be issued.
Fixes:
9bf26e1318e3 ("ethdev: move egress metadata to dynamic field")
Cc: stable@dpdk.org
Signed-off-by: Shy Shyman <shys@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Wei Zhao [Fri, 3 Jul 2020 06:19:38 +0000 (14:19 +0800)]
net/ice: fix typo on variable name
fix typo of "valid".
Fixes:
8f5d8e74fb38 ("net/ice: support flow for AH ESP and L2TP")
Fixes:
66ff8851792f ("net/ice: support ESP/AH/L2TP")
Fixes:
45b53ed3701d ("net/ice: support IPv6 NAT-T")
Cc: stable@dpdk.org
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Wei Zhao [Fri, 3 Jul 2020 06:19:37 +0000 (14:19 +0800)]
net/ice: add input set byte number check
This patch add the total input set byte number check,
as there is a hardware requirement for the total number
of 32 byte.
Fixes:
47d460d63233 ("net/ice: rework switch filter")
Cc: stable@dpdk.org
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Wei Zhao [Fri, 3 Jul 2020 06:19:36 +0000 (14:19 +0800)]
net/ice: support switch flow for specific L4 type
This patch add more specific tunnel type for ipv4/ipv6 packet,
it enable tcp/udp layer of ipv4/ipv6 as L4 payload but without
L4 dst/src port number as input set for the switch filter rule.
Fixes:
47d460d63233 ("net/ice: rework switch filter")
Cc: stable@dpdk.org
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Wei Zhao [Fri, 3 Jul 2020 06:19:35 +0000 (14:19 +0800)]
net/ice: fix tunnel type for switch rule
This patch add check for protocol type of IPv4 packet,
it need to update tunnel type when NVGRE is in payload.
Fixes:
6bc7628c5e0b ("net/ice: change default tunnel type")
Cc: stable@dpdk.org
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Wei Zhao [Fri, 3 Jul 2020 06:19:34 +0000 (14:19 +0800)]
net/ice: support more PPPoE packet type for switch
This patch add more support for switch parser of PPPoE packet,
it enable parse tcp/udp L4 layer and ipv4/ipv6 L3 layer parser for
PPPoE payload, so we can use L4 dst/src port and L3 ip address as
input set for switch filter PPPoE related rule.
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Ting Xu [Fri, 3 Jul 2020 08:57:10 +0000 (16:57 +0800)]
net/ice: fix build with 16-byte Rx descriptor in DCF
Fix the build error in DCF when CONFIG_RTE_LIBRTE_ICE_16BYTE_RX_DESC
compilation option is enabled. Legacy 16 byte Rx descriptor is not
supported in DCF. If it is enabled, DCF configuration stops.
Fixes:
929eceefaba7 ("net/ice: add queue start and stop for DCF")
Signed-off-by: Ting Xu <ting.xu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Ferruh Yigit [Fri, 19 Jun 2020 09:29:34 +0000 (10:29 +0100)]
devtools: add acronyms in dictionary for commit checks
Verbs ->
DevX ->
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Xiaoyun Wang [Sat, 27 Jun 2020 03:55:48 +0000 (11:55 +0800)]
net/hinic/base: modify returned error values
Modify return errors with Linux system errors when
system requests fail.
Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
Xiaoyun Wang [Sat, 27 Jun 2020 03:55:47 +0000 (11:55 +0800)]
net/hinic: add TCAM filter switch for flow director
When the filter rule needs to use the TCAM method, driver
enables the TCAM filter switch, otherwise disables it, which
can improve the performance of microcode in FDIR scenarios that
does not use TCAM method.
Fixes:
1fe89aa37f36 ("net/hinic: add flow director filter")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
Xiaoyun Wang [Sat, 27 Jun 2020 03:55:46 +0000 (11:55 +0800)]
net/hinic: fix setting promiscuous mode
When setting promiscuous or allmulticast mode, increase
multi-thread resource protection, because the patch
"net/bonding: prefer allmulti to promiscuous for LACP"
adds trying to use allmulti when adding a slave, and
EVS bond driver also sets promisc with another thread,
which may lead to thread reentry and cause failure to
set promiscuous mode.
Fixes:
cb7b6606ebff ("net/hinic: add RSS stats and promiscuous ops")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
Xiaoyun Wang [Sat, 27 Jun 2020 03:55:45 +0000 (11:55 +0800)]
net/hinic/base: remove unused function parameters
Remove unused parameters for mgmt channel with no ack.
Fixes:
a4957d87e05a ("net/hinic/base: add mgmt module")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
Xiaoyun Wang [Sat, 27 Jun 2020 03:55:44 +0000 (11:55 +0800)]
net/hinic/base: check output of management sync channel
Add output buffer and out size info for some cmds that use management
sync channel, which can improve dfx capability when sent msg failed.
Fixes:
7fcd6b05b923 ("net/hinic/base: support cmdq mechanism")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
Pavan Nikhilesh [Sun, 28 Jun 2020 22:18:32 +0000 (03:48 +0530)]
net/octeontx2: add devargs to lock Rx/Tx contexts
Add device arguments to lock Rx/Tx contexts.
Application can either choose to lock Rx or Tx contexts by using
'lock_rx_ctx' or 'lock_tx_ctx' respectively per each port.
Example:
-w 0002:02:00.0,lock_rx_ctx=1 -w 0002:03:00.0,lock_tx_ctx=1
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reviewed-by: Andrzej Ostruszka <aostruszka@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Wei Hu (Xavier) [Wed, 1 Jul 2020 11:54:42 +0000 (19:54 +0800)]
net/hns3: add missing features to feature list
This patch adds 'Scattered Rx' and 'Multiprocess aware' those are
supported by current hns3 PMD driver for feature list file named
hns3.ini and hns3_vf.ini.
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Wei Hu (Xavier) [Wed, 1 Jul 2020 11:54:41 +0000 (19:54 +0800)]
net/hns3: fix reassembling multiple segment packets in Tx
Because of the hardware constraints, hns3 network engine doesn't support
sending packets with more than eight fragments. And hns3 pmd driver
tries to reassemble these kind of packets to meet hardware requirements.
Currently, there are two problems:
1) when the input buffer_len * 8 < pkt_len, the packets are impossible
to be reassembled into 8 Buffer Descriptors. In this case, the
packets will be passed to hardware, which eventually causes a
hardware reset.
2) The meta data in origin packets which are required to fill into the
descriptor haven't been copied into the reassembled pkts.
This patch adds a check for 1) to ensure such packets will be dropped by
driver and copies useful meta data from the origin packets to the
reassembled packets.
Fixes:
bba636698316 ("net/hns3: support Rx/Tx and related operations")
Cc: stable@dpdk.org
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Wei Hu (Xavier) [Wed, 1 Jul 2020 11:54:40 +0000 (19:54 +0800)]
net/hns3: fix Rx buffer size
Currently, rx_buf_size of hns3 PMD driver is fixed on, and it's value
depends on the firmware which will decrease the flexibility of PMD.
The receive side mbufs was allocated from the mempool given by upper
application calling rte_eth_rx_queue_setup API function. So the memory
chunk used for net device DMA is depend on the data room size of the
objects in this mempool. Hns3 PMD driver should set the rx_buf_len
smaller than the data room size of mempool and our hardware only support
the following four specifications: 512, 1024, 2148 and 4096.
Fixes:
bba636698316 ("net/hns3: support Rx/Tx and related operations")
Cc: stable@dpdk.org
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Lijun Ou [Wed, 1 Jul 2020 11:54:39 +0000 (19:54 +0800)]
net/hns3: report Tx descriptor segment limitations
According to the user manual of Kunpeng920 SoC, the max allowed number
of segments per whole packet is 63 and the max number of segments per
packet is 8 in datapath.
This patch reports the Two segment parameters of Tx descriptor
limitations to DPDK framework.
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Hongbo Zheng [Wed, 1 Jul 2020 11:54:38 +0000 (19:54 +0800)]
net/hns3: clear residual hardware configurations on init
When the last driver exits abnormally, for example, it is killed by
'kill -9', it may be too late to clear the configuration and cause the
configuration to remain. Therefore, to ensure that the hardware
environment is clean during initialization, the PF driver actively clear
the hardware environment during initialization, including PF and
corresponding VFs' vlan, mac, flow table configurations, etc.
Fixes:
d51867db65c1 ("net/hns3: add initialization")
Cc: stable@dpdk.org
Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Wei Hu (Xavier) [Wed, 1 Jul 2020 11:54:37 +0000 (19:54 +0800)]
net/hns3: get device capability in primary process
This patch optimizes the code to get device capability in primary
process, and moves the code of getting PCI revision id in order to avoid
evaluating the private hw->revision of shared PMD-specific private data
in slave process.
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Chengchang Tang [Wed, 1 Jul 2020 11:54:36 +0000 (19:54 +0800)]
net/hns3: support setting VF PVID by PF driver
This patch adds support setting VF PVID by hns3 PF kernel ethdev driver
on the host by "ip link set <eth num> vf <vf id> vlan <vlan tag>"
command.
Because of the hardware constraints, the striped VLAN tag will always in
Rx descriptors which should has been dropped when PVID is enabled and
the PVID will overwrite the outer VLAN tag in Tx descriptor. So, hns3
PMD driver need to change the processing of VLAN tags in the process of
Tx and Rx according to whether PVID is enabled.
1) If the hns3 PF kernel ethdev driver sets the PVID for VF device
before the initialization of the related VF device, hns3 VF PMD
driver should get the PVID state from PF driver through mailbox and
update the related state in txq and rxq maintained by hns3 VF driver
to change the process of Tx and Rx.
2) If the hns3 PF kernel ethdev driver sets the PVID for VF device after
initialization of the related VF device, the PF driver will notify VF
driver to update the PVID state. The VF driver will update the PVID
configuration state immediately to ensure that the VLAN process in Tx
and Rx is correct. But in the window period of this state transition,
packets loss or packets with wrong VLAN may occur.
3) Due to hardware limitations, we only support two-layer VLAN hardware
offload in Tx direction based on hns3 network engine, so when PVID is
enabled, QinQ insert is no longer supported. And when PVID is
enabled, in the following two cases:
i) packets with more than two VLAN tags.
ii) packets with one VLAN tag while the hardware VLAN insert is
enabled.
The packets will be regarded as abnormal packets and discarded by
hardware in Tx direction. For debugging purposes, a validation check
for these types of packets is added to the '.tx_pkt_prepare' ops
implementation function named hns3_prep_pkts to inform users that
these packets will be discarded.
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Chengchang Tang [Wed, 1 Jul 2020 11:54:35 +0000 (19:54 +0800)]
net/hns3: decrease non-nearby memory access in Rx
Currently, hns3 PMD driver needs know the PVID configuration state and
do different processing in the 'rx_pkt_burst' ops implementation
function.
This patch adds a member to struct hns3_rx_queue/hns3_tx_queue of the
driver to indicate the PVID configuration status, so it isn't need
to access other data structure in the 'rx_pkt_burst' ops implementation,
to avoid performance loss because of reducing cache miss.
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Wei Hu (Xavier) [Wed, 1 Jul 2020 11:54:34 +0000 (19:54 +0800)]
net/hns3: support LRO
This patch adds support of LRO offload for hns3 PMD driver.
Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Lijun Ou [Wed, 1 Jul 2020 11:54:33 +0000 (19:54 +0800)]
net/hns3: support symmetric RSS
This patch adds support of symmetric algorithm of RSS.
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Qi Zhang [Wed, 1 Jul 2020 05:49:51 +0000 (13:49 +0800)]
net/ice/base: update version
Update base code version in readme.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
Qi Zhang [Wed, 1 Jul 2020 05:49:50 +0000 (13:49 +0800)]
net/ice/base: clear and free XLT entries on reset
This fix has been added to address memory leak issues resulting from
triggering a sudden driver reset which does not allow us to follow our
normal removal flows for SW XLT entries for advanced features.
- Adding call to destroy flow profile locks when clearing SW XLT tables.
- Extraction sequence entries were not correctly cleared previously
which could cause ownership conflicts for repeated reset-replay calls.
Fixes:
969890d505b1 ("net/ice/base: enable clearing of HW tables")
Cc: stable@dpdk.org
Signed-off-by: Vignesh Sridhar <vignesh.sridhar@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
Qi Zhang [Wed, 1 Jul 2020 05:49:49 +0000 (13:49 +0800)]
net/ice/base: split capability parse into separate functions
The ice_parse_caps function is used to convert the capability block data
coming from firmware into a structured format used by other parts of the
code.
The current implementation directly updates the hw->func_caps and
hw->dev_caps structures. It is directly called from within
ice_aq_discover_caps. This causes the discover_caps function to have the
side effect of modifying the hw capability structures, which is not
intuitive.
Split this function into ice_parse_dev_caps and ice_parse_func_caps.
These functions will take a pointer to the dev_caps and func_caps
respectively. Also create an ice_parse_common_caps for sharing the
capability logic that is common to device and function.
Doing so enables a future refactor to allow reading and parsing
capabilities into a local caps structure instead of modifying the
members of the hw structure directly.
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
Qi Zhang [Wed, 1 Jul 2020 05:49:48 +0000 (13:49 +0800)]
net/ice/base: add capability list AQ function
The current implementation for reading device and function capabilities
from firmware, ice_aq_discover_caps, has potentially undesirable
side effects.
ice_aq_discover_caps calls ice_parse_caps, resulting in overwriting the
capabilities stored in the hw structure. This is ok during
initialization, but means that code which wants to read the capabilities
after initialization cannot use ice_aq_discover_caps without being
careful of the side effects.
Factor out the AQ command logic into a new ice_aq_list_caps function.
This will be used by the ice_aq_discover_caps function.
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
Qi Zhang [Wed, 1 Jul 2020 05:49:47 +0000 (13:49 +0800)]
net/ice/base: clean code in flow director module
Remove unused macro and function.
Declare no external referenced function as static.
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
Qi Zhang [Wed, 1 Jul 2020 05:49:46 +0000 (13:49 +0800)]
net/ice/base: move LLDP function to common module
To implement a FW workaround for LFC, a set_local_mib must be
performed after every link up event. For systems that do not
have DCB configured, we need to move the function
ice_aq_set_lldp_mib() from the DCB specific ice_dcb.c to
ice_common.c so that the driver always has access to this AQ
command.
Signed-off-by: Dave Ertman <david.m.ertman@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
Qi Zhang [Wed, 1 Jul 2020 05:49:45 +0000 (13:49 +0800)]
net/ice/base: cleanup some code style
Cleanup code style issue reported by kernel checkpatch.
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
Qi Zhang [Wed, 1 Jul 2020 05:49:44 +0000 (13:49 +0800)]
net/ice/base: fix GTP-U inner RSS IPv4 IPv6 co-exist
An IP header combined with GTP-U header should be regarded as
inner layer for RSS, otherwise it mess the field vector between
an IPv4 rule and IPv6 rule e.g:
testpmd> flow create 0 ingress pattern eth / ipv4 / udp / gtpu / \
gtpu_psc / ipv4 / udp / end actions rss types ipv4-udp end key_len \
0 queues end / end
testpmd> flow create 0 ingress pattern eth / ipv4 / udp / gtpu / \
gtpu_psc / ipv6 / udp / end actions rss types ipv6-udp end key_len \
0 queues end / end
Fixes:
b7d34ccc47b5 ("net/ice/base: packet encapsulation for RSS")
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
Wei Zhao [Wed, 17 Jun 2020 06:14:27 +0000 (14:14 +0800)]
net/ice: redirect switch rule with to VSI list action
Support redirect a switch rule if its action is to VSI list.
Fixes:
397b4b3c5095 ("net/ice: enable flow redirect on switch")
Cc: stable@dpdk.org
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Dekel Peled [Sun, 28 Jun 2020 14:06:55 +0000 (17:06 +0300)]
net/mlx5: add OS specific flow actions operations
This patch introduces the OS specific functions, for flow actions
create and destroy operations.
In existing implementation, the functions to create flow actions
return a pointer to the created action object.
The new OS specific functions to create flow actions return 0 on
success, and (-1) on failure.
On success, a pointer to the created action object is returned
using an additional parameter.
On failure errno is set.
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Dekel Peled [Sun, 28 Jun 2020 14:06:54 +0000 (17:06 +0300)]
net/mlx5: add OS specific flow create and destroy
This patch introduces the OS specific functions, for flow create
and flow destroy operations.
In existing implementation, the functions to create objects
(flow/table/matcher) return a pointer to the created object.
The functions to destroy objects return 0 on success and errno on
failure.
The new OS specific functions to create objects return 0 on success,
and (-1) on failure.
On success, a pointer to the created object is returned using an
additional parameter.
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Dekel Peled [Sun, 28 Jun 2020 14:06:53 +0000 (17:06 +0300)]
net/mlx5: add OS specific flow type selection
In current implementation the flow type (DV/Verbs) is selected
using dedicated function flow_get_drv_type().
This patch adds OS specific function mlx5_flow_os_get_type(), to
allow OS specific flow type selection.
The new function is called by flow_get_drv_type(), and if it returns a
valid value (DV/Verbs) no more logic is required.
Otherwise the existing logic is executed.
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Dekel Peled [Sun, 28 Jun 2020 14:06:52 +0000 (17:06 +0300)]
net/mlx5: add OS specific flow related utilities
This patch introduces the first OS specific utility functions,
for use by flow engine in different OS implementation.
The first utility functions are:
bool mlx5_flow_os_item_supported(item)
bool mlx5_flow_os_action_supported(action)
They are implemented to check OS specific support for different
item types and action types.
New header file is added:
drivers/net/mlx5/linux/mlx5_flow_os.h
This file contains the utility functions mentioned above for Linux OS.
At this stage they are implemented as static inline, for efficiency,
and always return true.
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>