net/bnxt: refactor ULP mapper
authorKishore Padmanabha <kishore.padmanabha@broadcom.com>
Sun, 30 May 2021 08:59:15 +0000 (14:29 +0530)
committerAjit Khaparde <ajit.khaparde@broadcom.com>
Thu, 8 Jul 2021 00:02:06 +0000 (02:02 +0200)
commitddaf0afae48ad19582843f2a982609191d591751
tree3be700b9a452c028a72a85e0307949e93aaa7d4f
parent249feed2e40a0a69421acbd3a497fd38af1ebbb6
net/bnxt: refactor ULP mapper

1. The internal and external exact match table resource types
is combined since the resource handle contains the encoded
type whether it is internal or external exact match entry.

2. When a flow doesn't hit the offloaded rules, the default action is
to send it to the kernel (L2 driver interface). In order to do that,
TRUFLOW must know the kernel interface's (PF's) default vnic id.
This patch fetches the PF's default vnic id from the dpdk core and
stores it in port database. It also stores the mac addr for the
future usage. Renamed compute field for layer 4 port enums.
Added support for port database opcode that can get port details
like mac address which can then be populated in the l2 context entry.

3. Both active and default bit set need to considered to check if a
specific flow type is enabled or not.

4. ulp mapper fetches the dpdk port id from the compute field index
BNXT_ULP_CF_IDX_DEV_PORT_ID which is used to get the interface’s
mac address eventually. However, the compute field array is not
populated with dpdk port id at the index BNXT_ULP_CF_IDX_DEV_PORT_ID.
The problem fixed by populating the compute field array correctly.

5. Some dpdk applications may accumulate the flow counters while some
may not. In cases where the application is accumulating the counters
the PMD need not do the accumulation itself and viceversa to report
the correct flow counters.

6. Pointer to bp is added to open session parms to support
shared session.

Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Jay Ding <jay.ding@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
19 files changed:
drivers/net/bnxt/bnxt.h
drivers/net/bnxt/bnxt_ethdev.c
drivers/net/bnxt/tf_ulp/bnxt_ulp.c
drivers/net/bnxt/tf_ulp/bnxt_ulp.h
drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c
drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c
drivers/net/bnxt/tf_ulp/ulp_flow_db.c
drivers/net/bnxt/tf_ulp/ulp_flow_db.h
drivers/net/bnxt/tf_ulp/ulp_mapper.c
drivers/net/bnxt/tf_ulp/ulp_port_db.c
drivers/net/bnxt/tf_ulp/ulp_port_db.h
drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
drivers/net/bnxt/tf_ulp/ulp_rte_parser.h
drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h
drivers/net/bnxt/tf_ulp/ulp_template_db_stingray_class.c
drivers/net/bnxt/tf_ulp/ulp_template_db_wh_plus_class.c
drivers/net/bnxt/tf_ulp/ulp_template_struct.h
drivers/net/bnxt/tf_ulp/ulp_tun.c
drivers/net/bnxt/tf_ulp/ulp_tun.h