From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2064CA0561; Thu, 4 Mar 2021 17:57:27 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6380B22A2D2; Thu, 4 Mar 2021 17:57:01 +0100 (CET) Received: from mail-qk1-f173.google.com (mail-qk1-f173.google.com [209.85.222.173]) by mails.dpdk.org (Postfix) with ESMTP id 55D9C22A2EE for ; Thu, 4 Mar 2021 17:56:59 +0100 (CET) Received: by mail-qk1-f173.google.com with SMTP id n79so16861328qke.3 for ; Thu, 04 Mar 2021 08:56:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=atomicrules-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=oUrzvdBmLAKD7OHVuiO1DpIWKQDAtbHS0z3a+WQ/6a8=; b=K/60FCwXdo7iAshcAYfAJxZXJNOE6DxM4z7IRUOHrmf1MgWK0+xCU55PYPuO7RH7wr ChpTAX9MEECmnUpHo5fGnbaJPDl6IkXQtoXGJ/drCf/kX6VxATSoCvILr8naa3IdnGcu W6vp4CkQgdStO2GFpgNTXt1kC9+qKupcLGcfTftaAtBA5zTaBlYTGRtewWXnCJ9uXKoE cCYtEbQTFrjpUapSM6KMnTOiUnRPWXxhxcNToz27BSYxHFT4EmPDrILCOzU4EarlJL4B Uxn+iY97gaYEFgXhu7ckyPK/HVDxK1u5tSNXW5w6RogpXKZwAzUhGyXbhatUpnb0n14o mkJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=oUrzvdBmLAKD7OHVuiO1DpIWKQDAtbHS0z3a+WQ/6a8=; b=YZwKYZbbFk1upfF84E/WYhlLJsim5o9jiJusQxnsw0aCnlNwWK36QCncgWI3dZr4BD 1qTIPvCn/YXnx40M5mrXjgSudQF1dVOP6Eop6Vrdy6hQ2UiW829rt/ie8etDCxkGZWEb T43/HnEiX5rT6R3SU2xUefPc/FObuYdgMZ+YcX/eqUOeNsuAqQm5+hn2Z1FNHrDwPftZ JWOuDPgihlES++otKWHgl8VARb9S1E0FpqR7q9kiwn/G05RJUitx50cvuu9gmFOdU1bn SP3GPFnMN5ekjM5s7O8rnLDo+KwjhmH3E5PJuxA9vYvZpxQOTi3S0n0n1HZp0f9DCX0G G2dQ== X-Gm-Message-State: AOAM530FijpRQBnh40gni12oUwfXEguKeJUljQE86sBz3my8qEbwOY1E 2pg+4yB+rmCRgluoG7Tu9+iikovwAs6vMg== X-Google-Smtp-Source: ABdhPJyOD+Nno7RQQASJ7EOb5pZMzNa9Ajah8wRwbxPEiyVEoNQgx4faZA3+jwa1Ml9gnZdUHB36sA== X-Received: by 2002:a37:9e56:: with SMTP id h83mr5050904qke.38.1614877018469; Thu, 04 Mar 2021 08:56:58 -0800 (PST) Received: from z390.czeck.local (pool-72-74-133-40.bstnma.fios.verizon.net. [72.74.133.40]) by smtp.gmail.com with ESMTPSA id 131sm19566764qkl.74.2021.03.04.08.56.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Mar 2021 08:56:57 -0800 (PST) From: Ed Czeck To: dev@dpdk.org, ferruh.yigit@intel.com Cc: shepard.siegel@atomicrules.com, john.miller@atomicrules.com Date: Thu, 4 Mar 2021 11:56:37 -0500 Message-Id: <20210304165637.24658-5-ed.czeck@atomicrules.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210304165637.24658-1-ed.czeck@atomicrules.com> References: <20210304165637.24658-1-ed.czeck@atomicrules.com> Subject: [dpdk-dev] [PATCH v1 5/5] net/ark: localize internal packet generator code X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" preparation for baseband device -- no functional changes remove unnecessary includes Signed-off-by: Ed Czeck --- drivers/net/ark/ark_ethdev.c | 17 ++--------------- drivers/net/ark/ark_pktchkr.c | 4 ---- drivers/net/ark/ark_pktgen.c | 20 ++++++++++++++------ drivers/net/ark/ark_pktgen.h | 1 + 4 files changed, 17 insertions(+), 25 deletions(-) diff --git a/drivers/net/ark/ark_ethdev.c b/drivers/net/ark/ark_ethdev.c index edbcfe8d4..e635d0c89 100644 --- a/drivers/net/ark/ark_ethdev.c +++ b/drivers/net/ark/ark_ethdev.c @@ -532,20 +532,6 @@ eth_ark_dev_configure(struct rte_eth_dev *dev) return 0; } -static void * -delay_pg_start(void *arg) -{ - struct ark_adapter *ark = (struct ark_adapter *)arg; - - /* This function is used exclusively for regression testing, We - * perform a blind sleep here to ensure that the external test - * application has time to setup the test before we generate packets - */ - usleep(100000); - ark_pktgen_run(ark->pg); - return NULL; -} - static int eth_ark_dev_start(struct rte_eth_dev *dev) { @@ -580,7 +566,8 @@ eth_ark_dev_start(struct rte_eth_dev *dev) /* Delay packet generatpr start allow the hardware to be ready * This is only used for sanity checking with internal generator */ - if (pthread_create(&thread, NULL, delay_pg_start, ark)) { + if (pthread_create(&thread, NULL, + ark_pktgen_delay_start, ark->pg)) { ARK_PMD_LOG(ERR, "Could not create pktgen " "starter thread\n"); return -1; diff --git a/drivers/net/ark/ark_pktchkr.c b/drivers/net/ark/ark_pktchkr.c index 0f2d31e5b..84bb567a4 100644 --- a/drivers/net/ark/ark_pktchkr.c +++ b/drivers/net/ark/ark_pktchkr.c @@ -2,13 +2,9 @@ * Copyright (c) 2015-2018 Atomic Rules LLC */ -#include -#include -#include #include #include -#include #include #include "ark_pktchkr.h" diff --git a/drivers/net/ark/ark_pktgen.c b/drivers/net/ark/ark_pktgen.c index ac4322a35..28a44f754 100644 --- a/drivers/net/ark/ark_pktgen.c +++ b/drivers/net/ark/ark_pktgen.c @@ -2,15 +2,9 @@ * Copyright (c) 2015-2018 Atomic Rules LLC */ -#include -#include -#include #include #include -#include - -#include #include #include "ark_pktgen.h" @@ -470,3 +464,17 @@ ark_pktgen_setup(ark_pkt_gen_t handle) ark_pktgen_run(handle); } } + +void * +ark_pktgen_delay_start(void *arg) +{ + struct ark_pkt_gen_inst *inst = (struct ark_pkt_gen_inst *)arg; + + /* This function is used exclusively for regression testing, We + * perform a blind sleep here to ensure that the external test + * application has time to setup the test before we generate packets + */ + usleep(100000); + ark_pktgen_run(inst); + return NULL; +} diff --git a/drivers/net/ark/ark_pktgen.h b/drivers/net/ark/ark_pktgen.h index c61dfee6d..7147fe1bd 100644 --- a/drivers/net/ark/ark_pktgen.h +++ b/drivers/net/ark/ark_pktgen.h @@ -75,5 +75,6 @@ void ark_pktgen_set_hdr_dW(ark_pkt_gen_t handle, uint32_t *hdr); void ark_pktgen_set_start_offset(ark_pkt_gen_t handle, uint32_t x); void ark_pktgen_parse(char *argv); void ark_pktgen_setup(ark_pkt_gen_t handle); +void *ark_pktgen_delay_start(void *arg); #endif -- 2.17.1