diff mbox

[PATCHv2,2/2] test: l2fwd: start pktio in burst mode

Message ID 1440693159-8111-3-git-send-email-maxim.uvarov@linaro.org
State Accepted
Commit 922f3ffa0cc0bf97c30698461f88d2c6fe0034fb
Headers show

Commit Message

Maxim Uvarov Aug. 27, 2015, 4:32 p.m. UTC
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
---
 test/performance/odp_l2fwd.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

Comments

Bill Fischofer Aug. 31, 2015, 1:10 p.m. UTC | #1
On Thu, Aug 27, 2015 at 11:32 AM, Maxim Uvarov <maxim.uvarov@linaro.org>
wrote:

> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
>

Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>


> ---
>  test/performance/odp_l2fwd.c | 14 ++++++++------
>  1 file changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/test/performance/odp_l2fwd.c b/test/performance/odp_l2fwd.c
> index b25b978..64fc1b2 100644
> --- a/test/performance/odp_l2fwd.c
> +++ b/test/performance/odp_l2fwd.c
> @@ -317,12 +317,6 @@ static odp_pktio_t create_pktio(const char *dev,
> odp_pool_t pool,
>                 return ODP_PKTIO_INVALID;
>         }
>
> -       ret = odp_pktio_start(pktio);
> -       if (ret != 0) {
> -               LOG_ERR("Error: unable to start %s\n", dev);
> -               return ODP_PKTIO_INVALID;
> -       }
> -
>         return pktio;
>  }
>
> @@ -462,6 +456,14 @@ int main(int argc, char *argv[])
>                                                    pool,
> gbl_args->appl.mode);
>                 if (gbl_args->pktios[i] == ODP_PKTIO_INVALID)
>                         exit(EXIT_FAILURE);
> +
> +               ret = odp_pktio_start(gbl_args->pktios[i]);
> +               if (ret) {
> +                       LOG_ERR("Error: unable to start %s\n",
> +                               gbl_args->appl.if_names[i]);
> +                       exit(EXIT_FAILURE);
> +               }
> +
>         }
>         gbl_args->pktios[i] = ODP_PKTIO_INVALID;
>
> --
> 1.9.1
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/lng-odp
>
diff mbox

Patch

diff --git a/test/performance/odp_l2fwd.c b/test/performance/odp_l2fwd.c
index b25b978..64fc1b2 100644
--- a/test/performance/odp_l2fwd.c
+++ b/test/performance/odp_l2fwd.c
@@ -317,12 +317,6 @@  static odp_pktio_t create_pktio(const char *dev, odp_pool_t pool,
 		return ODP_PKTIO_INVALID;
 	}
 
-	ret = odp_pktio_start(pktio);
-	if (ret != 0) {
-		LOG_ERR("Error: unable to start %s\n", dev);
-		return ODP_PKTIO_INVALID;
-	}
-
 	return pktio;
 }
 
@@ -462,6 +456,14 @@  int main(int argc, char *argv[])
 						   pool, gbl_args->appl.mode);
 		if (gbl_args->pktios[i] == ODP_PKTIO_INVALID)
 			exit(EXIT_FAILURE);
+
+		ret = odp_pktio_start(gbl_args->pktios[i]);
+		if (ret) {
+			LOG_ERR("Error: unable to start %s\n",
+				gbl_args->appl.if_names[i]);
+			exit(EXIT_FAILURE);
+		}
+
 	}
 	gbl_args->pktios[i] = ODP_PKTIO_INVALID;