[dpdk-dev] [PATCH v1] net/tap: return empty port offload capabilities
Ferruh Yigit
ferruh.yigit at intel.com
Wed Apr 25 19:13:52 CEST 2018
On 4/25/2018 5:47 PM, Thomas Monjalon wrote:
> 25/04/2018 18:15, Ophir Munk:
>> Fix report on port offload capabilities to be 0 (no capabilities).
>> Before this commit port capabilities were a clone of queue
>> capabilities, however the current TAP offload capabilities (e.g.
>> checksum calculation) are per queue and are not specific per port.
>
> I did not follow what is the problem exactly.
> But this change looks wrong to me.
> Please look at the thread
> "Survey for final decision about per-port offload API"
> http://dpdk.org/ml/archives/dev/2018-March/094459.html
> It says:
> "every queue capabilities must be reported as port capabilities"
That logic is correct in capability reporting [1].
The problem here is the offload verify function assumes the
tap_rx_offload_get_port_capa() is the only port level offloads. Returning queue
level offloads in this function breaks the verify logic.
I think the reason of this issue is undocumented smart verify function
implementation (copied from mlx5 driver) [2], since it is not easy to understand
it is easy to confuse.
[1]
dev_info->rx_queue_offload_capa = tap_rx_offload_get_queue_capa();
dev_info->rx_offload_capa = tap_rx_offload_get_port_capa() |
dev_info->rx_queue_offload_capa;
[2]
static bool
tap_rxq_are_offloads_valid(struct rte_eth_dev *dev, uint64_t offloads)
{
uint64_t port_offloads = dev->data->dev_conf.rxmode.offloads;
uint64_t queue_supp_offloads = tap_rx_offload_get_queue_capa();
uint64_t port_supp_offloads = tap_rx_offload_get_port_capa();
if ((offloads & (queue_supp_offloads | port_supp_offloads)) !=
offloads)
return false;
if ((port_offloads ^ offloads) & port_supp_offloads)
return false;
return true;
}
More information about the dev
mailing list