diff mbox

[API-NEXT,1/2] api: pktio: Adds interface loopback mode

Message ID 1461662037-15637-1-git-send-email-bala.manoharan@linaro.org
State Superseded
Headers show

Commit Message

Balasubramanian Manoharan April 26, 2016, 9:13 a.m. UTC
Adds loopback interface mode as a configurable parameter in
odp_pktio_config_t structure. Support for loopback is an optional feature
and should be checked in the interface capability before enabling the same.

Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>
---
 include/odp/api/spec/packet_io.h | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

Comments

Maxim Uvarov April 26, 2016, 10 a.m. UTC | #1
Bala, you missing word PATCH in [PATCH API-NEXT]. Not sure about other 
but that does not match my email filters.
No need to resend it, only note for future.

Maxim.

On 04/26/16 12:13, Balasubramanian Manoharan wrote:
> Adds loopback interface mode as a configurable parameter in
> odp_pktio_config_t structure. Support for loopback is an optional feature
> and should be checked in the interface capability before enabling the same.
>
> Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>
> ---
>   include/odp/api/spec/packet_io.h | 14 ++++++++++++++
>   1 file changed, 14 insertions(+)
>
> diff --git a/include/odp/api/spec/packet_io.h b/include/odp/api/spec/packet_io.h
> index 7c29176..76a9d5d 100644
> --- a/include/odp/api/spec/packet_io.h
> +++ b/include/odp/api/spec/packet_io.h
> @@ -362,6 +362,14 @@ typedef struct odp_pktio_config_t {
>   	 *  Default value for all bits is zero. */
>   	odp_pktout_config_opt_t pktout;
>   
> +	/** Interface loopback mode
> +	 *
> +	 * In this mode the packets sent out through the interface is
> +	 * looped back to the system. Supporting loopback mode is an
> +	 * optional feature per interface and should be queries in the
> +	 * interface capability before enabling the same. */
> +	odp_bool_t enable_loop;
> +
>   } odp_pktio_config_t;
>   
>   /**
> @@ -399,6 +407,12 @@ typedef struct odp_pktio_capability_t {
>   	 * A bit set to one indicates a supported operation. All other bits are
>   	 * set to zero. */
>   	odp_pktio_set_op_t set_op;
> +
> +	/** Support of Loopback mode
> +	 *
> +	 * A boolean to denote whether loop back mode is supported on this
> +	 * specific interface. */
> +	odp_bool_t loop_supported;
>   } odp_pktio_capability_t;
>   
>   /**
Maxim Uvarov April 26, 2016, 11:27 a.m. UTC | #2
Petri, please not forget to review it before leaving today.

Thank you,
Maxim.

On 04/26/16 12:13, Balasubramanian Manoharan wrote:
> Adds loopback interface mode as a configurable parameter in
> odp_pktio_config_t structure. Support for loopback is an optional feature
> and should be checked in the interface capability before enabling the same.
>
> Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>
> ---
>   include/odp/api/spec/packet_io.h | 14 ++++++++++++++
>   1 file changed, 14 insertions(+)
>
> diff --git a/include/odp/api/spec/packet_io.h b/include/odp/api/spec/packet_io.h
> index 7c29176..76a9d5d 100644
> --- a/include/odp/api/spec/packet_io.h
> +++ b/include/odp/api/spec/packet_io.h
> @@ -362,6 +362,14 @@ typedef struct odp_pktio_config_t {
>   	 *  Default value for all bits is zero. */
>   	odp_pktout_config_opt_t pktout;
>   
> +	/** Interface loopback mode
> +	 *
> +	 * In this mode the packets sent out through the interface is
> +	 * looped back to the system. Supporting loopback mode is an
> +	 * optional feature per interface and should be queries in the
> +	 * interface capability before enabling the same. */
> +	odp_bool_t enable_loop;
> +
>   } odp_pktio_config_t;
>   
>   /**
> @@ -399,6 +407,12 @@ typedef struct odp_pktio_capability_t {
>   	 * A bit set to one indicates a supported operation. All other bits are
>   	 * set to zero. */
>   	odp_pktio_set_op_t set_op;
> +
> +	/** Support of Loopback mode
> +	 *
> +	 * A boolean to denote whether loop back mode is supported on this
> +	 * specific interface. */
> +	odp_bool_t loop_supported;
>   } odp_pktio_capability_t;
>   
>   /**
Balasubramanian Manoharan April 26, 2016, 11:42 a.m. UTC | #3
Thanks Maxim. Will take note of it in the future.

Regards,
Bala

On 26 April 2016 at 15:30, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:

> Bala, you missing word PATCH in [PATCH API-NEXT]. Not sure about other but

> that does not match my email filters.

> No need to resend it, only note for future.

>

> Maxim.

>

>

> On 04/26/16 12:13, Balasubramanian Manoharan wrote:

>

>> Adds loopback interface mode as a configurable parameter in

>> odp_pktio_config_t structure. Support for loopback is an optional feature

>> and should be checked in the interface capability before enabling the

>> same.

>>

>> Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>

>> ---

>>   include/odp/api/spec/packet_io.h | 14 ++++++++++++++

>>   1 file changed, 14 insertions(+)

>>

>> diff --git a/include/odp/api/spec/packet_io.h

>> b/include/odp/api/spec/packet_io.h

>> index 7c29176..76a9d5d 100644

>> --- a/include/odp/api/spec/packet_io.h

>> +++ b/include/odp/api/spec/packet_io.h

>> @@ -362,6 +362,14 @@ typedef struct odp_pktio_config_t {

>>          *  Default value for all bits is zero. */

>>         odp_pktout_config_opt_t pktout;

>>   +     /** Interface loopback mode

>> +        *

>> +        * In this mode the packets sent out through the interface is

>> +        * looped back to the system. Supporting loopback mode is an

>> +        * optional feature per interface and should be queries in the

>> +        * interface capability before enabling the same. */

>> +       odp_bool_t enable_loop;

>> +

>>   } odp_pktio_config_t;

>>     /**

>> @@ -399,6 +407,12 @@ typedef struct odp_pktio_capability_t {

>>          * A bit set to one indicates a supported operation. All other

>> bits are

>>          * set to zero. */

>>         odp_pktio_set_op_t set_op;

>> +

>> +       /** Support of Loopback mode

>> +        *

>> +        * A boolean to denote whether loop back mode is supported on this

>> +        * specific interface. */

>> +       odp_bool_t loop_supported;

>>   } odp_pktio_capability_t;

>>     /**

>>

>

> _______________________________________________

> lng-odp mailing list

> lng-odp@lists.linaro.org

> https://lists.linaro.org/mailman/listinfo/lng-odp

>
Balasubramanian Manoharan April 26, 2016, 11:43 a.m. UTC | #4
On 26 April 2016 at 17:01, Savolainen, Petri (Nokia - FI/Espoo) <
petri.savolainen@nokia.com> wrote:

>

>

> > -----Original Message-----

> > From: EXT Balasubramanian Manoharan [mailto:bala.manoharan@linaro.org]

> > Sent: Tuesday, April 26, 2016 12:14 PM

> > To: lng-odp@lists.linaro.org

> > Cc: Savolainen, Petri (Nokia - FI/Espoo) <petri.savolainen@nokia.com>;

> > Balasubramanian Manoharan <bala.manoharan@linaro.org>

> > Subject: [API-NEXT 1/2] api: pktio: Adds interface loopback mode

> >

> > Adds loopback interface mode as a configurable parameter in

> > odp_pktio_config_t structure. Support for loopback is an optional feature

> > and should be checked in the interface capability before enabling the

> > same.

> >

> > Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>

> > ---

> >  include/odp/api/spec/packet_io.h | 14 ++++++++++++++

> >  1 file changed, 14 insertions(+)

> >

> > diff --git a/include/odp/api/spec/packet_io.h

> > b/include/odp/api/spec/packet_io.h

> > index 7c29176..76a9d5d 100644

> > --- a/include/odp/api/spec/packet_io.h

> > +++ b/include/odp/api/spec/packet_io.h

> > @@ -362,6 +362,14 @@ typedef struct odp_pktio_config_t {

> >        *  Default value for all bits is zero. */

> >       odp_pktout_config_opt_t pktout;

> >

> > +     /** Interface loopback mode

> > +      *

> > +      * In this mode the packets sent out through the interface is

> > +      * looped back to the system. Supporting loopback mode is an

>

> I think this could be more explicit that packets sent out are received

> from the input of _the same interface_. "Back to system" would allow input

> from any interface and I think that's not the intention.

>


Okay. I will change in the next version.

Regards,
Bala

>

> -Petri

>

>

> > +      * optional feature per interface and should be queries in the

> > +      * interface capability before enabling the same. */

> > +     odp_bool_t enable_loop;

> > +

> >  } odp_pktio_config_t;

> >

> >  /**

> > @@ -399,6 +407,12 @@ typedef struct odp_pktio_capability_t {

> >        * A bit set to one indicates a supported operation. All other bits

> > are

> >        * set to zero. */

> >       odp_pktio_set_op_t set_op;

> > +

> > +     /** Support of Loopback mode

> > +      *

> > +      * A boolean to denote whether loop back mode is supported on this

> > +      * specific interface. */

> > +     odp_bool_t loop_supported;

> >  } odp_pktio_capability_t;

> >

> >  /**

> > --

> > 1.9.1

>

>
diff mbox

Patch

diff --git a/include/odp/api/spec/packet_io.h b/include/odp/api/spec/packet_io.h
index 7c29176..76a9d5d 100644
--- a/include/odp/api/spec/packet_io.h
+++ b/include/odp/api/spec/packet_io.h
@@ -362,6 +362,14 @@  typedef struct odp_pktio_config_t {
 	 *  Default value for all bits is zero. */
 	odp_pktout_config_opt_t pktout;
 
+	/** Interface loopback mode
+	 *
+	 * In this mode the packets sent out through the interface is
+	 * looped back to the system. Supporting loopback mode is an
+	 * optional feature per interface and should be queries in the
+	 * interface capability before enabling the same. */
+	odp_bool_t enable_loop;
+
 } odp_pktio_config_t;
 
 /**
@@ -399,6 +407,12 @@  typedef struct odp_pktio_capability_t {
 	 * A bit set to one indicates a supported operation. All other bits are
 	 * set to zero. */
 	odp_pktio_set_op_t set_op;
+
+	/** Support of Loopback mode
+	 *
+	 * A boolean to denote whether loop back mode is supported on this
+	 * specific interface. */
+	odp_bool_t loop_supported;
 } odp_pktio_capability_t;
 
 /**