From: "Gaëtan Rivet" <gaetan.rivet@6wind.com>
To: Andrew Rybchenko <arybchenko@solarflare.com>
Cc: dev@dpdk.org, Ferruh Yigit <ferruh.yigit@intel.com>,
Igor Romanov <Igor.Romanov@oktetlabs.ru>,
stable@dpdk.org
Subject: Re: [dpdk-stable] [PATCH v2] net/failsafe: report actual device capabilities
Date: Wed, 26 Sep 2018 13:58:15 +0200 [thread overview]
Message-ID: <20180926115815.rlwzryfognltlzq5@bidouze.vm.6wind.com> (raw)
In-Reply-To: <1537943884-12979-1-git-send-email-arybchenko@solarflare.com>
On Wed, Sep 26, 2018 at 07:38:04AM +0100, Andrew Rybchenko wrote:
> From: Igor Romanov <Igor.Romanov@oktetlabs.ru>
>
> Failsafe device capabilities depend on supported by the failsafe
> itself plus capabilities supported by sub-devices.
> Make fs_dev_infos_get() take failsafe device capabilities into account.
>
> Fixes: cac923cfea47 ("ethdev: support runtime queue setup")
> Cc: stable@dpdk.org
>
> Signed-off-by: Igor Romanov <Igor.Romanov@oktetlabs.ru>
> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
> ---
> drivers/net/failsafe/failsafe_ops.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/net/failsafe/failsafe_ops.c b/drivers/net/failsafe/failsafe_ops.c
> index 86d7fa2a0..7f8bcd4c6 100644
> --- a/drivers/net/failsafe/failsafe_ops.c
> +++ b/drivers/net/failsafe/failsafe_ops.c
> @@ -890,6 +890,8 @@ fs_stats_reset(struct rte_eth_dev *dev)
> * all sub_devices and the default capabilities.
> * Uses a logical AND of TX capabilities among
> * the active probed sub_device and the default capabilities.
> + * Uses a logical AND of device capabilities among
> + * all sub_devices and the default capabilities.
> *
> */
> static void
> @@ -908,10 +910,12 @@ fs_dev_infos_get(struct rte_eth_dev *dev,
> uint64_t rx_offload_capa;
> uint64_t rxq_offload_capa;
> uint64_t rss_hf_offload_capa;
> + uint64_t dev_capa;
>
> rx_offload_capa = default_infos.rx_offload_capa;
> rxq_offload_capa = default_infos.rx_queue_offload_capa;
> rss_hf_offload_capa = default_infos.flow_type_rss_offloads;
> + dev_capa = default_infos.dev_capa;
> FOREACH_SUBDEV_STATE(sdev, i, dev, DEV_PROBED) {
> rte_eth_dev_info_get(PORT_ID(sdev),
> &PRIV(dev)->infos);
> @@ -920,12 +924,14 @@ fs_dev_infos_get(struct rte_eth_dev *dev,
> PRIV(dev)->infos.rx_queue_offload_capa;
> rss_hf_offload_capa &=
> PRIV(dev)->infos.flow_type_rss_offloads;
> + dev_capa &= PRIV(dev)->infos.dev_capa;
> }
> sdev = TX_SUBDEV(dev);
> rte_eth_dev_info_get(PORT_ID(sdev), &PRIV(dev)->infos);
> PRIV(dev)->infos.rx_offload_capa = rx_offload_capa;
> PRIV(dev)->infos.rx_queue_offload_capa = rxq_offload_capa;
> PRIV(dev)->infos.flow_type_rss_offloads = rss_hf_offload_capa;
> + PRIV(dev)->infos.dev_capa = dev_capa;
> PRIV(dev)->infos.tx_offload_capa &=
> default_infos.tx_offload_capa;
> PRIV(dev)->infos.tx_queue_offload_capa &=
> --
> 2.17.1
>
--
Gaëtan Rivet
6WIND
next prev parent reply other threads:[~2018-09-26 11:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-29 7:45 [dpdk-stable] [PATCH] net/failsafe: limit device capabilities to really supported Andrew Rybchenko
2018-09-25 15:48 ` Gaëtan Rivet
2018-09-26 6:36 ` [dpdk-stable] [dpdk-dev] " Andrew Rybchenko
2018-09-26 6:38 ` [dpdk-stable] [PATCH v2] net/failsafe: report actual device capabilities Andrew Rybchenko
2018-09-26 11:58 ` Gaëtan Rivet [this message]
2018-10-01 14:38 ` 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=20180926115815.rlwzryfognltlzq5@bidouze.vm.6wind.com \
--to=gaetan.rivet@6wind.com \
--cc=Igor.Romanov@oktetlabs.ru \
--cc=arybchenko@solarflare.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=stable@dpdk.org \
/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).