}
ret = hns3_dcb_lvl34_schd_mode_cfg(hw);
- if (ret) {
+ if (ret)
hns3_err(hw, "config lvl34_schd_mode failed: %d", ret);
- return ret;
- }
- return 0;
+ return ret;
}
static int
}
ret = hns3_dcb_pri_dwrr_cfg(hw);
- if (ret) {
+ if (ret)
hns3_err(hw, "config pri_dwrr failed: %d", ret);
- return ret;
- }
- return 0;
+ return ret;
}
static int
/* Cfg q -> qs mapping */
ret = hns3_q_to_qs_map(hw);
- if (ret) {
+ if (ret)
hns3_err(hw, "nq_to_qs mapping fail: %d", ret);
- return ret;
- }
- return 0;
+ return ret;
}
static int
hns3_dcb_update_tc_queue_mapping(hw, nb_rx_q, nb_tx_q);
ret = hns3_q_to_qs_map(hw);
- if (ret) {
+ if (ret)
hns3_err(hw, "failed to map nq to qs! ret = %d", ret);
- return ret;
- }
- return 0;
+ return ret;
}
int
if ((uint32_t)mq_mode & ETH_MQ_RX_DCB_FLAG) {
ret = hns3_dcb_configure(hns);
- if (ret) {
+ if (ret)
hns3_err(hw, "Failed to config dcb: %d", ret);
- return ret;
- }
} else {
/*
* Update queue map without PFC configuration,
uint16_t vlan_id;
int ret = 0;
- if (pf->port_base_vlan_cfg.state == HNS3_PORT_BASE_VLAN_ENABLE) {
- ret = hns3_vlan_pvid_configure(hns, pf->port_base_vlan_cfg.pvid,
- 1);
- return ret;
- }
+ if (pf->port_base_vlan_cfg.state == HNS3_PORT_BASE_VLAN_ENABLE)
+ return hns3_vlan_pvid_configure(hns,
+ pf->port_base_vlan_cfg.pvid, 1);
LIST_FOREACH(vlan_entry, &pf->vlan_list, next) {
if (vlan_entry->hd_tbl_status) {
}
ret = hns3_buffer_alloc(hw);
- if (ret) {
+ if (ret)
hns3_err(hw, "Failed to allocate buffer, ret = %d", ret);
- return ret;
- }
- return 0;
+ return ret;
}
static int
}
ret = hns3_get_board_configuration(hw);
- if (ret) {
+ if (ret)
PMD_INIT_LOG(ERR, "Failed to get board configuration: %d", ret);
- return ret;
- }
- return 0;
+ return ret;
}
static int
struct hns3_promisc_param param;
bool en_bc_pmc = true;
uint8_t vf_id;
- int ret;
/*
* In current version VF is not supported when PF is driven by DPDK
vf_id = 0;
hns3_promisc_param_init(¶m, en_uc_pmc, en_mc_pmc, en_bc_pmc, vf_id);
- ret = hns3_cmd_set_promisc_mode(hw, ¶m);
- if (ret)
- return ret;
-
- return 0;
+ return hns3_cmd_set_promisc_mode(hw, ¶m);
}
static int
mac_addr);
hns3_err(hw, "Failed to add mc mac addr(%s) for vf: %d",
mac_str, ret);
- return ret;
}
- return 0;
+ return ret;
}
static int
mac_addr);
hns3_err(hw, "Failed to remove mc mac addr(%s) for vf: %d",
mac_str, ret);
- return ret;
}
- return 0;
+ return ret;
}
static int
op_str = mmap ? "Map" : "Unmap";
ret = hns3_send_mbx_msg(hw, code, 0, (uint8_t *)&bind_msg,
sizeof(bind_msg), false, NULL, 0);
- if (ret) {
+ if (ret)
hns3_err(hw, "%s TQP %d fail, vector_id is %d, ret is %d.",
op_str, queue_id, bind_msg.vector_id, ret);
- return ret;
- }
- return 0;
+ return ret;
}
static int
return ret;
ret = hns3_start_queues(hns, reset_queue);
- if (ret) {
+ if (ret)
hns3_err(hw, "Failed to start queues: %d", ret);
- return ret;
- }
- return 0;
+ return ret;
}
static int