From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Thomas Monjalon <thomas@monjalon.net>, Ophir Munk <ophirmu@mellanox.com>
Cc: dev@dpdk.org, Pascal Mazon <pascal.mazon@6wind.com>,
Olga Shern <olgas@mellanox.com>,
stable@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v1] net/tap: return empty port offload capabilities
Date: Wed, 25 Apr 2018 18:13:52 +0100 [thread overview]
Message-ID: <50c08c3d-d4e0-1169-3627-ed958af27497@intel.com> (raw)
In-Reply-To: <1822119.1fBLbGrzlv@xps>
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;
}
next prev parent reply other threads:[~2018-04-25 17:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-25 16:15 Ophir Munk
2018-04-25 16:31 ` Ferruh Yigit
2018-04-26 11:09 ` Ophir Munk
2018-04-25 16:47 ` Thomas Monjalon
2018-04-25 17:13 ` Ferruh Yigit [this message]
2018-04-26 11:13 ` [dpdk-dev] [PATCH v2] " Ophir Munk
2018-04-26 16:56 ` Ferruh Yigit
2018-04-26 16:57 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50c08c3d-d4e0-1169-3627-ed958af27497@intel.com \
--to=ferruh.yigit@intel.com \
--cc=dev@dpdk.org \
--cc=olgas@mellanox.com \
--cc=ophirmu@mellanox.com \
--cc=pascal.mazon@6wind.com \
--cc=stable@dpdk.org \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).