[dpdk-dev] [PATCH v2 1/2] net/i40e: convert to new Rx offloads API

Zhang, Qi Z qi.z.zhang at intel.com
Tue Mar 27 14:41:08 CEST 2018


> +static int
> +i40e_check_rx_queue_offloads(struct rte_eth_dev *dev, uint64_t
> +requested) {
> +	struct rte_eth_dev_info dev_info;
> +	uint64_t mandatory = dev->data->dev_conf.rxmode.offloads;
> +	uint64_t supported; /* All per port offloads */
> +
> +	dev->dev_ops->dev_infos_get(dev, &dev_info);
> +	supported = dev_info.rx_offload_capa ^
> dev_info.rx_queue_offload_capa;
> +	if ((requested & dev_info.rx_queue_offload_capa) != requested)

Should be dev_info.rx_offload_capa here but not dev_info.rx_queue_offload_capa.

> +		return 0;
> +	return !((mandatory ^ requested) & supported); }
> +



More information about the dev mailing list