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 D1D63A00BE; Mon, 25 Apr 2022 10:28:01 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C158541109; Mon, 25 Apr 2022 10:28:01 +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 1B0FB410E6 for ; Mon, 25 Apr 2022 10:28:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1650875280; 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=soGtZ57y9/OzFMooH1A2c99G1KdovDpA54hxvrRAkaA=; b=TTYjgF79HffoafkzeRxmuEUggfoBy8CY35n2RtOKsuzti79TqNwxlybSHqcZ7ozMGtqeKB mYuJfTzpfPunKgLykiwKKCEc7p9cmt7qbF4SaSPtacFbswrOlrDg52r7FEybAWwqC3MGdG zEJIuEcRLZErNJTDgGilyWP7msfNiJE= Received: from mail-lj1-f200.google.com (mail-lj1-f200.google.com [209.85.208.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-499-noZ_QqS0PtaEuXmd5sl7qw-1; Mon, 25 Apr 2022 04:27:11 -0400 X-MC-Unique: noZ_QqS0PtaEuXmd5sl7qw-1 Received: by mail-lj1-f200.google.com with SMTP id e3-20020a2e9303000000b00249765c005cso3384450ljh.17 for ; Mon, 25 Apr 2022 01:27:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=soGtZ57y9/OzFMooH1A2c99G1KdovDpA54hxvrRAkaA=; b=E6f6zoYxTbu9NABVTtsS96JhBFto1Gfyr7RlFbiSdKxnxyArvQzIrHCmKzuUNK4BqA RrUzBmjP8PFe1PxkEWAgY6ftv7XVwpwaQq8f9cD6nVxyMxyU2554FZw3cfU7TE3/EjaE W8Bg7Cn5TnV48xTwEgIe7uWxDAqIuwrn8B76mzhG3L68K9Z59LR/ukZs8uqObR8USJ5J bmAy9U/eha2eOSQWt30DNZro+t9h1B8FdBYpjBXATuTwnkn1JmFMV0mZn1GfK0GMCAkq 5gOQUciyp6O6gNeHnsczQUtRX/umFrKmKG9+H9MRIMy/1q1tXfCtW89BhGFIde/JnpmY VjtQ== X-Gm-Message-State: AOAM532g09TEaZH5R/4qBek8msKViWwDTtvkmcZmIkHKIh6eNc/g+WfX P53t70sOTxaG4Futc5nfcCRyH1zDI9ClrM6DjpOQGe/xPfI6zzo3IKOCkfKQRkJQ4X7aI4gj8p0 yCsTd+2Bbr7gfKzv1f7c= X-Received: by 2002:a05:6512:1052:b0:471:bffd:c8de with SMTP id c18-20020a056512105200b00471bffdc8demr12137547lfb.553.1650875230162; Mon, 25 Apr 2022 01:27:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy1KpkQwNzySqljKJE2NsHs4+ql8ZP70bY3ljGvfrBrYrfVi6qyr74o+AVhYBsGziDLQX2WT+9fiBFwBtfY+zU= X-Received: by 2002:a05:6512:1052:b0:471:bffd:c8de with SMTP id c18-20020a056512105200b00471bffdc8demr12137534lfb.553.1650875229985; Mon, 25 Apr 2022 01:27:09 -0700 (PDT) MIME-Version: 1.0 References: <1648819793-18948-1-git-send-email-roretzla@linux.microsoft.com> <1649835795-9344-1-git-send-email-roretzla@linux.microsoft.com> <1649835795-9344-4-git-send-email-roretzla@linux.microsoft.com> In-Reply-To: <1649835795-9344-4-git-send-email-roretzla@linux.microsoft.com> From: David Marchand Date: Mon, 25 Apr 2022 10:26:58 +0200 Message-ID: Subject: Re: [PATCH v3 3/4] eal: implement functions for get/set thread affinity To: Tyler Retzlaff Cc: dev , Thomas Monjalon , Dmitry Kozlyuk , "Burakov, Anatoly" , Narcisa Vasile Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com 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 On Wed, Apr 13, 2022 at 9:43 AM Tyler Retzlaff wrote: > > Implement functions for getting/setting thread affinity. > Threads can be pinned to specific cores by setting their > affinity attribute. > > note: rte_convert_cpuset_to_affinity has a limitation that all cpus of > the set belong to the same processor group. > > Signed-off-by: Narcisa Vasile > Signed-off-by: Tyler Retzlaff [snip] > diff --git a/lib/eal/windows/rte_thread.c b/lib/eal/windows/rte_thread.c > index d730bb4..032b09f 100644 > --- a/lib/eal/windows/rte_thread.c > +++ b/lib/eal/windows/rte_thread.c > @@ -6,7 +6,8 @@ > #include > #include > #include > -#include > + > +#include "eal_windows.h" > > struct eal_tls_key { > DWORD thread_index; > @@ -146,3 +147,131 @@ struct eal_tls_key { > } > return output; > } > + > +static int > +rte_convert_cpuset_to_affinity(const rte_cpuset_t *cpuset, > + PGROUP_AFFINITY affinity) This is Windows only, static code. Please don't use rte_ prefix. For static code, I see no need for a prefix at all. -- David Marchand