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 57217A0544; Fri, 23 Sep 2022 12:36:40 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F34F440156; Fri, 23 Sep 2022 12:36:39 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id A2FAF4003C for ; Fri, 23 Sep 2022 12:36:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663929398; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=d7rLfBlJixcaZzwbQCwKrp81TylSHGLfUUhsqwSMsgM=; b=KnxDnlD2nJRuhFqfZg2z4OsbUHmhPLAFGFvG540sOeNCrmammmvtZm8lovtanNBhLRC05Q yRkG8Fd4lhF5izF0v94axdFysXx4gv5MZzmeIAbPgU+1MGVd/MEw3xGfTmvmGqHoqXxNjx U68Nirv00YzlC1sJHavKwwW27viEOz8= Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-615-MNRND80HMB-0G7KCLj4p4w-1; Fri, 23 Sep 2022 06:36:29 -0400 X-MC-Unique: MNRND80HMB-0G7KCLj4p4w-1 Received: by mail-ed1-f71.google.com with SMTP id v11-20020a056402348b00b004516e0b7eedso8523776edc.8 for ; Fri, 23 Sep 2022 03:36:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=d7rLfBlJixcaZzwbQCwKrp81TylSHGLfUUhsqwSMsgM=; b=0YcFjeMsSweyYfMjhlGxks4lWJdYThjsubpPQF8pdh/qplvO/AjwiUkYnGFxVwKiDI xy2KtfEQqPc2Jtm16iLw6OkvWSAiLCnHtxaL/Yug/8TvRcJ5nfzYD2aTRQ4/N0wezCmF os4zaAez+PIVxZS4/1ORlpS5yIAoltp5ldGUhHXm/2QOTfFicoW7BVjWM9oAn1hh+Eer ydF7MlQpJj+s9tcS8Pqawa3XJwOR0FSwPGHdUdm/xpwCMd2yyHMDKghddlFDTN5qpeqt naFPc2L1looB1m34K5+PZwnuZUlblY8Or6gYJbx65Cymo2VlPPtggWYOsh4pctIgu4Jh 9S1Q== X-Gm-Message-State: ACrzQf15fRAprO2qvjj/66hTD8J8Run1Kst7qA6vu30WNfroh45oIg/I Js4qeKGjyWB+Iv/JBBbWJru/TdX58Tf6DhikgJC0L9f0VTp2aC8ye/Ts6zvsxf0q8QZw0PVS5V0 34ghK246cuhcZWqYRix8= X-Received: by 2002:a17:907:628a:b0:781:bbff:1d42 with SMTP id nd10-20020a170907628a00b00781bbff1d42mr6184503ejc.375.1663929388208; Fri, 23 Sep 2022 03:36:28 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6ma805l8JMyOFyEM5jqbbLONsOIkD0OdOGGF/XkCSBjssqz7t5w+V2LSIhesQcXjF2ygazH48WP6jjwhDyMns= X-Received: by 2002:a17:907:628a:b0:781:bbff:1d42 with SMTP id nd10-20020a170907628a00b00781bbff1d42mr6184492ejc.375.1663929387959; Fri, 23 Sep 2022 03:36:27 -0700 (PDT) MIME-Version: 1.0 References: <20220819223301.2980316-1-timothy.mcdaniel@intel.com> <20220915033919.4134000-1-abdullah.sevincer@intel.com> In-Reply-To: <20220915033919.4134000-1-abdullah.sevincer@intel.com> From: David Marchand Date: Fri, 23 Sep 2022 12:36:16 +0200 Message-ID: Subject: Re: [PATCH] eal: make eal_parse_coremask external To: Abdullah Sevincer Cc: dev@dpdk.org, Jerin Jacob Kollanukkaran , Timothy McDaniel X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" 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 Hello Abdullah, On Thu, Sep 15, 2022 at 5:39 AM Abdullah Sevincer wrote: > > DLB2 has a need to parse a user supplied coremask as part > of an optimization that associates optimal core/resource > pairs. Therefore eal_parse_coremask has been renamed > to rte_eal_parse_coremask and exported. Please version new revisions of a patch for your next contributions. > > Signed-off-by: Abdullah Sevincer > --- > lib/eal/common/eal_common_options.c | 6 +++--- > lib/eal/common/eal_options.h | 2 ++ > lib/eal/version.map | 1 + > 3 files changed, 6 insertions(+), 3 deletions(-) > > diff --git a/lib/eal/common/eal_common_options.c b/lib/eal/common/eal_common_options.c > index 4c2def0155..2d6535781b 100644 > --- a/lib/eal/common/eal_common_options.c > +++ b/lib/eal/common/eal_common_options.c > @@ -742,8 +742,8 @@ check_core_list(int *lcores, unsigned int count) > return -1; > } > > -static int > -eal_parse_coremask(const char *coremask, int *cores) > +int > +rte_eal_parse_coremask(const char *coremask, int *cores) > { > const char *coremask_orig = coremask; > int lcores[RTE_MAX_LCORE]; > @@ -1649,7 +1649,7 @@ eal_parse_common_option(int opt, const char *optarg, > if (eal_service_cores_parsed()) > RTE_LOG(WARNING, EAL, > "Service cores parsed before dataplane cores. Please ensure -c is before -s or -S\n"); > - if (eal_parse_coremask(optarg, lcore_indexes) < 0) { > + if (rte_eal_parse_coremask(optarg, lcore_indexes) < 0) { > RTE_LOG(ERR, EAL, "invalid coremask syntax\n"); > return -1; > } > diff --git a/lib/eal/common/eal_options.h b/lib/eal/common/eal_options.h > index 3cc9cb6412..0cfb57cd1f 100644 > --- a/lib/eal/common/eal_options.h > +++ b/lib/eal/common/eal_options.h > @@ -108,5 +108,7 @@ int eal_plugins_init(void); > int eal_save_args(int argc, char **argv); > int handle_eal_info_request(const char *cmd, const char *params __rte_unused, > struct rte_tel_data *d); > +__rte_internal > +int rte_eal_parse_coremask(const char *coremask, int *cores); I moved this to rte_eal.h and added a (doxygen) description of what this helper does. > > #endif /* EAL_OPTIONS_H */ > diff --git a/lib/eal/version.map b/lib/eal/version.map > index 1f293e768b..c643bc1612 100644 > --- a/lib/eal/version.map > +++ b/lib/eal/version.map > @@ -464,4 +464,5 @@ INTERNAL { > rte_mem_map; > rte_mem_page_size; > rte_mem_unmap; > + rte_eal_parse_coremask; Fixed to alphabetical order. Applied, thanks. -- David Marchand