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 9AA3343EDE; Thu, 2 May 2024 01:53:40 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 836E140299; Thu, 2 May 2024 01:53:38 +0200 (CEST) Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) by mails.dpdk.org (Postfix) with ESMTP id 2E4704026F for ; Thu, 2 May 2024 01:53:37 +0200 (CEST) Received: by mail-pf1-f178.google.com with SMTP id d2e1a72fcca58-6f30f69a958so6319205b3a.1 for ; Wed, 01 May 2024 16:53:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1714607616; x=1715212416; darn=dpdk.org; 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=0bgXPXA6QjOt0wzLEYWHpX1dm9NVlSLC+iJcBIrnh1U=; b=FCplU0XFW+C+jZfZh8Q+i1eQlu//6BZmXgoq5fGlWdo3uoqQNu7QzjF1j13bvy86tu TpHwe+niKvCKXO652noprGVK8ASpP12Lm0yApmY40lSe6pQrfuh3gYdOs2skbmzNiqez oNgu2BI3F1WOgsIwt34Yuabus9QhJjDLUGvI5dL40h/3StOzqbS5mC/8CAJVLH+JuX5M um5j9lCX0xCto566yXL2x5bwWmQSWcCTX+gSmmjGrHdYA/tV9tM9ADXPBnP9SLCe/WbZ dRYcc0wrP+1URdDao11oAj3TybPCj0LZfKTmby4XgNlrRQys/iv7aEiHwszxwhNeLh08 L4Mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714607616; x=1715212416; 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=0bgXPXA6QjOt0wzLEYWHpX1dm9NVlSLC+iJcBIrnh1U=; b=DxhwtdSrq2ZNEJ0N6jZdYZ1GVstmI3txVIzFyuhGYxqcn43OY3zcTXxrZnPLZ4KGML ZnemuHkCzuzMMPhVNm5svJ8aZRJ9ldWubzON1o/eN6BzRDnCtgGAgDXYJKzwpR5FS7/N rdrCGy3ODeYLvffsr/2Tu/S+9hjk7TH50OUVgEfkMlxb2+z7NFG5iLQToFz5F/TDpHax fL2VfqwuoSwDHByD3K2JOXgLC/7dwHojWMDI8O9kEyWSyE33vxx14qjte6PW+iuPotCw hFpnVu2SIf/TChgCEFNhqniTkx3VdmNsi0UfVohz5phOnJN84K7G7ePE713aYE/iPHtv HDFg== X-Gm-Message-State: AOJu0YxLNccXND7xiOxD/XUZTYyvn9YeFJRLaMwtLR0mzc/TKSz/NOkj T1gyinM3lTD6TbFkfqQQf9q+qomxXKlwvNhyc5z1cZ/gh5eS+0zfDz802KOyPmM= X-Google-Smtp-Source: AGHT+IHGR+ST7s91vNUbQXgLfslyaveOMSm1bViyODVDqbDOEPnu7bseuykpB2pclQWS/JdsghhrWQ== X-Received: by 2002:a05:6a20:3614:b0:1ad:71c6:8a1 with SMTP id r20-20020a056a20361400b001ad71c608a1mr3848267pze.59.1714607616019; Wed, 01 May 2024 16:53:36 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id h11-20020a170902680b00b001dc05535632sm25201500plk.170.2024.05.01.16.53.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 May 2024 16:53:35 -0700 (PDT) Date: Wed, 1 May 2024 16:53:33 -0700 From: Stephen Hemminger To: Ferruh Yigit Cc: dev@dpdk.org Subject: Re: [PATCH v9 1/9] net/tap: do not duplicate fd's Message-ID: <20240501165333.3c7ec80b@hermes.local> In-Reply-To: <57fcc4d9-211b-4615-b380-2bf4f83926af@amd.com> References: <20240130034925.44869-1-stephen@networkplumber.org> <20240426155125.125910-1-stephen@networkplumber.org> <20240426155125.125910-2-stephen@networkplumber.org> <57fcc4d9-211b-4615-b380-2bf4f83926af@amd.com> 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 Wed, 1 May 2024 12:13:45 +0100 Ferruh Yigit wrote: > > diff --git a/drivers/net/tap/tap_flow.c b/drivers/net/tap/tap_flow.c > > index fa50fe45d7..a78fd50cd4 100644 > > --- a/drivers/net/tap/tap_flow.c > > +++ b/drivers/net/tap/tap_flow.c > > @@ -1595,8 +1595,9 @@ tap_flow_isolate(struct rte_eth_dev *dev, > > * If netdevice is there, setup appropriate flow rules immediately. > > * Otherwise it will be set when bringing up the netdevice (tun_alloc). > > */ > > - if (!process_private->rxq_fds[0]) > > + if (process_private->fds[0] == -1) > > > > change in the condition looks reasonable but not directly related with > the change, does it require its own patch? In this case, the array of fds is moving from the rxq to being global. The old code worked because rxq_fds[] was initialized to zero. With shared fd's the fds are now initialized to -1. Using zero as sentinel fd is bad practice, because it is a valid fd; but POSIX says it always is stdin.