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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
- 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>
- 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>
- 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>
- 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>
- 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>
- 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>
- 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>
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>
- 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>
- 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>
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>
- 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>
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>
- 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>
- 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>
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>
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>
- 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>
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>
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>
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>
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>
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>
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>
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>
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>