* [dpdk-stable] [PATCH] net/failsafe: limit device capabilities to really supported
@ 2018-08-29 7:45 Andrew Rybchenko
2018-09-25 15:48 ` Gaëtan Rivet
2018-09-26 6:38 ` [dpdk-stable] [PATCH v2] net/failsafe: report actual device capabilities Andrew Rybchenko
0 siblings, 2 replies; 6+ messages in thread
From: Andrew Rybchenko @ 2018-08-29 7:45 UTC (permalink / raw)
To: Gaetan Rivet; +Cc: dev, Igor Romanov, stable
From: Igor Romanov <Igor.Romanov@oktetlabs.ru>
Failsafe driver does not support any device capabilities yet.
Make fs_dev_infos_get() consider default ones to limit advertised
device capabilities to really supported instead of unconditional
inheritance from sub-devices.
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>
---
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 24e91c931..2df8b55d9 100644
--- a/drivers/net/failsafe/failsafe_ops.c
+++ b/drivers/net/failsafe/failsafe_ops.c
@@ -716,6 +716,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
@@ -734,10 +736,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);
@@ -746,12 +750,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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-stable] [PATCH] net/failsafe: limit device capabilities to really supported
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
1 sibling, 1 reply; 6+ messages in thread
From: Gaëtan Rivet @ 2018-09-25 15:48 UTC (permalink / raw)
To: Andrew Rybchenko; +Cc: dev, Igor Romanov, stable
Hi,
Sorry I had forgotten this one.
I would rename the title, something like:
net/failsafe: report actual device capabilities
And a few edits in the commit log:
On Wed, Aug 29, 2018 at 08:45:36AM +0100, Andrew Rybchenko wrote:
> From: Igor Romanov <Igor.Romanov@oktetlabs.ru>
>
> Failsafe driver does not support any device capabilities yet.
> Make fs_dev_infos_get() consider default ones to limit advertised
^^^^^^^^=report
> device capabilities to really supported instead of unconditional
| ^^^^^=actually? ^^^^^^^^^^^^^^^^^^^^^^^^
^ +those?
> inheritance from sub-devices.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -> whole end of sentence can be removed.
>
> 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>
Otherwise
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 24e91c931..2df8b55d9 100644
> --- a/drivers/net/failsafe/failsafe_ops.c
> +++ b/drivers/net/failsafe/failsafe_ops.c
> @@ -716,6 +716,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
> @@ -734,10 +736,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);
> @@ -746,12 +750,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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-stable] [dpdk-dev] [PATCH] net/failsafe: limit device capabilities to really supported
2018-09-25 15:48 ` Gaëtan Rivet
@ 2018-09-26 6:36 ` Andrew Rybchenko
0 siblings, 0 replies; 6+ messages in thread
From: Andrew Rybchenko @ 2018-09-26 6:36 UTC (permalink / raw)
To: Gaëtan Rivet; +Cc: dev, Igor Romanov, stable, Ferruh Yigit
On 9/25/18 6:48 PM, Gaëtan Rivet wrote:
> Hi,
>
> Sorry I had forgotten this one.
> I would rename the title, something like:
>
> net/failsafe: report actual device capabilities
>
> And a few edits in the commit log:
>
> On Wed, Aug 29, 2018 at 08:45:36AM +0100, Andrew Rybchenko wrote:
>> From: Igor Romanov <Igor.Romanov@oktetlabs.ru>
>>
>> Failsafe driver does not support any device capabilities yet.
In fact above statement was valid at the moment of initial submission,
but it is invalid now since run-time queue setup support added.
>> Make fs_dev_infos_get() consider default ones to limit advertised
> ^^^^^^^^=report
We do not blindly report so-called default capabilities. We take
capabilities reported by sub-devices as well. I think that "default"
can confuse unaware reader here (since default is the failsafe device
capabilities and "default" is just a part of variable name). So, I suggest
to reword it.
I'll send v2 shortly.
>> device capabilities to really supported instead of unconditional
> | ^^^^^=actually? ^^^^^^^^^^^^^^^^^^^^^^^^
> ^ +those?
>> inheritance from sub-devices.
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -> whole end of sentence can be removed.
>> 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>
> Otherwise
>
> 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 24e91c931..2df8b55d9 100644
>> --- a/drivers/net/failsafe/failsafe_ops.c
>> +++ b/drivers/net/failsafe/failsafe_ops.c
>> @@ -716,6 +716,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
>> @@ -734,10 +736,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);
>> @@ -746,12 +750,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
>>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [dpdk-stable] [PATCH v2] net/failsafe: report actual device capabilities
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:38 ` Andrew Rybchenko
2018-09-26 11:58 ` Gaëtan Rivet
1 sibling, 1 reply; 6+ messages in thread
From: Andrew Rybchenko @ 2018-09-26 6:38 UTC (permalink / raw)
To: Gaëtan Rivet; +Cc: dev, Ferruh Yigit, Igor Romanov, stable
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>
---
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-stable] [PATCH v2] net/failsafe: report actual device capabilities
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
2018-10-01 14:38 ` Ferruh Yigit
0 siblings, 1 reply; 6+ messages in thread
From: Gaëtan Rivet @ 2018-09-26 11:58 UTC (permalink / raw)
To: Andrew Rybchenko; +Cc: dev, Ferruh Yigit, Igor Romanov, stable
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-stable] [PATCH v2] net/failsafe: report actual device capabilities
2018-09-26 11:58 ` Gaëtan Rivet
@ 2018-10-01 14:38 ` Ferruh Yigit
0 siblings, 0 replies; 6+ messages in thread
From: Ferruh Yigit @ 2018-10-01 14:38 UTC (permalink / raw)
To: Gaëtan Rivet, Andrew Rybchenko; +Cc: dev, Igor Romanov, stable
On 9/26/2018 12:58 PM, Gaëtan Rivet wrote:
> 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>
Applied to dpdk-next-net/master, thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-10-01 14:38 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2018-10-01 14:38 ` Ferruh Yigit
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).