@@ -9,7 +9,7 @@
#define HINIC_SCMD_DATA_LEN 16
-/* hiovs pmd use 64, kernel l2nic use 4096 */
+/* pmd driver uses 64, kernel l2nic use 4096 */
#define HINIC_CMDQ_DEPTH 64
#define HINIC_CMDQ_BUF_SIZE 2048U
@@ -99,7 +99,7 @@ void hinic_set_pf_status(struct hinic_hwif *hwif, enum hinic_pf_status status)
u32 addr = HINIC_CSR_FUNC_ATTR5_ADDR;
if (hwif->attr.func_type == TYPE_VF) {
- PMD_DRV_LOG(ERR, "VF doesn't support set attr5");
+ PMD_DRV_LOG(INFO, "VF doesn't support to set attr5");
return;
}
@@ -369,7 +369,6 @@ static int init_rq_ctxts(struct hinic_nic_io *nic_io)
HINIC_MOD_L2NIC,
HINIC_UCODE_CMD_MDY_QUEUE_CONTEXT,
cmd_buf, &out_param, 0);
-
if ((err) || out_param != 0) {
PMD_DRV_LOG(ERR, "Failed to set RQ ctxts");
err = -EFAULT;
@@ -354,7 +354,7 @@ static int hinic_dev_configure(struct rte_eth_dev *dev)
return err;
}
- /*clear fdir filter flag in function table*/
+ /* clear fdir filter flag in function table */
hinic_free_fdir_filter(nic_dev);
return HINIC_OK;
@@ -440,7 +440,7 @@ static int hinic_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
}
nic_dev->rxqs[queue_idx] = rxq;
- /* alloc rx sq hw wqepage*/
+ /* alloc rx sq hw wqe page */
rc = hinic_create_rq(hwdev, queue_idx, rq_depth, socket_id);
if (rc) {
PMD_DRV_LOG(ERR, "Create rxq[%d] failed, dev_name: %s, rq_depth: %d",
@@ -2035,12 +2035,12 @@ static int hinic_rss_conf_get(struct rte_eth_dev *dev,
}
/**
- * DPDK callback to update the RETA indirection table.
+ * DPDK callback to update the RSS redirection table.
*
* @param dev
* Pointer to Ethernet device structure.
* @param reta_conf
- * Pointer to RETA configuration structure array.
+ * Pointer to RSS reta configuration data.
* @param reta_size
* Size of the RETA table.
*
@@ -2102,14 +2102,13 @@ static int hinic_rss_indirtbl_update(struct rte_eth_dev *dev,
return HINIC_ERROR;
}
-
/**
- * DPDK callback to get the RETA indirection table.
+ * DPDK callback to get the RSS indirection table.
*
* @param dev
* Pointer to Ethernet device structure.
* @param reta_conf
- * Pointer to RETA configuration structure array.
+ * Pointer to RSS reta configuration data.
* @param reta_size
* Size of the RETA table.
*
@@ -2309,8 +2308,7 @@ static int hinic_dev_xstats_get_names(struct rte_eth_dev *dev,
for (i = 0; i < HINIC_VPORT_XSTATS_NUM; i++) {
snprintf(xstats_names[count].name,
sizeof(xstats_names[count].name),
- "%s",
- hinic_vport_stats_strings[i].name);
+ "%s", hinic_vport_stats_strings[i].name);
count++;
}
@@ -2321,13 +2319,13 @@ static int hinic_dev_xstats_get_names(struct rte_eth_dev *dev,
for (i = 0; i < HINIC_PHYPORT_XSTATS_NUM; i++) {
snprintf(xstats_names[count].name,
sizeof(xstats_names[count].name),
- "%s",
- hinic_phyport_stats_strings[i].name);
+ "%s", hinic_phyport_stats_strings[i].name);
count++;
}
return count;
}
+
/**
* DPDK callback to set mac address
*
@@ -2492,19 +2490,19 @@ static int hinic_set_mc_addr_list(struct rte_eth_dev *dev,
}
/**
- * DPDK callback to manage filter operations
+ * DPDK callback to manage filter control operations
*
* @param dev
* Pointer to Ethernet device structure.
* @param filter_type
- * Filter type.
+ * Filter type, which just supports generic type.
* @param filter_op
- * Operation to perform.
+ * Filter operation to perform.
* @param arg
* Pointer to operation-specific structure.
*
* @return
- * 0 on success, negative errno value on failure.
+ * 0 on success, negative error value otherwise.
*/
static int hinic_dev_filter_ctrl(struct rte_eth_dev *dev,
enum rte_filter_type filter_type,
@@ -53,11 +53,13 @@ struct hinic_5tuple_filter_info {
* used when more than one filter matches.
*/
uint8_t priority;
- uint8_t dst_ip_mask:1, /* if mask is 1b, do not compare dst ip. */
- src_ip_mask:1, /* if mask is 1b, do not compare src ip. */
- dst_port_mask:1, /* if mask is 1b, do not compare dst port. */
- src_port_mask:1, /* if mask is 1b, do not compare src port. */
- proto_mask:1; /* if mask is 1b, do not compare protocol. */
+
+ /* if mask is 1b, do not compare the response bit domain */
+ uint8_t dst_ip_mask:1,
+ src_ip_mask:1,
+ dst_port_mask:1,
+ src_port_mask:1,
+ proto_mask:1;
};
/* 5tuple filter structure */