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 ACB5E41D8F for ; Mon, 27 Feb 2023 10:02:38 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 204DD40A7D; Mon, 27 Feb 2023 10:02:38 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id BEDB9400D5 for ; Mon, 27 Feb 2023 10:02:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677488556; 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=JLI1ZJuE496rC7ggMxuvjYiSY9TxrWrYzQq0l+ppCO0=; b=T1YGAq+teNM5TLWIH0HMZeoh241q5QiX3TpsAbcgAfLe6X+iHQMsSCSfZ01JuLqzyRqTEc 9jKwT59Rygmc+q+pG0sWCFceETMnEshqHrg7ohchOdYeCExuwC5Su8T9HUCFmWh91/qLIY hfCcmMXrAtnuP2q/+8dIbqzye2Iymyg= Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-88-B-LpG1eDONSo-qk39Wj4kA-1; Mon, 27 Feb 2023 04:02:34 -0500 X-MC-Unique: B-LpG1eDONSo-qk39Wj4kA-1 Received: by mail-pf1-f198.google.com with SMTP id z19-20020a056a001d9300b005d8fe305d8bso3117045pfw.22 for ; Mon, 27 Feb 2023 01:02:34 -0800 (PST) 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:message-id :reply-to; bh=JLI1ZJuE496rC7ggMxuvjYiSY9TxrWrYzQq0l+ppCO0=; b=7lcf7TwWfjMmDxcpJvbCEvQSf9L8NXJi7M5cm6FM+DpYstAcSLth5Vwe/4M5urQ3bS 07FFtV05OJRE4FVyloHETy3M2r/1qOzbYWKZRTvVJi3hGKLuFRvVK0jw0V0u0YJGlJWU y4DAHXern1dp83pxElBb8EhrEIpKnUWROtDxabNhmf2QTB0j6tN4E/Eyg3QfmyHzFe7C fbo7oJ80XUqSXO8SyHGfuxWi4YtX7zhSJ6uf977zqaso27q41ZKCPFdajEPa5u0tznwV U8/q5GbOrEpIV4IM2hDTiDnOlhpaOfHAeqLyaiIyW1x8HSlDlwZ7Lbrip7oOnGoQc4uR DnTA== X-Gm-Message-State: AO0yUKXRK5iEtWI5FGGWjFqNRlY0R0BnTOwsEbhs00WlRSSM+/cB8ii0 pWDiuEByfKS8iu0eWPhHXIuEZYO4l87ITxNd+TPBCiQr3v8Flt9JNIo3xh4Pd9cdkQPtX6td20Z +hNlbA6RJ4m40fB6nSPAbPQ== X-Received: by 2002:a05:6a00:1621:b0:5f1:b1:6dc4 with SMTP id e1-20020a056a00162100b005f100b16dc4mr1328516pfc.3.1677488553697; Mon, 27 Feb 2023 01:02:33 -0800 (PST) X-Google-Smtp-Source: AK7set+EY212DUONzWWymG+dYWGI6xKseA9rR5M3UnJ1+R0d3l9fnYi2LnJqelyNjnBKUGCRtDYgbc1c5fH0m0JG3yU= X-Received: by 2002:a05:6a00:1621:b0:5f1:b1:6dc4 with SMTP id e1-20020a056a00162100b005f100b16dc4mr1328509pfc.3.1677488553376; Mon, 27 Feb 2023 01:02:33 -0800 (PST) MIME-Version: 1.0 References: <20230222070359.3e45d6b6@hermes.local> In-Reply-To: <20230222070359.3e45d6b6@hermes.local> From: David Marchand Date: Mon, 27 Feb 2023 10:02:21 +0100 Message-ID: Subject: Re: Add more lcores to application after rte_eal_init has been called To: Antonio Di Bacco Cc: users@dpdk.org, Stephen Hemminger X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org On Wed, Feb 22, 2023 at 4:05 PM Stephen Hemminger wrote: > > On Wed, 22 Feb 2023 14:10:20 +0100 > Antonio Di Bacco wrote: > > > I need to add some more cores to the application after the DPDK has > > already been initialised. > > Is it possible? > > No > > > For other resources like network cards, I managed to probe new cards > > dynamically but don't understand how I can do the same for new lcores. > > You can start with lots of cores, but only use some of them in your > application. The unused queues could wait on something like pthread_condition > that is blocking. > If you really want to go with a dynamic approach, you could do like OVS does which is to stop using EAL threads, but have everything in your applications: create threads + set their cpu affinity + register them as lcores. That's the *easy* part. Then, if you want to go and only configure the exact number of rxq/txq wrt to your datapath threads, next is that you need to reconfigure the existing ports when a change happens and you will need to stop your existing datapath threads from pulling packets before reconfiguring the ports. Stephen description is probably the best/least effort. -- David Marchand