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 C214FA0561; Thu, 4 Mar 2021 21:34:02 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 403AA22A2E8; Thu, 4 Mar 2021 21:33:37 +0100 (CET) Received: from mail-qt1-f174.google.com (mail-qt1-f174.google.com [209.85.160.174]) by mails.dpdk.org (Postfix) with ESMTP id B910522A2D7 for ; Thu, 4 Mar 2021 21:33:34 +0100 (CET) Received: by mail-qt1-f174.google.com with SMTP id v64so21501476qtd.5 for ; Thu, 04 Mar 2021 12:33:34 -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=OUmnw2AaqyDq6KXvvZIOFRUAE7g+tlEx0CT5Vo7PdLg=; b=tImnyWy6RcrZhM2eht8lg+V0RUajJwG/InbRtPRXpXDiGMoi0TTIy7XK22oF98HfJ3 96SPw8VLkE/yHpml9ru4sEdX6Qvu+U3qR6+vkAWj8npa4UogxKl68eGyWABRaN9sHhq6 52Vwn3ieX+14wx2Vv1qfKERGtpXZWrOm6RI9dhB9BBt6RzYCl2P4VscCncQJYG4V7Ihv x00G95DpfhkL/44OS5Jp5VDm1Z/6TEOe5Ewc3FIKbVo7nJ/xhLRXmcBj6bggr75uItP+ 6zDbblsRl4xXbWwPj0v+8o3+QBf3mKNOPU63nVyZJ8cEJ3n4u7S92qEXFTvGBezWQjif NPmA== 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=OUmnw2AaqyDq6KXvvZIOFRUAE7g+tlEx0CT5Vo7PdLg=; b=oOTu57GsrOxQtCaSJfUE3zXUD0cVJA9brcrXu8Q33UYcZiVchBWk34jrfxmB8qKBod J/PpYi5QRDJ1Ubd/WRuiF905syiTUIwNCBfwD2dWfk04WLn9qlQwieWlZQf9GhftORP2 TYiuSvESHX5jQdqdbpMqQRSZFCSEa2LZpQnT1J/3zcVc0qtXhVDreF/fzuFHvwP/cxQr ZX5ok2/2EtX3g9KGeZr9oAf1pBjEGeFtWI84e1br0bBBQ7b77gr1TpZ9Bz9v4SFoaPVd 6Hz0V66mOGE4d5zqpLLV9zZ5rQnuWGZfg7A7Ig1Pp2T9udgdfhk+6ghyU6BxLoEBjFS8 l6TA== X-Gm-Message-State: AOAM533GEqgCQMzRtbYCxq8uVXKwwJYM6F9olVSPqt1hDrtO4AYdcMec 6gJYIwQok/DoO/3Pzn7HkJqoTPr4UVguHg== X-Google-Smtp-Source: ABdhPJz5kH1aGVhE7frhM2pltcVfuVlNB5QltKtVW8vmmafh/HYy70leMKNomT26yVAfLmPMYQvJ5A== X-Received: by 2002:ac8:d4f:: with SMTP id r15mr5717475qti.289.1614890013988; Thu, 04 Mar 2021 12:33:33 -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 b65sm250710qkd.120.2021.03.04.12.33.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Mar 2021 12:33:33 -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 15:33:21 -0500 Message-Id: <20210304203321.6154-5-ed.czeck@atomicrules.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210304203321.6154-1-ed.czeck@atomicrules.com> References: <20210304165637.24658-1-ed.czeck@atomicrules.com> <20210304203321.6154-1-ed.czeck@atomicrules.com> Subject: [dpdk-dev] [PATCH v2 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" 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 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