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 7411CA0566; Mon, 8 Mar 2021 23:30:23 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 98A3722A51B; Mon, 8 Mar 2021 23:29:43 +0100 (CET) Received: from mail-qk1-f175.google.com (mail-qk1-f175.google.com [209.85.222.175]) by mails.dpdk.org (Postfix) with ESMTP id 55E6422A518 for ; Mon, 8 Mar 2021 23:29:40 +0100 (CET) Received: by mail-qk1-f175.google.com with SMTP id f124so11115354qkj.5 for ; Mon, 08 Mar 2021 14:29:40 -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=+uxYK5LAC2CBXz05nEAHSZKxwwk4Yq6pvP7SRrkEQpk=; b=BN6nxBCZve34247jOtp050cvthCMlA20S5zxQFK74lx97YTlDgDp8W0APw12g8/EBA 1BfmLZbzDHZRyimwcCINrhQJeOXD8W3uFOMbSwcjj8m9x8YYS4gvadueLZc2W9CXLnrP +r0zDvvVublS1hWw7cz856vBBmIOKpERatM1knnX97j0S/jnlywfNkIfq3z3Hp3W+50P rRFob8k4MczvSLonZ7UfUVjkb8AuXjOjbFrH/tM61AFCY6d5h7z58UyF2Qmh81TMqaVO 82BjiWRBMp4VUZzUK/pLJyxctynoz66O2dUt67lnusPHA3FscrLfo4MWMvMXfMZWloWR mEeg== 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=+uxYK5LAC2CBXz05nEAHSZKxwwk4Yq6pvP7SRrkEQpk=; b=oamq/lQ2VQpIchhSkiKkFhpAnxRfKmCewaiUqRHkubd55AcZWFxaaYvIXylosRGfSQ JC37qqVfJGn8wYQa72428ckCCJ3lvycmPtl27dDbcwykwLoNnYN8t7+t2pXG/o3ObM+G FAJWAF49GNLPNfrLmXr/ImtkEUchs6BmcLXkiXIIsZA9icN5bbX3+tvdifbRUFxzzrVu uj7Uezx2IkQRKrYfBRm56xvpQMPoOOhFKkH22JBn3fVYseJs1xwhyeO0fbLC9SzrG9nQ TrlNGvvWzjVnEdWYWce9ZSe3eaWJEjW1iNfNB74e2L4vjLUHfr6dCMos8EvO5Yw8OMVC dWIg== X-Gm-Message-State: AOAM533hRlHFFh836FTSK6PAylz+vL4FJjAulQBbVz5VUjhXMPKXfSBN zSYQM2oiTDVD9zpnSdkHkSLj/njtwo9YWQ== X-Google-Smtp-Source: ABdhPJxNgTOIKOBQoqBPJ+sZUuf09CXZabpN38VlIGCLBleDq8s3V71qyM4MYQkCTZ2xCTJO74+TOg== X-Received: by 2002:a05:620a:14ae:: with SMTP id x14mr22787969qkj.237.1615242579595; Mon, 08 Mar 2021 14:29:39 -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 z188sm8892774qkb.40.2021.03.08.14.29.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Mar 2021 14:29:38 -0800 (PST) From: Ed Czeck To: dev@dpdk.org, ferruh.yigit@intel.com Cc: shepard.siegel@atomicrules.com, john.miller@atomicrules.com Date: Mon, 8 Mar 2021 17:29:22 -0500 Message-Id: <20210308222922.30667-6-ed.czeck@atomicrules.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210308222922.30667-1-ed.czeck@atomicrules.com> References: <20210304165637.24658-1-ed.czeck@atomicrules.com> <20210308222922.30667-1-ed.czeck@atomicrules.com> Subject: [dpdk-dev] [PATCH v3 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 f8a4b8711..d1f18a991 100644 --- a/drivers/net/ark/ark_ethdev.c +++ b/drivers/net/ark/ark_ethdev.c @@ -533,20 +533,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) { @@ -581,7 +567,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