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 08582A0543; Sat, 3 Sep 2022 15:16:50 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 95C0840A7F; Sat, 3 Sep 2022 15:16:50 +0200 (CEST) Received: from mail-qk1-f178.google.com (mail-qk1-f178.google.com [209.85.222.178]) by mails.dpdk.org (Postfix) with ESMTP id 00D2040698 for ; Sat, 3 Sep 2022 15:16:48 +0200 (CEST) Received: by mail-qk1-f178.google.com with SMTP id a10so3632411qkl.13 for ; Sat, 03 Sep 2022 06:16:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=SCmiTx7945bB5TI0gdAkcsX1SDE9UW7H576Eh/Bwxrs=; b=PEEzz8R+/s/IxMhn7Z4uHe33kqh/AcuqhAvogIpj6N5FSscSfIkx3y4vYhJgwGDIe/ A+epoM7HsfWrIM2KDlszwr1RvRXA/N0UWm2G6TTJsbFo+kOnShe88pfCSHyolVhEu/Uj qV19Uq9N9V0VPS+nxOcflOvssCM7gnE3zYS4dukw0/o8aFA0yyqieoSOR/UB7nRVSMyd CNnUjox7vuHGU1So5ll4Yi5NuUflOhb/mocbrtFQXG/dVUEzw9UvSYaxqpOLURMbifdJ OfypeIIlzkpiAyxQtWGWPu4pHfPho+0bmaO+9fbFfvRyCLeuio7uexW8W/7ZtGiv4UBK 5gcQ== 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=SCmiTx7945bB5TI0gdAkcsX1SDE9UW7H576Eh/Bwxrs=; b=e9qPtjaBon+XKLO/MuGO14bXAY+6MkIiSVhLnmXZsXzCRB5hU8UTIXo8bNrindemgG gGroD42noSYVBCl+3zCmbjLP6zVbIqrvAd7g/BXEbUnZG3SZ4avtDAG9/zcUkPV+5Dti 3Zs96LZ/deAwtmKcTL18S93pqIzlA5e1LZTp77/PSlKDaBcMr+n5h9cGn9NNTArktlUx 7PL5rDGWqYyyvtKmJUD8PWTAMmp1fjJ194dYNwdJrA6OBpMSDTlj1cc0PN6ZrwSAXPp4 Mdg3ddn0KKYzUEZKIKT8jz6MB15UTybLo5njDqbCBnFyP3fx7aqpkWYLDCVNQWSr1KaO fHbA== X-Gm-Message-State: ACgBeo3utJ+kEylKSz5MObBLSp38IXZcmSSKcIy8Eq1fHX6zgdpYUS+d WwUi0zq3sqxGdPrjQfcPwfxF3HjMA2lBhqZ33fM= X-Google-Smtp-Source: AA6agR52B5vscdjh0ahvOSyvM2/2Zqzy1QM+i4v1RKP+9RcS5dCgRl9D+RdYArUZr/VZjQ8SUW29X4KDGEd2HpD+ZkI= X-Received: by 2002:a05:620a:8d0:b0:6bb:72f2:406b with SMTP id z16-20020a05620a08d000b006bb72f2406bmr26081818qkz.283.1662211008218; Sat, 03 Sep 2022 06:16:48 -0700 (PDT) MIME-Version: 1.0 References: <20220820005957.2986689-1-timothy.mcdaniel@intel.com> <20220820005957.2986689-2-timothy.mcdaniel@intel.com> In-Reply-To: <20220820005957.2986689-2-timothy.mcdaniel@intel.com> From: Jerin Jacob Date: Sat, 3 Sep 2022 18:46:22 +0530 Message-ID: Subject: Re: [PATCH 1/3] event/dlb2: add producer port probing optimization To: Timothy McDaniel Cc: Jerin Jacob , dpdk-dev 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 On Sat, Aug 20, 2022 at 6:30 AM Timothy McDaniel wrote: > > For best performance, applications running on certain cores should use > the DLB device locally available on the same tile along with other > resources. To allocate optimal resources, probing is done for each > producer port (PP) for a given CPU and the best performing ports are > allocated to producers. The cpu used for probing is either the first > core of producer coremask (if present) or the second core of EAL > coremask. This will be extended later to probe for all CPUs in the > producer coremask or EAL coremask. > > Producer coremask can be passed along with the BDF of the DLB devices. > "-a xx:y.z,producer_coremask=" > > Applications also need to pass RTE_EVENT_PORT_CFG_HINT_PRODUCER during > rte_event_port_setup() for producer ports for optimal port allocation. > > When events are dropped by workers or consumers that use LDB ports, > completions are sent which are just ENQs and may impact the latency. > To address this, probing is done for LDB ports as well. Probing is > done on ports per 'cos'. When default cos is used, ports will be > allocated from best ports from the best 'cos', else from best ports of > the specific cos. > > Signed-off-by: Timothy McDaniel > --- > drivers/event/dlb2/dlb2.c | 40 +++- > drivers/event/dlb2/dlb2_priv.h | 5 + > drivers/event/dlb2/dlb2_user.h | 1 + > drivers/event/dlb2/pf/base/dlb2_hw_types.h | 5 + > drivers/event/dlb2/pf/base/dlb2_resource.c | 248 ++++++++++++++++++++- > drivers/event/dlb2/pf/base/dlb2_resource.h | 13 ++ > drivers/event/dlb2/pf/dlb2_main.c | 7 +- > drivers/event/dlb2/pf/dlb2_main.h | 23 +- > drivers/event/dlb2/pf/dlb2_pf.c | 23 +- > 9 files changed, 341 insertions(+), 24 deletions(-) > > diff --git a/drivers/event/dlb2/dlb2.c b/drivers/event/dlb2/dlb2.c > index 5a443acff8..a9a174e136 100644 > --- a/drivers/event/dlb2/dlb2.c > +++ b/drivers/event/dlb2/dlb2.c > @@ -293,6 +293,23 @@ dlb2_string_to_int(int *result, const char *str) > return 0; > } > > +/* Extern functions */ > +extern int rte_eal_parse_coremask(const char *coremask, int *cores); Include eal header file. I will wait for the dependent patch to merge to the main tree to tale the next version. > +#ifdef DLB2_DEFAULT_LDB_PORT_ALLOCATION Introduce a new devargs to make it runtime. Also update the PMD doc for the existing and new devargs.