[dpdk-dev] [PATCH 33/38] net/dpaa: add support for flow control

Ferruh Yigit ferruh.yigit at intel.com
Wed Jun 28 17:47:35 CEST 2017


On 6/16/2017 6:41 AM, Shreyansh Jain wrote:
> Signed-off-by: Hemant Agrawal <hemant.agrawal at nxp.com>
> Signed-off-by: Shreyansh Jain <shreyansh.jain at nxp.com>

<...>

>  static int
> +dpaa_flow_ctrl_set(struct rte_eth_dev *dev,
> +		   struct rte_eth_fc_conf *fc_conf)
> +{
> +	struct dpaa_if *dpaa_intf = dev->data->dev_private;
> +	struct rte_eth_fc_conf *net_fc;
> +
> +	PMD_INIT_FUNC_TRACE();
> +
> +	if (!(dpaa_intf->fc_conf)) {
> +		dpaa_intf->fc_conf = rte_zmalloc(NULL,
> +			sizeof(struct rte_eth_fc_conf), MAX_CACHELINE);

Should this be freed in rte_dpaa_remove()

> +		if (!dpaa_intf->fc_conf) {
> +			PMD_DRV_LOG(ERR, "unable to save flow control info");
> +			return -ENOMEM;
> +		}
> +	}
> +	net_fc = dpaa_intf->fc_conf;
> +
<...>



More information about the dev mailing list