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 1D970A0561; Thu, 18 Mar 2021 18:37:53 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BCCF4140ED9; Thu, 18 Mar 2021 18:37:22 +0100 (CET) Received: from mail-qk1-f172.google.com (mail-qk1-f172.google.com [209.85.222.172]) by mails.dpdk.org (Postfix) with ESMTP id 472624067C for ; Thu, 18 Mar 2021 18:37:18 +0100 (CET) Received: by mail-qk1-f172.google.com with SMTP id u190so68473qkd.6 for ; Thu, 18 Mar 2021 10:37:18 -0700 (PDT) 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=uU7gvfGn+ENf7GJ4uSQuMl7043jTOuEritIUuKRCECg=; b=yuL77KoH668hyLv7rOzqtbjcM7OJSBj1aeDpuZ3YfotLDw4yIivAuYiPCJWZUwuq1T VnxJ0I6zayIV3jgysIkWrJ+fwwV+t3cvc4rHdhgDFa91FrYyNHizpaG8UKlNqXwifEVe TOhOHQgVmEKguZFxWvD746pl2U+qIfp8eLldcHbgXD4kBbP7/jM7F9Eyszu2Yrcz9pH7 chGfqrDtXkyGqX/aCjEv3Y/+J7ywJOjPhR7UnFSeDKSZvQ2dhu3X2Dmo3CBdDnVSm8pj SHw/fy66Z7a4iDvT75wJ83pezmXIC/rph1f48zWmOV9HUF5/ZEAACs7g8cewM41x7HPp /6+Q== 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=uU7gvfGn+ENf7GJ4uSQuMl7043jTOuEritIUuKRCECg=; b=ObSmMgpxiia9tIfUGKkDuNM85fg2o1pfenJ/edDUbd2LRy/db+M3HDF4VaFbR3EwxB u4MA3GsFtEbvtkkjurtnRPQfH6sR1v33UiUkmSsDRKGdLhky7jGtvi20gzK+Zgvz3JSI RhrL2dbDkpPBOD1dPvSp9vOVTRdVargUrbsmD80bait7kIpNqj0CjEiXiAU2aiHm0FQr V4V3eimm+IMFJGYSA1yS73EMigOaCbvuE7WJasHtnImKZ5jdTliQqsaOXKBRICDp7G5f v9OJQ1lmwm9VNvCGWmOxmRWa8OV7rNtbY0JLUwc4q3WLEsrjDFYZP+EAB7V5JnjwtWtI K/FQ== X-Gm-Message-State: AOAM532YYBGLTwcJiA3GAZeuIGOZMywsS8ZsDpzK6MBGI7vHuxkXplY6 ryBp7vZJO39NDF21OeLV3kKOg54cDCQmZw== X-Google-Smtp-Source: ABdhPJyCBqPMAHMDLYqpChlOHPe3UztoDHheT6ajRpew+QapW9kS1bEHZKHveB6m3PS3ibxCvt7vKg== X-Received: by 2002:a37:755:: with SMTP id 82mr5486402qkh.52.1616089037401; Thu, 18 Mar 2021 10:37:17 -0700 (PDT) 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 j1sm1931741qti.55.2021.03.18.10.37.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Mar 2021 10:37:16 -0700 (PDT) From: Ed Czeck To: dev@dpdk.org, ferruh.yigit@intel.com, bruce.richardson@intel.com Cc: shepard.siegel@atomicrules.com, john.miller@atomicrules.com Date: Thu, 18 Mar 2021 13:37:00 -0400 Message-Id: <20210318173700.15102-6-ed.czeck@atomicrules.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210318173700.15102-1-ed.czeck@atomicrules.com> References: <20210304165637.24658-1-ed.czeck@atomicrules.com> <20210318173700.15102-1-ed.czeck@atomicrules.com> Subject: [dpdk-dev] [PATCH v5 6/6] 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" remove unnecessary includes no functional changes 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 dea779a98..9dea5facb 100644 --- a/drivers/net/ark/ark_ethdev.c +++ b/drivers/net/ark/ark_ethdev.c @@ -534,20 +534,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) { @@ -582,7 +568,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