From: Ophir Munk <ophirmu@mellanox.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>,
Pascal Mazon <pascal.mazon@6wind.com>
Cc: Thomas Monjalon <thomas@monjalon.net>,
Olga Shern <olgas@mellanox.com>,
"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v1] net/tap: return empty port offload capabilities
Date: Thu, 26 Apr 2018 11:09:07 +0000 [thread overview]
Message-ID: <HE1PR0501MB2314937471944A8DC609B08CD18E0@HE1PR0501MB2314.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <e22981c2-ad53-3c8b-f239-765dda867f5a@intel.com>
Hi Ferruh,
Thanks for your review.
v2 was sent to mailing list that updates the log message and the commit message (based on Thomas comment that all queues capabilities must be reported as port capabilities)
> -----Original Message-----
> From: Ferruh Yigit [mailto:ferruh.yigit@intel.com]
> Sent: Wednesday, April 25, 2018 7:32 PM
> To: Ophir Munk <ophirmu@mellanox.com>; dev@dpdk.org; Pascal Mazon
> <pascal.mazon@6wind.com>
> Cc: Thomas Monjalon <thomas@monjalon.net>; Olga Shern
> <olgas@mellanox.com>; stable@dpdk.org
> Subject: Re: [PATCH v1] net/tap: return empty port offload capabilities
>
> On 4/25/2018 5:15 PM, Ophir Munk wrote:
> > 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.
>
> Overall looks good to me, thanks.
>
> Is error log in tap_tx_queue_setup() still valid:
> RTE_LOG(ERR, PMD,
> "%p: Tx queue offloads 0x%" PRIx64
> " don't match port offloads 0x%" PRIx64
> " or supported offloads 0x%" PRIx64,
> (void *)dev, tx_conf->offloads,
> dev->data->dev_conf.txmode.offloads,
> tap_tx_offload_get_port_capa());
>
> There is no match expected, this path can be hit when requested offload out
> of reported capabilities, but either log or printed values give much
> information about real error cause.
>
> Similar in tap_rx_queue_setup(), at least it does:
> (tap_rx_offload_get_port_capa() | tap_rx_offload_get_queue_capa())
>
>
>
> >
> > Fixes: 95ae196ae10b ("net/tap: use new Rx offloads API")
> > Fixes: 818fe14a9891 ("net/tap: use new Tx offloads API")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
> > ---
> > drivers/net/tap/rte_eth_tap.c | 21 ++++++---------------
> > 1 file changed, 6 insertions(+), 15 deletions(-)
> >
> > diff --git a/drivers/net/tap/rte_eth_tap.c
> > b/drivers/net/tap/rte_eth_tap.c index fe62ab3..aea73b1 100644
> > --- a/drivers/net/tap/rte_eth_tap.c
> > +++ b/drivers/net/tap/rte_eth_tap.c
> > @@ -269,14 +269,9 @@ static uint64_t
> > tap_rx_offload_get_port_capa(void)
> > {
> > /*
> > - * In order to support legacy apps,
> > - * report capabilities also as port capabilities.
> > + * No specific port Rx offload capabilities.
> > */
> > - return DEV_RX_OFFLOAD_SCATTER |
> > - DEV_RX_OFFLOAD_IPV4_CKSUM |
> > - DEV_RX_OFFLOAD_UDP_CKSUM |
> > - DEV_RX_OFFLOAD_TCP_CKSUM |
> > - DEV_RX_OFFLOAD_CRC_STRIP;
> > + return 0;
> > }
> >
> > static uint64_t
> > @@ -403,14 +398,9 @@ static uint64_t
> > tap_tx_offload_get_port_capa(void)
> > {
> > /*
> > - * In order to support legacy apps,
> > - * report capabilities also as port capabilities.
> > + * No specific port Tx offload capabilities.
> > */
> > - return DEV_TX_OFFLOAD_MULTI_SEGS |
> > - DEV_TX_OFFLOAD_IPV4_CKSUM |
> > - DEV_TX_OFFLOAD_UDP_CKSUM |
> > - DEV_TX_OFFLOAD_TCP_CKSUM |
> > - DEV_TX_OFFLOAD_TCP_TSO;
> > + return 0;
> > }
> >
> > static uint64_t
> > @@ -787,7 +777,8 @@ tap_dev_stop(struct rte_eth_dev *dev) static int
> > tap_dev_configure(struct rte_eth_dev *dev) {
> > - uint64_t supp_tx_offloads = tap_tx_offload_get_port_capa();
> > + uint64_t supp_tx_offloads = tap_tx_offload_get_port_capa() |
> > + tap_tx_offload_get_queue_capa();
> > uint64_t tx_offloads = dev->data->dev_conf.txmode.offloads;
> >
> > if ((tx_offloads & supp_tx_offloads) != tx_offloads) {
> >
next prev parent reply other threads:[~2018-04-26 11:09 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 [this message]
2018-04-25 16:47 ` Thomas Monjalon
2018-04-25 17:13 ` Ferruh Yigit
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=HE1PR0501MB2314937471944A8DC609B08CD18E0@HE1PR0501MB2314.eurprd05.prod.outlook.com \
--to=ophirmu@mellanox.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=olgas@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).