patchset for bnxt PMD
cover patchset for bnxt PMD
Apart from fixing an issue with Rx queue state at startup, this patchset enhances support for RSS action and optimizes the mbuf requirement at startup by creating the aggregation rings only when needed (rx_scatter is enabled).
Please apply!
Ajit Khaparde (3):
net/bnxt: create aggregration rings when needed net/bnxt: fix Rx queue state on start
net/bnxt: enhance support for RSS action
drivers/net/bnxt/bnxt_ethdev.c | 16 +-- drivers/net/bnxt/bnxt_filter.h | 1 + drivers/net/bnxt/bnxt_flow.c | 190 ++++++++++++++++++++++++++++++++- drivers/net/bnxt/bnxt_hwrm.c | 9 ++ drivers/net/bnxt/bnxt_ring.c | 148 +++++++++++++++---------- drivers/net/bnxt/bnxt_rxq.c | 71 +++++++----- drivers/net/bnxt/bnxt_rxq.h | 2 + drivers/net/bnxt/bnxt_rxr.c | 111 +++++++++++-------- 8 files changed, 416 insertions(+), 132 deletions(-)
Signature · 1 line
2.30.1 (Apple Git-130)
PATCH 1/3 net/bnxt: create aggregration rings when needed
Aggregration rings are needed when PMD needs to support jumbo frames, LRO. Currently we are creating the aggregration rings whether jumbo frames or LRO has been enabled or disabled. This causes unnecessary allocation of mbufs needing larger mbuf pool which is not used at all.
This patch modifies the code to create aggregration rings only when needed.
--- drivers/net/bnxt/bnxt_hwrm.c | 9 +++ drivers/net/bnxt/bnxt_ring.c | 148 ++++++++++++++++++++++------------- drivers/net/bnxt/bnxt_rxq.c | 71 +++++++++++------ drivers/net/bnxt/bnxt_rxq.h | 2 + drivers/net/bnxt/bnxt_rxr.c | 111 +++++++++++++++----------- 5 files changed, 216 insertions(+), 125 deletions(-)
drivers/net/bnxt/bnxt_hwrm.c +9 -0
@@ -2741,6 +2741,14 @@ void bnxt_free_hwrm_rx_ring(struct bnxt *bp, int queue_index)if (BNXT_HAS_RING_GRPS (bp)) bp->grp_info[queue_index].rx_fw_ring_id =INVALID_HW_RING_ID ; +/* Check agg ring struct explicitly. +* bnxt_need_agg_ring() returns the current state of offload flags, +* but we may have to deal with agg ring struct before the offload +* flags are updated. +*/ +if (!bnxt_need_agg_ring (bp->eth_dev) || rxr->ag_ring_struct ==NULL ) + goto no_agg; + ring = rxr->ag_ring_struct; bnxt_hwrm_ring_free(bp, ring, BNXT_CHIP_P5(bp) ?
@@ -2750,6 +2758,7 @@ void bnxt_free_hwrm_rx_ring(struct bnxt *bp, int queue_index)if (BNXT_HAS_RING_GRPS (bp)) bp->grp_info[queue_index].ag_fw_ring_id =INVALID_HW_RING_ID ; +no_agg:bnxt_hwrm_stat_ctx_free (bp, cpr);bnxt_free_cp_ring (bp, cpr);
drivers/net/bnxt/bnxt_ring.c +92 -56
223 lines not on this page · raw message
drivers/net/bnxt/bnxt_rxq.c +47 -24
97 lines not on this page · raw message
drivers/net/bnxt/bnxt_rxq.h +2 -0
@@ -63,4 +63,6 @@ int bnxt_rx_queue_start(struct rte_eth_dev *dev,int bnxt_rx_queue_stop (struct rte_eth_dev *dev,uint16_t rx_queue_id);void bnxt_rx_queue_release_mbufs (struct bnxt_rx_queue *rxq); +int bnxt_need_agg_ring (struct rte_eth_dev *eth_dev); +void bnxt_free_rxq_mem (struct bnxt_rx_queue *rxq);#endif
drivers/net/bnxt/bnxt_rxr.c +66 -45
129 lines not on this page · raw message
Signature · 1 line
2.30.1 (Apple Git-130)
PATCH 2/3 net/bnxt: fix Rx queue state on start
In reply to Ajit KhapardeFix Rx queue state on device start.
The state of Rx queues could be incorrect in some cases because instead of updating the state for all the Rx queues, we are updating it for queues in a VNIC.
--- drivers/net/bnxt/bnxt_ethdev.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-)
drivers/net/bnxt/bnxt_ethdev.c +10 -6
@@ -482,12 +482,6 @@ static int bnxt_setup_one_vnic(struct bnxt *bp, uint16_t vnic_id) rxq->vnic->fw_grp_ids[j] =INVALID_HW_RING_ID ; else vnic->rx_queue_cnt++; - -if (!rxq->rx_deferred_start) { - bp->eth_dev->data->rx_queue_state[j] = -RTE_ETH_QUEUE_STATE_STARTED ; - rxq->rx_started = true; - } }PMD_DRV_LOG (DEBUG ,"vnic->rx_queue_cnt = %d\n" , vnic->rx_queue_cnt);
@@ -824,6 +818,16 @@ static int bnxt_start_nic(struct bnxt *bp) } } +for (j =0 ; j < bp->rx_nr_rings; j++) { +struct bnxt_rx_queue *rxq = bp->rx_queues[j]; + +if (!rxq->rx_deferred_start) { + bp->eth_dev->data->rx_queue_state[j] = +RTE_ETH_QUEUE_STATE_STARTED ; + rxq->rx_started = true; + } + } + rc =bnxt_hwrm_cfa_l2_set_rx_mask (bp, &bp->vnic_info[0 ],0 ,NULL );if (rc) { PMD_DRV_LOG(ERR,
Signature · 1 line
2.30.1 (Apple Git-130)
PATCH 3/3 net/bnxt: enhance support for RSS action
In reply to Ajit KhapardeEnhance support for RSS action in the non-TruFlow path. This will allow the user or application to update the RSS settings using RTE_FLOW API.
--- drivers/net/bnxt/bnxt_filter.h | 1 + drivers/net/bnxt/bnxt_flow.c | 190 ++++++++++++++++++++++++++++++++- 2 files changed, 190 insertions(+), 1 deletion(-)
drivers/net/bnxt/bnxt_filter.h +1 -0
@@ -43,6 +43,7 @@ struct bnxt_filter_info {#define HWRM_CFA_EM_FILTER 1#define HWRM_CFA_NTUPLE_FILTER 2#define HWRM_CFA_TUNNEL_REDIRECT_FILTER 3 +#define HWRM_CFA_CONFIG_VNIC 4uint8_t filter_type;uint32_t dst_id;
drivers/net/bnxt/bnxt_flow.c +189 -1
212 lines not on this page · raw message
Signature · 1 line
2.30.1 (Apple Git-130)
Quoted 7 lines · Ajit Khaparde
Apart from fixing an issue with Rx queue state at startup, this patchset enhances support for RSS action and optimizes the mbuf requirement at startup by creating the aggregation rings only when needed (
rx_scatteris enabled).Please apply!
Patchset applied to dpdk-next-net-brcm.
Quoted 20 lines
Ajit Khaparde (3):
net/bnxt: create aggregration rings when needed net/bnxt: fix Rx queue state on start
net/bnxt: enhance support for RSS actiondrivers/net/bnxt/bnxt_ethdev.c | 16 +-- drivers/net/bnxt/bnxt_filter.h | 1 + drivers/net/bnxt/bnxt_flow.c | 190 ++++++++++++++++++++++++++++++++- drivers/net/bnxt/bnxt_hwrm.c | 9 ++ drivers/net/bnxt/bnxt_ring.c | 148 +++++++++++++++---------- drivers/net/bnxt/bnxt_rxq.c | 71 +++++++----- drivers/net/bnxt/bnxt_rxq.h | 2 + drivers/net/bnxt/bnxt_rxr.c | 111 +++++++++++-------- 8 files changed, 416 insertions(+), 132 deletions(-)--
2.30.1 (Apple Git-130)
Quoted 13 lines · Ajit Khaparde
Quoted 7 lines · Ajit Khaparde
Apart from fixing an issue with Rx queue state at startup, this patchset enhances support for RSS action and optimizes the mbuf requirement at startup by creating the aggregation rings only when needed (
rx_scatteris enabled).Please apply!
Patchset applied to dpdk-next-net-brcm.
Hi Ajit,
dpdk-next-net-brcm conflicts with next-net because of some patches updating bnxt in next-net.
Can you please rebase 'dpdk-next-net-brcm' on top of latest next-net?
Thanks,
ferruh
Quoted 21 lines
Quoted 21 lines
Ajit Khaparde (3):
net/bnxt: create aggregration rings when needed net/bnxt: fix Rx queue state on start net/bnxt: enhance support for RSS actiondrivers/net/bnxt/bnxt_ethdev.c | 16 +-- drivers/net/bnxt/bnxt_filter.h | 1 + drivers/net/bnxt/bnxt_flow.c | 190 ++++++++++++++++++++++++++++++++- drivers/net/bnxt/bnxt_hwrm.c | 9 ++ drivers/net/bnxt/bnxt_ring.c | 148 +++++++++++++++---------- drivers/net/bnxt/bnxt_rxq.c | 71 +++++++----- drivers/net/bnxt/bnxt_rxq.h | 2 + drivers/net/bnxt/bnxt_rxr.c | 111 +++++++++++-------- 8 files changed, 416 insertions(+), 132 deletions(-)--
2.30.1 (Apple Git-130)
Quoted 16 lines · Ferruh Yigit
Quoted 13 lines · Ajit Khaparde
Quoted 7 lines · Ajit Khaparde
Apart from fixing an issue with Rx queue state at startup, this patchset enhances support for RSS action and optimizes the mbuf requirement at startup by creating the aggregation rings only when needed (
rx_scatteris enabled).Please apply!
Patchset applied to dpdk-next-net-brcm.
Quoted 5 lines
Hi Ajit,
dpdk-next-net-brcm conflicts with next-net because of some patches updating bnxt in next-net.
Can you please rebase 'dpdk-next-net-brcm' on top of latest next-net?
Sure. I will send an email once it's ready.
Thanks
Ajit
Quoted 26 lines
Thanks,
ferruhQuoted 21 lines
Quoted 21 lines
Ajit Khaparde (3):
net/bnxt: create aggregration rings when needed net/bnxt: fix Rx queue state on start net/bnxt: enhance support for RSS actiondrivers/net/bnxt/bnxt_ethdev.c | 16 +-- drivers/net/bnxt/bnxt_filter.h | 1 + drivers/net/bnxt/bnxt_flow.c | 190 ++++++++++++++++++++++++++++++++- drivers/net/bnxt/bnxt_hwrm.c | 9 ++ drivers/net/bnxt/bnxt_ring.c | 148 +++++++++++++++---------- drivers/net/bnxt/bnxt_rxq.c | 71 +++++++----- drivers/net/bnxt/bnxt_rxq.h | 2 + drivers/net/bnxt/bnxt_rxr.c | 111 +++++++++++-------- 8 files changed, 416 insertions(+), 132 deletions(-)--
2.30.1 (Apple Git-130)
Quoted 18 lines · Ajit Khaparde
Quoted 16 lines · Ferruh Yigit
Quoted 13 lines · Ajit Khaparde
Quoted 7 lines · Ajit Khaparde
Apart from fixing an issue with Rx queue state at startup, this patchset enhances support for RSS action and optimizes the mbuf requirement at startup by creating the aggregation rings only when needed (
rx_scatteris enabled).Please apply!
Patchset applied to dpdk-next-net-brcm.
Quoted 6 lines
Quoted 5 lines
Hi Ajit,
dpdk-next-net-brcm conflicts with next-net because of some patches updating bnxt in next-net.
Can you please rebase 'dpdk-next-net-brcm' on top of latest next-net?Sure. I will send an email once it's ready.
Done. I have rebased the repo to the latest next-net/main and merged the patches. Please try now.
Thanks
Ajit
Quoted 30 lines
Thanks
AjitQuoted 26 lines
Thanks,
ferruhQuoted 21 lines
Quoted 21 lines
Ajit Khaparde (3):
net/bnxt: create aggregration rings when needed net/bnxt: fix Rx queue state on start net/bnxt: enhance support for RSS actiondrivers/net/bnxt/bnxt_ethdev.c | 16 +-- drivers/net/bnxt/bnxt_filter.h | 1 + drivers/net/bnxt/bnxt_flow.c | 190 ++++++++++++++++++++++++++++++++- drivers/net/bnxt/bnxt_hwrm.c | 9 ++ drivers/net/bnxt/bnxt_ring.c | 148 +++++++++++++++---------- drivers/net/bnxt/bnxt_rxq.c | 71 +++++++----- drivers/net/bnxt/bnxt_rxq.h | 2 + drivers/net/bnxt/bnxt_rxr.c | 111 +++++++++++-------- 8 files changed, 416 insertions(+), 132 deletions(-)--
2.30.1 (Apple Git-130)
Quoted 20 lines · Ajit Khaparde
Quoted 18 lines · Ajit Khaparde
Quoted 16 lines · Ferruh Yigit
Quoted 13 lines · Ajit Khaparde
Quoted 7 lines · Ajit Khaparde
Apart from fixing an issue with Rx queue state at startup, this patchset enhances support for RSS action and optimizes the mbuf requirement at startup by creating the aggregation rings only when needed (
rx_scatteris enabled).Please apply!
Patchset applied to dpdk-next-net-brcm.
Quoted 9 lines
Quoted 6 lines
Quoted 5 lines
Hi Ajit,
dpdk-next-net-brcm conflicts with next-net because of some patches updating bnxt in next-net.
Can you please rebase 'dpdk-next-net-brcm' on top of latest next-net?Sure. I will send an email once it's ready.
Done. I have rebased the repo to the latest next-net/main and merged the patches. Please try now.
Hi Ajit,
I am getting lots of checkpatch warnings on the patches in your tree, but I don't see them in the patchwork. Warnings can be because of the updates during rebase.
If there is code change during rebase, to not have a diverge between the patch in the patchwork and what we are merging, can you please send and updated version of the effected patches first?
This lets us see the CI results and later they can be merge in your tree again.
Quoted 34 lines · Ferruh Yigit
Quoted 20 lines · Ajit Khaparde
Quoted 18 lines · Ajit Khaparde
Quoted 16 lines · Ferruh Yigit
Quoted 13 lines · Ajit Khaparde
Quoted 7 lines · Ajit Khaparde
Apart from fixing an issue with Rx queue state at startup, this patchset enhances support for RSS action and optimizes the mbuf requirement at startup by creating the aggregation rings only when needed (
rx_scatteris enabled).Please apply!
Patchset applied to dpdk-next-net-brcm.
Quoted 9 lines
Quoted 6 lines
Quoted 5 lines
Hi Ajit,
dpdk-next-net-brcm conflicts with next-net because of some patches updating bnxt in next-net.
Can you please rebase 'dpdk-next-net-brcm' on top of latest next-net?Sure. I will send an email once it's ready.
Done. I have rebased the repo to the latest next-net/main and merged the patches. Please try now.
Hi Ajit,
Quoted 7 lines
I am getting lots of checkpatch warnings on the patches in your tree, but I don't see them in the patchwork. Warnings can be because of the updates during rebase.
If there is code change during rebase, to not have a diverge between the patch in the patchwork and what we are merging, can you please send and updated version of the effected patches first?
There is no code change made during the rebase.
My checkpatch run did not point out anything.
But let me try again. Thanks Ferruh.
Thanks
Ajit
Quoted 3 lines
This lets us see the CI results and later they can be merge in your tree again.
Quoted 40 lines · Ajit Khaparde
Quoted 38 lines · Ferruh Yigit
Quoted 20 lines · Ajit Khaparde
Quoted 18 lines · Ajit Khaparde
Quoted 16 lines · Ferruh Yigit
Quoted 13 lines · Ajit Khaparde
Quoted 7 lines · Ajit Khaparde
Apart from fixing an issue with Rx queue state at startup, this patchset enhances support for RSS action and optimizes the mbuf requirement at startup by creating the aggregation rings only when needed (
rx_scatteris enabled).Please apply!
Patchset applied to dpdk-next-net-brcm.
Quoted 9 lines
Quoted 6 lines
Quoted 5 lines
Hi Ajit,
dpdk-next-net-brcm conflicts with next-net because of some patches updating bnxt in next-net.
Can you please rebase 'dpdk-next-net-brcm' on top of latest next-net?Sure. I will send an email once it's ready.
Done. I have rebased the repo to the latest next-net/main and merged the patches. Please try now.
Hi Ajit,
I am getting lots of checkpatch warnings on the patches in your tree, but I don't see them in the patchwork. Warnings can be because of the updates during rebase.
Quoted 6 lines
Quoted 3 lines
If there is code change during rebase, to not have a diverge between the patch in the patchwork and what we are merging, can you please send and updated version of the effected patches first?
There is no code change made during the rebase.
My checkpatch run did not point out anything.
But let me try again. Thanks Ferruh.
Ok, got it.
I had done the merge on a new system which did not have the checkpatch setup correctly.
I have fixed the issues and updated the tree. Apologies for the trouble.
Thanks
Ajit
Quoted 9 lines
Thanks
AjitQuoted 3 lines
This lets us see the CI results and later they can be merge in your tree again.
v3 cover patchset for bnxt PMD
In reply to Ferruh YigitApart from fixing an issue with Rx queue state at startup, this patchset enhances support for RSS action and optimizes the mbuf requirement at startup by creating the aggregation rings only when needed (rx_scatter is enabled).
Please apply!
--v1->v2: use correct patch for 3/3.v2->v3: rebase against latest dpdk-next-net tree.
Ajit Khaparde (3):
net/bnxt: create aggregration rings when needed net/bnxt: fix Rx queue state on start
net/bnxt: enhance support for RSS action
drivers/net/bnxt/bnxt_ethdev.c | 16 ++- drivers/net/bnxt/bnxt_filter.h | 1 + drivers/net/bnxt/bnxt_flow.c | 196 ++++++++++++++++++++++++++++++++- drivers/net/bnxt/bnxt_hwrm.c | 9 ++ drivers/net/bnxt/bnxt_ring.c | 148 +++++++++++++++---------- drivers/net/bnxt/bnxt_rxq.c | 84 ++++++++------ drivers/net/bnxt/bnxt_rxq.h | 2 + drivers/net/bnxt/bnxt_rxr.c | 111 +++++++++++-------- 8 files changed, 428 insertions(+), 139 deletions(-)
Signature · 1 line
2.30.1 (Apple Git-130)
PATCH v3 1/3 net/bnxt: create aggregration rings when needed
Aggregration rings are needed when PMD needs to support jumbo frames, LRO. Currently we are creating the aggregration rings whether jumbo frames or LRO has been enabled or disabled. This causes unnecessary allocation of mbufs needing larger mbuf pool which is not used at all.
This patch modifies the code to create aggregration rings only when needed.
--- drivers/net/bnxt/bnxt_hwrm.c | 9 +++ drivers/net/bnxt/bnxt_ring.c | 148 ++++++++++++++++++++++------------- drivers/net/bnxt/bnxt_rxq.c | 84 ++++++++++++-------- drivers/net/bnxt/bnxt_rxq.h | 2 + drivers/net/bnxt/bnxt_rxr.c | 111 +++++++++++++++----------- 5 files changed, 222 insertions(+), 132 deletions(-)
drivers/net/bnxt/bnxt_hwrm.c +9 -0
@@ -2741,6 +2741,14 @@ void bnxt_free_hwrm_rx_ring(struct bnxt *bp, int queue_index)if (BNXT_HAS_RING_GRPS (bp)) bp->grp_info[queue_index].rx_fw_ring_id =INVALID_HW_RING_ID ; +/* Check agg ring struct explicitly. +* bnxt_need_agg_ring() returns the current state of offload flags, +* but we may have to deal with agg ring struct before the offload +* flags are updated. +*/ +if (!bnxt_need_agg_ring (bp->eth_dev) || rxr->ag_ring_struct ==NULL ) + goto no_agg; + ring = rxr->ag_ring_struct; bnxt_hwrm_ring_free(bp, ring, BNXT_CHIP_P5(bp) ?
@@ -2750,6 +2758,7 @@ void bnxt_free_hwrm_rx_ring(struct bnxt *bp, int queue_index)if (BNXT_HAS_RING_GRPS (bp)) bp->grp_info[queue_index].ag_fw_ring_id =INVALID_HW_RING_ID ; +no_agg:bnxt_hwrm_stat_ctx_free (bp, cpr);bnxt_free_cp_ring (bp, cpr);
drivers/net/bnxt/bnxt_ring.c +92 -56
223 lines not on this page · raw message
drivers/net/bnxt/bnxt_rxq.c +53 -31
106 lines not on this page · raw message
drivers/net/bnxt/bnxt_rxq.h +2 -0
@@ -63,4 +63,6 @@ int bnxt_rx_queue_start(struct rte_eth_dev *dev,int bnxt_rx_queue_stop (struct rte_eth_dev *dev,uint16_t rx_queue_id);void bnxt_rx_queue_release_mbufs (struct bnxt_rx_queue *rxq); +int bnxt_need_agg_ring (struct rte_eth_dev *eth_dev); +void bnxt_free_rxq_mem (struct bnxt_rx_queue *rxq);#endif
drivers/net/bnxt/bnxt_rxr.c +66 -45
129 lines not on this page · raw message
Signature · 1 line
2.30.1 (Apple Git-130)
PATCH v3 2/3 net/bnxt: fix Rx queue state on start
In reply to Ajit KhapardeFix Rx queue state on device start.
The state of Rx queues could be incorrect in some cases because instead of updating the state for all the Rx queues, we are updating it for queues in a VNIC.
--- drivers/net/bnxt/bnxt_ethdev.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-)
drivers/net/bnxt/bnxt_ethdev.c +10 -6
@@ -482,12 +482,6 @@ static int bnxt_setup_one_vnic(struct bnxt *bp, uint16_t vnic_id) rxq->vnic->fw_grp_ids[j] =INVALID_HW_RING_ID ; else vnic->rx_queue_cnt++; - -if (!rxq->rx_deferred_start) { - bp->eth_dev->data->rx_queue_state[j] = -RTE_ETH_QUEUE_STATE_STARTED ; - rxq->rx_started = true; - } }PMD_DRV_LOG (DEBUG ,"vnic->rx_queue_cnt = %d\n" , vnic->rx_queue_cnt);
@@ -824,6 +818,16 @@ static int bnxt_start_nic(struct bnxt *bp) } } +for (j =0 ; j < bp->rx_nr_rings; j++) { +struct bnxt_rx_queue *rxq = bp->rx_queues[j]; + +if (!rxq->rx_deferred_start) { + bp->eth_dev->data->rx_queue_state[j] = +RTE_ETH_QUEUE_STATE_STARTED ; + rxq->rx_started = true; + } + } + rc =bnxt_hwrm_cfa_l2_set_rx_mask (bp, &bp->vnic_info[0 ],0 ,NULL );if (rc) { PMD_DRV_LOG(ERR,
Signature · 1 line
2.30.1 (Apple Git-130)
PATCH v3 3/3 net/bnxt: enhance support for RSS action
In reply to Ajit KhapardeEnhance support for RSS action in the non-TruFlow path. This will allow the user or application to update the RSS settings using RTE_FLOW API.
--- drivers/net/bnxt/bnxt_filter.h | 1 + drivers/net/bnxt/bnxt_flow.c | 196 ++++++++++++++++++++++++++++++++- 2 files changed, 196 insertions(+), 1 deletion(-)
drivers/net/bnxt/bnxt_filter.h +1 -0
@@ -43,6 +43,7 @@ struct bnxt_filter_info {#define HWRM_CFA_EM_FILTER 1#define HWRM_CFA_NTUPLE_FILTER 2#define HWRM_CFA_TUNNEL_REDIRECT_FILTER 3 +#define HWRM_CFA_CONFIG 4uint8_t filter_type;uint32_t dst_id;
drivers/net/bnxt/bnxt_flow.c +195 -1
226 lines not on this page · raw message
Signature · 1 line
2.30.1 (Apple Git-130)
v4 cover patchset for bnxt PMD
In reply to Ferruh YigitApart from fixing an issue with Rx queue state at startup, this patchset enhances support for RSS action and optimizes the mbuf requirement at startup by creating the aggregation rings only when needed (rx_scatter is enabled).
Please apply!
--v1->v2: use correct patch for 3/3.v2->v3: rebase against latest dpdk-next-net tree. v3->v4: fix checkpatch warnings and errors.
Ajit Khaparde (3):
net/bnxt: create aggregration rings when needed net/bnxt: fix Rx queue state on start
net/bnxt: enhance support for RSS action
drivers/net/bnxt/bnxt_ethdev.c | 16 ++- drivers/net/bnxt/bnxt_filter.h | 1 + drivers/net/bnxt/bnxt_flow.c | 196 ++++++++++++++++++++++++++++++++- drivers/net/bnxt/bnxt_hwrm.c | 9 ++ drivers/net/bnxt/bnxt_ring.c | 148 +++++++++++++++---------- drivers/net/bnxt/bnxt_rxq.c | 72 +++++++----- drivers/net/bnxt/bnxt_rxq.h | 2 + drivers/net/bnxt/bnxt_rxr.c | 111 +++++++++++-------- 8 files changed, 422 insertions(+), 133 deletions(-)
Signature · 1 line
2.30.1 (Apple Git-130)
PATCH v4 1/3 net/bnxt: create aggregration rings when needed
Aggregration rings are needed when PMD needs to support jumbo frames, LRO. Currently we are creating the aggregration rings whether jumbo frames or LRO has been enabled or disabled. This causes unnecessary allocation of mbufs needing larger mbuf pool which is not used at all.
This patch modifies the code to create aggregration rings only when needed.
--- drivers/net/bnxt/bnxt_hwrm.c | 9 +++ drivers/net/bnxt/bnxt_ring.c | 148 ++++++++++++++++++++++------------- drivers/net/bnxt/bnxt_rxq.c | 72 +++++++++++------ drivers/net/bnxt/bnxt_rxq.h | 2 + drivers/net/bnxt/bnxt_rxr.c | 111 +++++++++++++++----------- 5 files changed, 216 insertions(+), 126 deletions(-)
drivers/net/bnxt/bnxt_hwrm.c +9 -0
@@ -2741,6 +2741,14 @@ void bnxt_free_hwrm_rx_ring(struct bnxt *bp, int queue_index)if (BNXT_HAS_RING_GRPS (bp)) bp->grp_info[queue_index].rx_fw_ring_id =INVALID_HW_RING_ID ; +/* Check agg ring struct explicitly. +* bnxt_need_agg_ring() returns the current state of offload flags, +* but we may have to deal with agg ring struct before the offload +* flags are updated. +*/ +if (!bnxt_need_agg_ring (bp->eth_dev) || rxr->ag_ring_struct ==NULL ) + goto no_agg; + ring = rxr->ag_ring_struct; bnxt_hwrm_ring_free(bp, ring, BNXT_CHIP_P5(bp) ?
@@ -2750,6 +2758,7 @@ void bnxt_free_hwrm_rx_ring(struct bnxt *bp, int queue_index)if (BNXT_HAS_RING_GRPS (bp)) bp->grp_info[queue_index].ag_fw_ring_id =INVALID_HW_RING_ID ; +no_agg:bnxt_hwrm_stat_ctx_free (bp, cpr);bnxt_free_cp_ring (bp, cpr);
drivers/net/bnxt/bnxt_ring.c +92 -56
223 lines not on this page · raw message
drivers/net/bnxt/bnxt_rxq.c +47 -25
99 lines not on this page · raw message
drivers/net/bnxt/bnxt_rxq.h +2 -0
@@ -63,4 +63,6 @@ int bnxt_rx_queue_start(struct rte_eth_dev *dev,int bnxt_rx_queue_stop (struct rte_eth_dev *dev,uint16_t rx_queue_id);void bnxt_rx_queue_release_mbufs (struct bnxt_rx_queue *rxq); +int bnxt_need_agg_ring (struct rte_eth_dev *eth_dev); +void bnxt_free_rxq_mem (struct bnxt_rx_queue *rxq);#endif
drivers/net/bnxt/bnxt_rxr.c +66 -45
129 lines not on this page · raw message
Signature · 1 line
2.30.1 (Apple Git-130)
PATCH v4 2/3 net/bnxt: fix Rx queue state on start
In reply to Ajit KhapardeFix Rx queue state on device start.
The state of Rx queues could be incorrect in some cases because instead of updating the state for all the Rx queues, we are updating it for queues in a VNIC.
--- drivers/net/bnxt/bnxt_ethdev.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-)
drivers/net/bnxt/bnxt_ethdev.c +10 -6
@@ -482,12 +482,6 @@ static int bnxt_setup_one_vnic(struct bnxt *bp, uint16_t vnic_id) rxq->vnic->fw_grp_ids[j] =INVALID_HW_RING_ID ; else vnic->rx_queue_cnt++; - -if (!rxq->rx_deferred_start) { - bp->eth_dev->data->rx_queue_state[j] = -RTE_ETH_QUEUE_STATE_STARTED ; - rxq->rx_started = true; - } }PMD_DRV_LOG (DEBUG ,"vnic->rx_queue_cnt = %d\n" , vnic->rx_queue_cnt);
@@ -824,6 +818,16 @@ static int bnxt_start_nic(struct bnxt *bp) } } +for (j =0 ; j < bp->rx_nr_rings; j++) { +struct bnxt_rx_queue *rxq = bp->rx_queues[j]; + +if (!rxq->rx_deferred_start) { + bp->eth_dev->data->rx_queue_state[j] = +RTE_ETH_QUEUE_STATE_STARTED ; + rxq->rx_started = true; + } + } + rc =bnxt_hwrm_cfa_l2_set_rx_mask (bp, &bp->vnic_info[0 ],0 ,NULL );if (rc) { PMD_DRV_LOG(ERR,
Signature · 1 line
2.30.1 (Apple Git-130)
PATCH v4 3/3 net/bnxt: enhance support for RSS action
In reply to Ajit KhapardeEnhance support for RSS action in the non-TruFlow path. This will allow the user or application to update the RSS settings using RTE_FLOW API.
--- drivers/net/bnxt/bnxt_filter.h | 1 + drivers/net/bnxt/bnxt_flow.c | 196 ++++++++++++++++++++++++++++++++- 2 files changed, 196 insertions(+), 1 deletion(-)
drivers/net/bnxt/bnxt_filter.h +1 -0
@@ -43,6 +43,7 @@ struct bnxt_filter_info {#define HWRM_CFA_EM_FILTER 1#define HWRM_CFA_NTUPLE_FILTER 2#define HWRM_CFA_TUNNEL_REDIRECT_FILTER 3 +#define HWRM_CFA_CONFIG 4uint8_t filter_type;uint32_t dst_id;
drivers/net/bnxt/bnxt_flow.c +195 -1
226 lines not on this page · raw message
Signature · 1 line
2.30.1 (Apple Git-130)
Quoted 11 lines · Ajit Khaparde
Apart from fixing an issue with Rx queue state at startup, this patchset enhances support for RSS action and optimizes the mbuf requirement at startup by creating the aggregation rings only when needed (
rx_scatteris enabled).Please apply!
--v1->v2: use correct patch for 3/3.v2->v3: rebase against latest dpdk-next-net tree.v3->v4: fix checkpatch warnings and errors.
Quoted 5 lines
Ajit Khaparde (3):
net/bnxt: create aggregration rings when needed net/bnxt: fix Rx queue state on start net/bnxt: enhance support for RSS action
Pulled from next-net-brmc to next-net, thanks.