[dpdk-dev] [PATCH 09/22] net/hns3: add support for flow directory of hns3 PMD driver

Ferruh Yigit ferruh.yigit at intel.com
Fri Aug 30 17:06:11 CEST 2019


On 8/23/2019 2:46 PM, Wei Hu (Xavier) wrote:
> This patch adds support for flow directory of hns3 PMD driver.
> Flow directory feature is only supported in hns3 PF driver.
> It supports the network L2\L3\L4 and tunnel packet creation,
> deletion, flushing, and querying hit statistics.

This patch also adds rte_flow support, can you please add this into commit log?

> 
> Signed-off-by: Chunsong Feng <fengchunsong at huawei.com>
> Signed-off-by: Wei Hu (Xavier) <xavier.huwei at huawei.com>
> Signed-off-by: Hao Chen <chenhao164 at huawei.com>
> Signed-off-by: Min Hu (Connor) <humin29 at huawei.com>
> Signed-off-by: Huisong Li <lihuisong at huawei.com>

<...>

> @@ -2726,6 +2744,7 @@ static const struct eth_dev_ops hns3_eth_dev_ops = {
>  	.mac_addr_set           = hns3_set_default_mac_addr,
>  	.set_mc_addr_list       = hns3_set_mc_mac_addr_list,
>  	.link_update            = hns3_dev_link_update,
> +	.filter_ctrl            = hns3_dev_filter_ctrl,

'hns3_dev_filter_ctrl()' is not exists up until this patch.

This is the problem of not enabling the driver yet, it is very hard to see these
kind of issues. When Makefile/meson patch moved to the begging of the patches
and start to build the driver, these issues will be visible.

>  };
>  
>  static int
> @@ -2739,6 +2758,16 @@ hns3_dev_init(struct rte_eth_dev *eth_dev)
>  	int ret;
>  
>  	PMD_INIT_FUNC_TRACE();
> +	eth_dev->process_private = (struct hns3_process_private *)
> +	    rte_zmalloc_socket("hns3_filter_list",
> +			       sizeof(struct hns3_process_private),
> +			       RTE_CACHE_LINE_SIZE, eth_dev->device->numa_node);
> +	if (eth_dev->process_private == NULL) {
> +		PMD_INIT_LOG(ERR, "Failed to alloc memory for process private");
> +		return -ENOMEM;
> +	}
> +	/* initialize flow filter lists */
> +	hns3_filterlist_init(eth_dev);

Can you please free 'process_private' in, close dev_ops?


More information about the dev mailing list