DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/2] lib/ethdev: introduce RTE_ETH_DEV_CAPA_FLOW_CREATE_BEFORE_START
@ 2021-10-05 17:19 Martin Havlik
  2021-10-06 17:13 ` Ajit Khaparde
  2021-10-12 12:02 ` Andrew Rybchenko
  0 siblings, 2 replies; 4+ messages in thread
From: Martin Havlik @ 2021-10-05 17:19 UTC (permalink / raw)
  To: xhavli56, Thomas Monjalon, Ferruh Yigit, Andrew Rybchenko,
	Min Hu (Connor),
	Ajit Khaparde, Xueming Li, Bing Zhao, Chengchang Tang
  Cc: Jan Viktorin, dev, chas3, haiyue.wang, ivan.ilchenko,
	aman.deep.singh, kirankn, lirongqing

Not all PMDs allow RTE flow rules to be created before start.
This capability will be set for the ones that allow it.

Signed-off-by: Martin Havlik <xhavli56@stud.fit.vutbr.cz>
---
 lib/ethdev/rte_ethdev.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
index bef24173cf..3115a6fccf 100644
--- a/lib/ethdev/rte_ethdev.h
+++ b/lib/ethdev/rte_ethdev.h
@@ -1448,6 +1448,8 @@ struct rte_eth_conf {
 #define RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP 0x00000001
 /** Device supports Tx queue setup after device started. */
 #define RTE_ETH_DEV_CAPA_RUNTIME_TX_QUEUE_SETUP 0x00000002
+/** Device supports RTE Flow rule creation before device start. */
+#define RTE_ETH_DEV_CAPA_FLOW_CREATE_BEFORE_START 0x00000004
 /**@}*/
 
 /*
-- 
2.27.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH 1/2] lib/ethdev: introduce RTE_ETH_DEV_CAPA_FLOW_CREATE_BEFORE_START
  2021-10-05 17:19 [dpdk-dev] [PATCH 1/2] lib/ethdev: introduce RTE_ETH_DEV_CAPA_FLOW_CREATE_BEFORE_START Martin Havlik
@ 2021-10-06 17:13 ` Ajit Khaparde
  2021-10-12 12:02 ` Andrew Rybchenko
  1 sibling, 0 replies; 4+ messages in thread
From: Ajit Khaparde @ 2021-10-06 17:13 UTC (permalink / raw)
  To: Martin Havlik
  Cc: Thomas Monjalon, Ferruh Yigit, Andrew Rybchenko, Min Hu (Connor),
	Xueming Li, Bing Zhao, Chengchang Tang, Jan Viktorin, dpdk-dev,
	Chas Williams, Haiyue Wang, Ivan Ilchenko, Singh Aman Deep,
	kirankn, lirongqing

[-- Attachment #1: Type: text/plain, Size: 969 bytes --]

On Tue, Oct 5, 2021 at 10:29 AM Martin Havlik
<xhavli56@stud.fit.vutbr.cz> wrote:
>
> Not all PMDs allow RTE flow rules to be created before start.
> This capability will be set for the ones that allow it.
>
> Signed-off-by: Martin Havlik <xhavli56@stud.fit.vutbr.cz>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>


> ---
>  lib/ethdev/rte_ethdev.h | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
> index bef24173cf..3115a6fccf 100644
> --- a/lib/ethdev/rte_ethdev.h
> +++ b/lib/ethdev/rte_ethdev.h
> @@ -1448,6 +1448,8 @@ struct rte_eth_conf {
>  #define RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP 0x00000001
>  /** Device supports Tx queue setup after device started. */
>  #define RTE_ETH_DEV_CAPA_RUNTIME_TX_QUEUE_SETUP 0x00000002
> +/** Device supports RTE Flow rule creation before device start. */
> +#define RTE_ETH_DEV_CAPA_FLOW_CREATE_BEFORE_START 0x00000004
>  /**@}*/
>
>  /*
> --
> 2.27.0
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH 1/2] lib/ethdev: introduce RTE_ETH_DEV_CAPA_FLOW_CREATE_BEFORE_START
  2021-10-05 17:19 [dpdk-dev] [PATCH 1/2] lib/ethdev: introduce RTE_ETH_DEV_CAPA_FLOW_CREATE_BEFORE_START Martin Havlik
  2021-10-06 17:13 ` Ajit Khaparde
@ 2021-10-12 12:02 ` Andrew Rybchenko
  2022-09-26 14:38   ` Thomas Monjalon
  1 sibling, 1 reply; 4+ messages in thread
From: Andrew Rybchenko @ 2021-10-12 12:02 UTC (permalink / raw)
  To: Martin Havlik, Thomas Monjalon, Ferruh Yigit, Min Hu (Connor),
	Ajit Khaparde, Xueming Li, Bing Zhao, Chengchang Tang
  Cc: Jan Viktorin, dev, chas3, haiyue.wang, ivan.ilchenko,
	aman.deep.singh, kirankn, lirongqing, Ori Kam

Summary prefix should be just "ethdev: " and summary should
be human readable. It should not refer to defines etc.

On 10/5/21 8:19 PM, Martin Havlik wrote:
> Not all PMDs allow RTE flow rules to be created before start.
> This capability will be set for the ones that allow it.
> 
> Signed-off-by: Martin Havlik <xhavli56@stud.fit.vutbr.cz>
> ---
>  lib/ethdev/rte_ethdev.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
> index bef24173cf..3115a6fccf 100644
> --- a/lib/ethdev/rte_ethdev.h
> +++ b/lib/ethdev/rte_ethdev.h
> @@ -1448,6 +1448,8 @@ struct rte_eth_conf {
>  #define RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP 0x00000001
>  /** Device supports Tx queue setup after device started. */
>  #define RTE_ETH_DEV_CAPA_RUNTIME_TX_QUEUE_SETUP 0x00000002
> +/** Device supports RTE Flow rule creation before device start. */
> +#define RTE_ETH_DEV_CAPA_FLOW_CREATE_BEFORE_START 0x00000004
>  /**@}*/
>  
>  /*
> 


I think that rte_flow_create() should check
the capability in !dev->data->dev_started case
and return error if capability is not advertised.
The only problem here is to avoid dev_info get on
each rte_flow_create() call.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH 1/2] lib/ethdev: introduce RTE_ETH_DEV_CAPA_FLOW_CREATE_BEFORE_START
  2021-10-12 12:02 ` Andrew Rybchenko
@ 2022-09-26 14:38   ` Thomas Monjalon
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2022-09-26 14:38 UTC (permalink / raw)
  To: Martin Havlik, Ferruh Yigit, Min Hu (Connor),
	Ajit Khaparde, Xueming Li, Bing Zhao, Chengchang Tang, dev,
	orika
  Cc: Jan Viktorin, dev, chas3, haiyue.wang, ivan.ilchenko,
	aman.deep.singh, kirankn, lirongqing, Andrew Rybchenko

There was no follow up to this patch.

Ori, could you give your opinion please?


12/10/2021 14:02, Andrew Rybchenko:
> Summary prefix should be just "ethdev: " and summary should
> be human readable. It should not refer to defines etc.
> 
> On 10/5/21 8:19 PM, Martin Havlik wrote:
> > Not all PMDs allow RTE flow rules to be created before start.
> > This capability will be set for the ones that allow it.
> > 
> > Signed-off-by: Martin Havlik <xhavli56@stud.fit.vutbr.cz>
> > ---
> >  lib/ethdev/rte_ethdev.h | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
> > index bef24173cf..3115a6fccf 100644
> > --- a/lib/ethdev/rte_ethdev.h
> > +++ b/lib/ethdev/rte_ethdev.h
> > @@ -1448,6 +1448,8 @@ struct rte_eth_conf {
> >  #define RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP 0x00000001
> >  /** Device supports Tx queue setup after device started. */
> >  #define RTE_ETH_DEV_CAPA_RUNTIME_TX_QUEUE_SETUP 0x00000002
> > +/** Device supports RTE Flow rule creation before device start. */
> > +#define RTE_ETH_DEV_CAPA_FLOW_CREATE_BEFORE_START 0x00000004
> >  /**@}*/
> >  
> >  /*
> > 
> 
> 
> I think that rte_flow_create() should check
> the capability in !dev->data->dev_started case
> and return error if capability is not advertised.
> The only problem here is to avoid dev_info get on
> each rte_flow_create() call.
> 






^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-09-26 14:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-05 17:19 [dpdk-dev] [PATCH 1/2] lib/ethdev: introduce RTE_ETH_DEV_CAPA_FLOW_CREATE_BEFORE_START Martin Havlik
2021-10-06 17:13 ` Ajit Khaparde
2021-10-12 12:02 ` Andrew Rybchenko
2022-09-26 14:38   ` Thomas Monjalon

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).