diff mbox

example: ipsec: Poll mode fix.

Message ID 1471357336-22599-1-git-send-email-nikhil.agarwal@linaro.org
State New
Headers show

Commit Message

Nikhil Agarwal Aug. 16, 2016, 2:22 p.m. UTC
Adding pktio queues in poll mode to polled queues.

Signed-off-by: gagandeep singh <g.singh@nxp.com>

Signed-off-by: Nikhil Agarwal <nikhil.agarwal@linaro.org>

---
 example/ipsec/odp_ipsec.c | 6 ++++++
 1 file changed, 6 insertions(+)

-- 
2.8.2

Comments

Maxim Uvarov Aug. 18, 2016, 2:16 p.m. UTC | #1
ping. Please review.

Maxim.

On 08/16/16 17:22, Nikhil Agarwal wrote:
> Adding pktio queues in poll mode to polled queues.

>

> Signed-off-by: gagandeep singh <g.singh@nxp.com>

> Signed-off-by: Nikhil Agarwal <nikhil.agarwal@linaro.org>

> ---

>   example/ipsec/odp_ipsec.c | 6 ++++++

>   1 file changed, 6 insertions(+)

>

> diff --git a/example/ipsec/odp_ipsec.c b/example/ipsec/odp_ipsec.c

> index 6a9a9fe..89ba1e9 100644

> --- a/example/ipsec/odp_ipsec.c

> +++ b/example/ipsec/odp_ipsec.c

> @@ -561,6 +561,12 @@ void initialize_intf(char *intf)

>   	       odp_queue_to_u64(inq),

>   	       mac_addr_str(src_mac_str, src_mac));

>   

> +	if (pktio_param.in_mode == ODP_PKTIN_MODE_QUEUE) {

> +		poll_queues[num_polled_queues++] = inq;

> +		printf("%s: adding %"PRIu64"\n", __func__,

> +		       odp_queue_to_u64(inq));

> +	}

> +

>   	/* Resolve any routes using this interface for output */

>   	resolve_fwd_db(intf, pktout, src_mac);

>   }
Nikhil Agarwal Aug. 29, 2016, 6:29 a.m. UTC | #2
Ping. Please review.

Regards
Nikhil

On 16 August 2016 at 19:52, Nikhil Agarwal <nikhil.agarwal@linaro.org>
wrote:

> Adding pktio queues in poll mode to polled queues.

>

> Signed-off-by: gagandeep singh <g.singh@nxp.com>

> Signed-off-by: Nikhil Agarwal <nikhil.agarwal@linaro.org>

> ---

>  example/ipsec/odp_ipsec.c | 6 ++++++

>  1 file changed, 6 insertions(+)

>

> diff --git a/example/ipsec/odp_ipsec.c b/example/ipsec/odp_ipsec.c

> index 6a9a9fe..89ba1e9 100644

> --- a/example/ipsec/odp_ipsec.c

> +++ b/example/ipsec/odp_ipsec.c

> @@ -561,6 +561,12 @@ void initialize_intf(char *intf)

>                odp_queue_to_u64(inq),

>                mac_addr_str(src_mac_str, src_mac));

>

> +       if (pktio_param.in_mode == ODP_PKTIN_MODE_QUEUE) {

> +               poll_queues[num_polled_queues++] = inq;

> +               printf("%s: adding %"PRIu64"\n", __func__,

> +                      odp_queue_to_u64(inq));

> +       }

> +

>         /* Resolve any routes using this interface for output */

>         resolve_fwd_db(intf, pktout, src_mac);

>  }

> --

> 2.8.2

>

>
Maxim Uvarov Sept. 8, 2016, 4:06 p.m. UTC | #3
Hello Nikhil,

I think it's better to add inq to poll before pktio start.

Maxim.

On 08/16/16 17:22, Nikhil Agarwal wrote:
> Adding pktio queues in poll mode to polled queues.

>

> Signed-off-by: gagandeep singh <g.singh@nxp.com>

> Signed-off-by: Nikhil Agarwal <nikhil.agarwal@linaro.org>

> ---

>   example/ipsec/odp_ipsec.c | 6 ++++++

>   1 file changed, 6 insertions(+)

>

> diff --git a/example/ipsec/odp_ipsec.c b/example/ipsec/odp_ipsec.c

> index 6a9a9fe..89ba1e9 100644

> --- a/example/ipsec/odp_ipsec.c

> +++ b/example/ipsec/odp_ipsec.c

> @@ -561,6 +561,12 @@ void initialize_intf(char *intf)

>   	       odp_queue_to_u64(inq),

>   	       mac_addr_str(src_mac_str, src_mac));

>   

> +	if (pktio_param.in_mode == ODP_PKTIN_MODE_QUEUE) {

> +		poll_queues[num_polled_queues++] = inq;

> +		printf("%s: adding %"PRIu64"\n", __func__,

> +		       odp_queue_to_u64(inq));

> +	}

> +

>   	/* Resolve any routes using this interface for output */

>   	resolve_fwd_db(intf, pktout, src_mac);

>   }
diff mbox

Patch

diff --git a/example/ipsec/odp_ipsec.c b/example/ipsec/odp_ipsec.c
index 6a9a9fe..89ba1e9 100644
--- a/example/ipsec/odp_ipsec.c
+++ b/example/ipsec/odp_ipsec.c
@@ -561,6 +561,12 @@  void initialize_intf(char *intf)
 	       odp_queue_to_u64(inq),
 	       mac_addr_str(src_mac_str, src_mac));
 
+	if (pktio_param.in_mode == ODP_PKTIN_MODE_QUEUE) {
+		poll_queues[num_polled_queues++] = inq;
+		printf("%s: adding %"PRIu64"\n", __func__,
+		       odp_queue_to_u64(inq));
+	}
+
 	/* Resolve any routes using this interface for output */
 	resolve_fwd_db(intf, pktout, src_mac);
 }