- updated one comment for more readability and understanding
- fixed typo in comments
- moved a comment to right place
- removed one out-of-date comment
- removed few commented code
Fixes:
f2a768d4d186 ("net/bnxt: add completion ring")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
struct bnxt_error_recovery_info *info;
uint32_t event_data;
struct bnxt_error_recovery_info *info;
uint32_t event_data;
- /* TODO: HWRM async events are not defined yet */
- /* Needs to handle: link events, error events, etc. */
switch (event_id) {
case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_STATUS_CHANGE:
case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CHANGE:
switch (event_id) {
case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_STATUS_CHANGE:
case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CHANGE:
struct bnxt_filter_info *filter, *temp_filter;
unsigned int i;
struct bnxt_filter_info *filter, *temp_filter;
unsigned int i;
-// for (i = 0; i < MAX_FF_POOLS; i++) {
for (i = 0; i < bp->nr_vnics; i++) {
vnic = &bp->vnic_info[i];
filter = STAILQ_FIRST(&vnic->filter);
for (i = 0; i < bp->nr_vnics; i++) {
vnic = &bp->vnic_info[i];
filter = STAILQ_FIRST(&vnic->filter);
vnic->fw_vnic_id != INVALID_HW_RING_ID)
goto use_vnic;
vnic->fw_vnic_id != INVALID_HW_RING_ID)
goto use_vnic;
- //if (!rxq ||
- //bp->vnic_info[0].fw_grp_ids[act_q->index] !=
- //INVALID_HW_RING_ID ||
- //!rxq->rx_deferred_start) {
if (!rxq ||
bp->vnic_info[0].fw_grp_ids[act_q->index] !=
INVALID_HW_RING_ID) {
if (!rxq ||
bp->vnic_info[0].fw_grp_ids[act_q->index] !=
INVALID_HW_RING_ID) {
}
rxq = bp->rx_queues[rss->queue[i]];
}
rxq = bp->rx_queues[rss->queue[i]];
- //if (bp->vnic_info[0].fw_grp_ids[rss->queue[i]] !=
- //INVALID_HW_RING_ID ||
- //!rxq->rx_deferred_start) {
if (bp->vnic_info[0].fw_grp_ids[rss->queue[i]] !=
INVALID_HW_RING_ID) {
PMD_DRV_LOG(ERR,
if (bp->vnic_info[0].fw_grp_ids[rss->queue[i]] !=
INVALID_HW_RING_ID) {
PMD_DRV_LOG(ERR,
/*
* HWRM Functions (sent to HWRM)
/*
* HWRM Functions (sent to HWRM)
- * These are named bnxt_hwrm_*() and return -1 if bnxt_hwrm_send_message()
- * fails (ie: a timeout), and a positive non-zero HWRM error code if the HWRM
- * command was failed by the ChiMP.
+ * These are named bnxt_hwrm_*() and return 0 on success or -110 if the
+ * HWRM command times out, or a negative error code if the HWRM
+ * command was failed by the FW.
*/
static int bnxt_hwrm_send_message(struct bnxt *bp, void *msg,
*/
static int bnxt_hwrm_send_message(struct bnxt *bp, void *msg,
- * HWRM_PREP() should be used to prepare *ALL* HWRM commands. It grabs the
+ * HWRM_PREP() should be used to prepare *ALL* HWRM commands. It grabs the
* spinlock, and does initial processing.
*
* HWRM_CHECK_RESULT() returns errors on failure and may not be used. It
* spinlock, and does initial processing.
*
* HWRM_CHECK_RESULT() returns errors on failure and may not be used. It
- * releases the spinlock only if it returns. If the regular int return codes
+ * releases the spinlock only if it returns. If the regular int return codes
* are not used by the function, HWRM_CHECK_RESULT() should not be used
* directly, rather it should be copied and modified to suit the function.
*
* are not used by the function, HWRM_CHECK_RESULT() should not be used
* directly, rather it should be copied and modified to suit the function.
*
struct hwrm_port_mac_ptp_qcfg_output *resp = bp->hwrm_cmd_resp_addr;
struct bnxt_ptp_cfg *ptp = bp->ptp_cfg;
struct hwrm_port_mac_ptp_qcfg_output *resp = bp->hwrm_cmd_resp_addr;
struct bnxt_ptp_cfg *ptp = bp->ptp_cfg;
-/* if (bp->hwrm_spec_code < 0x10801 || ptp) TBD */
-/*
- * HWRM utility functions
- */
-
int bnxt_clear_all_hwrm_stat_ctxs(struct bnxt *bp)
{
unsigned int i;
int bnxt_clear_all_hwrm_stat_ctxs(struct bnxt *bp)
{
unsigned int i;
+/*
+ * HWRM utility functions
+ */
+
void bnxt_free_hwrm_resources(struct bnxt *bp)
{
/* Release memzone */
void bnxt_free_hwrm_resources(struct bnxt *bp)
{
/* Release memzone */
rc = bnxt_hwrm_clear_l2_filter(bp, filter);
STAILQ_REMOVE(&vnic->filter, filter, bnxt_filter_info, next);
bnxt_free_filter(bp, filter);
rc = bnxt_hwrm_clear_l2_filter(bp, filter);
STAILQ_REMOVE(&vnic->filter, filter, bnxt_filter_info, next);
bnxt_free_filter(bp, filter);
STAILQ_REMOVE(&vnic->flow_list, flow, rte_flow, next);
rte_free(flow);
STAILQ_REMOVE(&vnic->flow_list, flow, rte_flow, next);
rte_free(flow);
for (i = bp->max_vnics - 1; i >= 0; i--) {
struct bnxt_vnic_info *vnic = &bp->vnic_info[i];
for (i = bp->max_vnics - 1; i >= 0; i--) {
struct bnxt_vnic_info *vnic = &bp->vnic_info[i];
- // If the VNIC ID is invalid we are not currently using the VNIC
if (vnic->fw_vnic_id == INVALID_HW_RING_ID)
continue;
if (vnic->fw_vnic_id == INVALID_HW_RING_ID)
continue;
HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_SRC_MACADDR)
memcpy(req.src_macaddr, filter->src_macaddr,
RTE_ETHER_ADDR_LEN);
HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_SRC_MACADDR)
memcpy(req.src_macaddr, filter->src_macaddr,
RTE_ETHER_ADDR_LEN);
- //if (enables &
- //HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_DST_MACADDR)
- //memcpy(req.dst_macaddr, filter->dst_macaddr,
- //RTE_ETHER_ADDR_LEN);
if (enables &
HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_ETHERTYPE)
req.ethertype = rte_cpu_to_be_16(filter->ethertype);
if (enables &
HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_ETHERTYPE)
req.ethertype = rte_cpu_to_be_16(filter->ethertype);