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 DD72C43074; Tue, 15 Aug 2023 19:45:28 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C97504114B; Tue, 15 Aug 2023 19:45:28 +0200 (CEST) Received: from mail-pj1-f51.google.com (mail-pj1-f51.google.com [209.85.216.51]) by mails.dpdk.org (Postfix) with ESMTP id DED5E410ED for ; Tue, 15 Aug 2023 19:45:27 +0200 (CEST) Received: by mail-pj1-f51.google.com with SMTP id 98e67ed59e1d1-26b0b92e190so3544336a91.1 for ; Tue, 15 Aug 2023 10:45:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1692121527; x=1692726327; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=B5xylICxfewoSiFUPmRwJCK58ZOHJ7jMN5nBTKjRNSQ=; b=gxeaYxbYz1YLWgYRl/za2LmdRAp1wzofsSGj89Xoxg6WLuqhHsQOdFcJWN7jgzYmJz Jaa5Swb/sr50nH6aPPzRni/+kzE7hMZ2RLbSbZjfsYNUCDWa2UqYRNayjKnfc+6gKtQl QSK4G2xNag8OXEOyRn7z8hqw5HrumkXkAxl5pTbKIAGB+cHnhUg87ut8tS5JwHL2vaQi 1gsmgxUSrH/JAGK+dV557yjs+eueyd6U3FAbg+9DsvDS4EEkYmMeoLgXt/woVN6tA0+J 0eoc7UlFViWWXTfxuRRk53v7CTEAz6UR72w0pVjG5mCplU/S1tNdlwMDFAFkjON7rlEX mGoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692121527; x=1692726327; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=B5xylICxfewoSiFUPmRwJCK58ZOHJ7jMN5nBTKjRNSQ=; b=e0gUFSh3ibZuWwCOKIOeny4YkP9F5MspNj1LYD+f/UGf4UqKOJ4eOtcSRITxjROXnG jv5AVtn6pvkVZ/qnocpp1rHTxU1pEbtTg6pDEY4jklrtl9sOOJd5a6kwUZPeZ4qhY4Vo /QGghvEdUYF5eetQNz81dX7kOZJvI0UgUew/4JGggVxa7jl+qAXlkyDFSQN2IQ2CnDIu 0Re9SB1axRwmY1PoaShqpFmc/1kW/khila+GpzxAXoRu3VhXDZJ4TrRQhK1HzvkNzcVL 5O+QUspI1J7Bu/trVpZ7+tDa15fVy2CbNqF23yLE32lLLlWigzQl836chA0lUOTC42mv T+vw== X-Gm-Message-State: AOJu0Yx3DEtsAzbetlUMlvsQtTYQaI5IVDzhzFyZyThhGehRzjwy8DoD OW+5g5VOo7KpX7eRLkqXvXnn4w== X-Google-Smtp-Source: AGHT+IEM/C4J/AGeb+BpUtfXADDWkf9wffYy1E1jAM2593zgKDzFD9BqTlx3Cq5/8PlKWoJsvXYgxw== X-Received: by 2002:a17:90b:211:b0:263:f521:da3e with SMTP id fy17-20020a17090b021100b00263f521da3emr3415632pjb.2.1692121526946; Tue, 15 Aug 2023 10:45:26 -0700 (PDT) Received: from hermes.local (204-195-127-207.wavecable.com. [204.195.127.207]) by smtp.gmail.com with ESMTPSA id ju21-20020a170903429500b001a6f7744a27sm11365605plb.87.2023.08.15.10.45.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Aug 2023 10:45:26 -0700 (PDT) Date: Tue, 15 Aug 2023 10:45:24 -0700 From: Stephen Hemminger To: okaya@kernel.org Cc: dev@dpdk.org Subject: Re: [PATCH v4 0/8] support reinit flow Message-ID: <20230815104524.5ffcf627@hermes.local> In-Reply-To: <20230815145023.1386003-1-okaya@kernel.org> References: <20230815145023.1386003-1-okaya@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 Tue, 15 Aug 2023 10:50:15 -0400 okaya@kernel.org wrote: > From: Sinan Kaya > > We want to be able to call rte_eal_init() and rte_eal_cleanup() > APIs back to back for maintanance reasons. > > Here is a summary of the code we have seen so far: > > 1. some code support getting called multiple times by keeping > a static variable. > 2. some code initializes once but never clean up after them and > don't have a cleanup API. > 3. some code assumes that they only get called once during the > lifecycle of the process. > > Most changes in this patch center around following the #1 design > principle. > > Why? > > It is not always ideal to reinitialize a DPDK process. Memory needs > to be reinitialized, hugetables need to warm up etc. I am familiar with the backstory of why this is desirable in your case. But others may not be. It will work for you, but for the wider the range of libraries and drivers it probably won't. As a compromise, can this restart be officially tagged as unsupported. I.e. it may work for some drivers and libraries but not all of them. If nothing else many parts of DPDK still do leak memory on cleanup and currently this is harmless. This has enough impact that it probably needs to wait past 23.11 release. Could you add a test for restart into standalone tests and test-pmd?