diff mbox series

[2/4] doc: specify RTE flow create behaviour

Message ID 20210721155816.188795-3-xhavli56@stud.fit.vutbr.cz (mailing list archive)
State New
Delegated to: Ferruh Yigit
Headers show
Series doc: update RTE flow rule and bonding related info | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Havlík Martin July 21, 2021, 3:58 p.m. UTC
The ability to create RTE flow rules, depending on
port status, can and does differ between PMDs.
Now the doc reflects that.

Signed-off-by: Martin Havlik <xhavli56@stud.fit.vutbr.cz>
---
 doc/guides/prog_guide/rte_flow.rst | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Stephen Hemminger July 21, 2021, 6:16 p.m. UTC | #1
On Wed, 21 Jul 2021 17:58:14 +0200
Martin Havlik <xhavli56@stud.fit.vutbr.cz> wrote:

> The ability to create RTE flow rules, depending on
> port status, can and does differ between PMDs.
> Now the doc reflects that.
> 
> Signed-off-by: Martin Havlik <xhavli56@stud.fit.vutbr.cz>
> ---
>  doc/guides/prog_guide/rte_flow.rst | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst
> index 2b42d5ec8c..2988e3328a 100644
> --- a/doc/guides/prog_guide/rte_flow.rst
> +++ b/doc/guides/prog_guide/rte_flow.rst
> @@ -3097,6 +3097,10 @@ actually created and a handle returned.
>                     const struct rte_flow_action *actions[],
>                     struct rte_flow_error *error);
>  
> +The ability to create a flow rule may depend on the status (started/stopped)
> +of the port for which the rule is being created. This behaviour is
> +PMD specific. Seek relevant PMD documentation for details.

Any PMD specific behavior in DPDK is an anathema to application developers
and should be considered a design flaw!
Andrew Rybchenko July 22, 2021, 10:33 a.m. UTC | #2
On 7/21/21 9:16 PM, Stephen Hemminger wrote:
> On Wed, 21 Jul 2021 17:58:14 +0200
> Martin Havlik <xhavli56@stud.fit.vutbr.cz> wrote:
> 
>> The ability to create RTE flow rules, depending on
>> port status, can and does differ between PMDs.
>> Now the doc reflects that.
>>
>> Signed-off-by: Martin Havlik <xhavli56@stud.fit.vutbr.cz>
>> ---
>>   doc/guides/prog_guide/rte_flow.rst | 4 ++++
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst
>> index 2b42d5ec8c..2988e3328a 100644
>> --- a/doc/guides/prog_guide/rte_flow.rst
>> +++ b/doc/guides/prog_guide/rte_flow.rst
>> @@ -3097,6 +3097,10 @@ actually created and a handle returned.
>>                      const struct rte_flow_action *actions[],
>>                      struct rte_flow_error *error);
>>   
>> +The ability to create a flow rule may depend on the status (started/stopped)
>> +of the port for which the rule is being created. This behaviour is
>> +PMD specific. Seek relevant PMD documentation for details.
> 
> Any PMD specific behavior in DPDK is an anathema to application developers
> and should be considered a design flaw!
> 

+1
Ajit Khaparde July 26, 2021, 3:07 a.m. UTC | #3
On Wed, Jul 21, 2021 at 11:16 AM Stephen Hemminger
<stephen@networkplumber.org> wrote:
>
> On Wed, 21 Jul 2021 17:58:14 +0200
> Martin Havlik <xhavli56@stud.fit.vutbr.cz> wrote:
>
> > The ability to create RTE flow rules, depending on
> > port status, can and does differ between PMDs.
> > Now the doc reflects that.
> >
> > Signed-off-by: Martin Havlik <xhavli56@stud.fit.vutbr.cz>
> > ---
> >  doc/guides/prog_guide/rte_flow.rst | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst
> > index 2b42d5ec8c..2988e3328a 100644
> > --- a/doc/guides/prog_guide/rte_flow.rst
> > +++ b/doc/guides/prog_guide/rte_flow.rst
> > @@ -3097,6 +3097,10 @@ actually created and a handle returned.
> >                     const struct rte_flow_action *actions[],
> >                     struct rte_flow_error *error);
> >
> > +The ability to create a flow rule may depend on the status (started/stopped)
> > +of the port for which the rule is being created. This behaviour is
> > +PMD specific. Seek relevant PMD documentation for details.
>
> Any PMD specific behavior in DPDK is an anathema to application developers
> and should be considered a design flaw!
But it is better to be clear about the behavior.
Drivers and their underlying devices may need certain resources to be
initialized before flows could be created. There may be some drivers
who do not need that.
Specifying ports to be started would cover both the cases.

Maybe then we can say that "some drivers may _not_ need the port to be
started. Check PMD specific documentation".
Ori Kam July 26, 2021, 6:46 a.m. UTC | #4
Hi

> -----Original Message-----
> From: Ajit Khaparde <ajit.khaparde@broadcom.com>
> Sent: Monday, July 26, 2021 6:07 AM
> 
> On Wed, Jul 21, 2021 at 11:16 AM Stephen Hemminger
> <stephen@networkplumber.org> wrote:
> >
> > On Wed, 21 Jul 2021 17:58:14 +0200
> > Martin Havlik <xhavli56@stud.fit.vutbr.cz> wrote:
> >
> > > The ability to create RTE flow rules, depending on
> > > port status, can and does differ between PMDs.
> > > Now the doc reflects that.
> > >
> > > Signed-off-by: Martin Havlik <xhavli56@stud.fit.vutbr.cz>
> > > ---
> > >  doc/guides/prog_guide/rte_flow.rst | 4 ++++
> > >  1 file changed, 4 insertions(+)
> > >
> > > diff --git a/doc/guides/prog_guide/rte_flow.rst
> b/doc/guides/prog_guide/rte_flow.rst
> > > index 2b42d5ec8c..2988e3328a 100644
> > > --- a/doc/guides/prog_guide/rte_flow.rst
> > > +++ b/doc/guides/prog_guide/rte_flow.rst
> > > @@ -3097,6 +3097,10 @@ actually created and a handle returned.
> > >                     const struct rte_flow_action *actions[],
> > >                     struct rte_flow_error *error);
> > >
> > > +The ability to create a flow rule may depend on the status
> (started/stopped)
> > > +of the port for which the rule is being created. This behaviour is
> > > +PMD specific. Seek relevant PMD documentation for details.
> >
> > Any PMD specific behavior in DPDK is an anathema to application
> developers
> > and should be considered a design flaw!
> But it is better to be clear about the behavior.
> Drivers and their underlying devices may need certain resources to be
> initialized before flows could be created. There may be some drivers
> who do not need that.
> Specifying ports to be started would cover both the cases.
> 
> Maybe then we can say that "some drivers may _not_ need the port to be
> started. Check PMD specific documentation".

I don't like the negative approach, if a driver doesn't have any issues with something
it doesn't need to say it support this, the driver may say if it wants to emphasize
but this shouldn't be the default.
I prefer the original suggestion, maybe we can add device cap for this, just like
if a the PMD allows modifying queues after start.

Best
Ori
Ajit Khaparde July 26, 2021, 2:52 p.m. UTC | #5
On Sun, Jul 25, 2021 at 11:46 PM Ori Kam <orika@nvidia.com> wrote:
>
> Hi
>
> > -----Original Message-----
> > From: Ajit Khaparde <ajit.khaparde@broadcom.com>
> > Sent: Monday, July 26, 2021 6:07 AM
> >
> > On Wed, Jul 21, 2021 at 11:16 AM Stephen Hemminger
> > <stephen@networkplumber.org> wrote:
> > >
> > > On Wed, 21 Jul 2021 17:58:14 +0200
> > > Martin Havlik <xhavli56@stud.fit.vutbr.cz> wrote:
> > >
> > > > The ability to create RTE flow rules, depending on
> > > > port status, can and does differ between PMDs.
> > > > Now the doc reflects that.
> > > >
> > > > Signed-off-by: Martin Havlik <xhavli56@stud.fit.vutbr.cz>
> > > > ---
> > > >  doc/guides/prog_guide/rte_flow.rst | 4 ++++
> > > >  1 file changed, 4 insertions(+)
> > > >
> > > > diff --git a/doc/guides/prog_guide/rte_flow.rst
> > b/doc/guides/prog_guide/rte_flow.rst
> > > > index 2b42d5ec8c..2988e3328a 100644
> > > > --- a/doc/guides/prog_guide/rte_flow.rst
> > > > +++ b/doc/guides/prog_guide/rte_flow.rst
> > > > @@ -3097,6 +3097,10 @@ actually created and a handle returned.
> > > >                     const struct rte_flow_action *actions[],
> > > >                     struct rte_flow_error *error);
> > > >
> > > > +The ability to create a flow rule may depend on the status
> > (started/stopped)
> > > > +of the port for which the rule is being created. This behaviour is
> > > > +PMD specific. Seek relevant PMD documentation for details.
> > >
> > > Any PMD specific behavior in DPDK is an anathema to application
> > developers
> > > and should be considered a design flaw!
> > But it is better to be clear about the behavior.
> > Drivers and their underlying devices may need certain resources to be
> > initialized before flows could be created. There may be some drivers
> > who do not need that.
> > Specifying ports to be started would cover both the cases.
> >
> > Maybe then we can say that "some drivers may _not_ need the port to be
> > started. Check PMD specific documentation".
>
> I don't like the negative approach, if a driver doesn't have any issues with something
> it doesn't need to say it support this, the driver may say if it wants to emphasize
> but this shouldn't be the default.
> I prefer the original suggestion, maybe we can add device cap for this, just like
> if a the PMD allows modifying queues after start.
+1.
Device cap should help tie this behavior.

>
> Best
> Ori
>
diff mbox series

Patch

diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst
index 2b42d5ec8c..2988e3328a 100644
--- a/doc/guides/prog_guide/rte_flow.rst
+++ b/doc/guides/prog_guide/rte_flow.rst
@@ -3097,6 +3097,10 @@  actually created and a handle returned.
                    const struct rte_flow_action *actions[],
                    struct rte_flow_error *error);
 
+The ability to create a flow rule may depend on the status (started/stopped)
+of the port for which the rule is being created. This behaviour is
+PMD specific. Seek relevant PMD documentation for details.
+
 Arguments:
 
 - ``port_id``: port identifier of Ethernet device.