net/bnxt: support multi root capability
Update driver to read the multi root capability and ignore PCI address check while creating ulp session when multi root capability is enabled in the hardware. DPDK HSI version updated from 1.10.2.44 to 1.10.2.68. Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com> Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com> Reviewed-by: Mike Baucom <michael.baucom@broadcom.com> Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com> Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
This commit is contained in:
parent
c674c133f1
commit
34a7ff5a92
@ -152,7 +152,7 @@ New Features
|
||||
|
||||
* Added flow offload support for Thor.
|
||||
* Implement support for tunnel offload.
|
||||
* Updated HWRM API to version 1.10.2.44
|
||||
* Updated HWRM API to version 1.10.2.68.
|
||||
* Added NAT support for dest IP and port combination.
|
||||
|
||||
* **Updated Cisco enic driver.**
|
||||
|
@ -723,6 +723,9 @@ struct bnxt {
|
||||
uint16_t chip_num;
|
||||
#define CHIP_NUM_58818 0xd818
|
||||
#define BNXT_CHIP_SR2(bp) ((bp)->chip_num == CHIP_NUM_58818)
|
||||
#define BNXT_FLAGS2_MULTIROOT_EN BIT(4)
|
||||
#define BNXT_MULTIROOT_EN(bp) \
|
||||
((bp)->flags2 & BNXT_FLAGS2_MULTIROOT_EN)
|
||||
|
||||
uint32_t fw_cap;
|
||||
#define BNXT_FW_CAP_HOT_RESET BIT(0)
|
||||
|
@ -3363,6 +3363,7 @@ int bnxt_hwrm_parent_pf_qcfg(struct bnxt *bp)
|
||||
{
|
||||
struct hwrm_func_qcfg_input req = {0};
|
||||
struct hwrm_func_qcfg_output *resp = bp->hwrm_cmd_resp_addr;
|
||||
uint16_t flags;
|
||||
int rc;
|
||||
|
||||
if (!BNXT_VF_IS_TRUSTED(bp))
|
||||
@ -3386,6 +3387,13 @@ int bnxt_hwrm_parent_pf_qcfg(struct bnxt *bp)
|
||||
bp->parent->fid = rte_le_to_cpu_16(resp->fid);
|
||||
bp->parent->port_id = rte_le_to_cpu_16(resp->port_id);
|
||||
|
||||
flags = rte_le_to_cpu_16(resp->flags);
|
||||
/* check for the multi-root support */
|
||||
if (flags & HWRM_FUNC_QCFG_OUTPUT_FLAGS_MULTI_ROOT) {
|
||||
bp->flags2 |= BNXT_FLAGS2_MULTIROOT_EN;
|
||||
PMD_DRV_LOG(DEBUG, "PF enabled with multi root capability\n");
|
||||
}
|
||||
|
||||
HWRM_UNLOCK();
|
||||
|
||||
return 0;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1010,13 +1010,15 @@ ulp_context_initialized(struct bnxt_ulp_session_state *session, bool *init)
|
||||
* pointer, otherwise allocate a new session.
|
||||
*/
|
||||
static struct bnxt_ulp_session_state *
|
||||
ulp_get_session(struct rte_pci_addr *pci_addr)
|
||||
ulp_get_session(struct bnxt *bp, struct rte_pci_addr *pci_addr)
|
||||
{
|
||||
struct bnxt_ulp_session_state *session;
|
||||
|
||||
/* if multi root capability is enabled, then ignore the pci bus id */
|
||||
STAILQ_FOREACH(session, &bnxt_ulp_session_list, next) {
|
||||
if (session->pci_info.domain == pci_addr->domain &&
|
||||
session->pci_info.bus == pci_addr->bus) {
|
||||
(BNXT_MULTIROOT_EN(bp) ||
|
||||
session->pci_info.bus == pci_addr->bus)) {
|
||||
return session;
|
||||
}
|
||||
}
|
||||
@ -1044,7 +1046,7 @@ ulp_session_init(struct bnxt *bp,
|
||||
|
||||
pthread_mutex_lock(&bnxt_ulp_global_mutex);
|
||||
|
||||
session = ulp_get_session(pci_addr);
|
||||
session = ulp_get_session(bp, pci_addr);
|
||||
if (!session) {
|
||||
/* Not Found the session Allocate a new one */
|
||||
session = rte_zmalloc("bnxt_ulp_session",
|
||||
@ -1547,7 +1549,7 @@ bnxt_ulp_port_deinit(struct bnxt *bp)
|
||||
pci_dev = RTE_DEV_TO_PCI(bp->eth_dev->device);
|
||||
pci_addr = &pci_dev->addr;
|
||||
pthread_mutex_lock(&bnxt_ulp_global_mutex);
|
||||
session = ulp_get_session(pci_addr);
|
||||
session = ulp_get_session(bp, pci_addr);
|
||||
pthread_mutex_unlock(&bnxt_ulp_global_mutex);
|
||||
|
||||
/* session not found then just exit */
|
||||
|
Loading…
x
Reference in New Issue
Block a user