From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id C73D7A04AE; Mon, 4 May 2020 18:28:57 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 72BA81D177; Mon, 4 May 2020 18:28:57 +0200 (CEST) Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179]) by dpdk.org (Postfix) with ESMTP id 669D51D172 for ; Mon, 4 May 2020 18:28:55 +0200 (CEST) Received: by mail-pf1-f179.google.com with SMTP id x77so5751527pfc.0 for ; Mon, 04 May 2020 09:28:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3SFZHB1q940OtsFw8xnsvmTCvbYDjS2HkEQ/vIv6lo8=; b=HXS8ZNmBD0pLenDjv8fa8kC+/M+x0uwUmIy0EeJ5Gzh0pPdZCEe2P2T2AVMWz0f+xG SSv1WDDXaIcXfVpy0wUfIogk3o8h2ey5gUOlBqrGBFCVhXSRTCUXhmerriD5gcLFNRLZ 6DqFwyJpjLOE0erumyyXUvOQIdRMDEQPj95Wyf20UU3G6K0G2HEIkEAEDd2cF7M9FmTx rzwSzqxfj3xybMr4YYZ/3XViiJEADtenO5GFUFK2M2Kn++xiavLyeUaFmXVPyhG2blhp uOfhf+5EQe/ZvzFCKb077hMh3+16vs/2UfeX13cu0Vx8VADgrw9yOvtbsPHM4Iug+4D5 dITg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3SFZHB1q940OtsFw8xnsvmTCvbYDjS2HkEQ/vIv6lo8=; b=aX7WsgahSxoWl55ldy2G/WRBhnE7Zp7E+5ThRv64vm9Xw2qZ6xm2NSwSCqzws7JGOE 3n4rFzFjLiMwZiAeA/7PEAUmwcRdkGmMvChDzVun+5NQlhSsLt4BAIOG3g4/XTVtdfPy g+toYhcmxWodZFvNvcU8cKfOcnlIrRiWy7gPMVg1otvSY2j6fvI5YNpPuabykJQhuOdD nvwUOSk0cK//NTKGXXbrK3pNn/KVLhfeWXYZzyIlHCt0VgM9A50VkEFyNMNzSDjOozPA aj6I6vjnfML0xM1ZX6akxM2oJDIarDM1EM5OSD/VeQAEQz3li4wlGXqxfLwOyBSb7HS9 MKTA== X-Gm-Message-State: AGi0PuYGdvZlmBRMFQTekDirS0Ge9HBsnEtVGp3k6kuFwKiSBwZCYJGG Czs/k9drBk1/RgbQQA4tyMLXaw== X-Google-Smtp-Source: APiQypJtyGo8MuMlfGHjZxH46HBTU613ht0tpx+mKh1cClSGstFL9lnZ3aVhTmWwa71izZumWNfQFQ== X-Received: by 2002:a63:7805:: with SMTP id t5mr17804528pgc.141.1588609734382; Mon, 04 May 2020 09:28:54 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id g74sm9205295pfb.69.2020.05.04.09.28.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 May 2020 09:28:54 -0700 (PDT) Date: Mon, 4 May 2020 09:28:45 -0700 From: Stephen Hemminger To: =?UTF-8?B?R2HDq3Rhbg==?= Rivet Cc: Ali Alnubani , Ferruh Yigit , wangyunjian , "dev@dpdk.org" , "jerry.lilijun@huawei.com" , "xudingke@huawei.com" , "stable@dpdk.org" , Raslan Darawsheh Message-ID: <20200504092845.2329fb44@hermes.lan> In-Reply-To: <20200504162002.2das2dx4tad5krqn@u256.net> References: <1587984259-18296-1-git-send-email-wangyunjian@huawei.com> <20200427111210.7pm3rkifd2zcrxjo@u256.net> <2c742d0c-1478-5fc8-cf7a-ffaa81b592f6@intel.com> <20200504162002.2das2dx4tad5krqn@u256.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH] net/failsafe: fix fd leak X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, 4 May 2020 18:22:26 +0200 Ga=C3=ABtan Rivet wrote: > On 03/05/20 11:33 +0000, Ali Alnubani wrote: > > Hi, > > =20 > > > -----Original Message----- > > > From: dev On Behalf Of Ferruh Yigit > > > Sent: Monday, April 27, 2020 7:56 PM > > > To: Ga=C3=ABtan Rivet ; wangyunjian > > > > > > Cc: dev@dpdk.org; jerry.lilijun@huawei.com; xudingke@huawei.com; > > > stable@dpdk.org > > > Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH] net/failsafe: fix fd le= ak > > >=20 > > > On 4/27/2020 12:12 PM, Ga=C3=ABtan Rivet wrote: =20 > > > > On 27/04/20 18:44 +0800, wangyunjian wrote: =20 > > > >> From: Yunjian Wang > > > >> > > > >> Zero is a valid fd. The fd won't be closed thus leading fd leak, w= hen > > > >> it is zero. > > > >> > > > >> Fixes: f234e5bd996d ("net/failsafe: register slaves Rx interrupts") > > > >> Fixes: 9e0360aebf23 ("net/failsafe: register as Rx interrupt mode") > > > >> Cc: stable@dpdk.org > > > >> =20 > > > > > > > > Hello Yunjian, > > > > > > > > Nothing prevents a DPDK app from closing 0 and getting it from anot= her > > > > call, good catch. > > > > =20 > > > >> Signed-off-by: Yunjian Wang =20 > > > > > > > > Acked-by: Gaetan Rivet =20 > > >=20 > > > Applied to dpdk-next-net/master, thanks. =20 > >=20 > > This patch is causing Testpmd to quit when I issue a "port stop" comman= d. Testpmd log: > >=20 > > """ > > x86_64-native-linuxapp-gcc/build/app/test-pmd/testpmd -n 4 -- -i --forw= ard-mode=3Dmac > > EAL: Detected 8 lcore(s) > > EAL: Detected 1 NUMA nodes > > EAL: Multi-process socket /var/run/dpdk/rte/mp_socket > > EAL: Selected IOVA mode 'PA' > > EAL: No available hugepages reported in hugepages-1048576kB > > EAL: Probing VFIO support... > > EAL: PCI device 0002:00:02.0 on NUMA socket 0 > > EAL: probe driver: 15b3:1004 net_mlx4 > > Interactive-mode selected > > Set mac packet forwarding mode > > Warning: NUMA should be configured manually by using --port-numa-config= and --ring-numa-config parameters along with --numa. > > testpmd: create a new mbuf pool : n=3D203456, size= =3D2176, socket=3D0 > > testpmd: preferred mempool ops selected: ring_mp_mc > >=20 > > Warning! port-topology=3Dpaired and odd forward ports number, the last = port will pair with itself. > >=20 > > Configuring Port 1 (socket 0) > > Port 1: 00:15:5D:26:2B:00 > > Checking link statuses... > > Done =20 > > testpmd> port stop 1 =20 > > Stopping ports... > > Checking link statuses... > > Done =20 > > testpmd> =20 > > Stopping port 1... > > Stopping ports... > > Done > >=20 > > Shutting down port 1... > > Closing ports... > > Done > >=20 > > Bye... > > """ > >=20 > > My terminal gets broken at this point, and I have to reinitialize it wi= th a "reset". The problem is that you did not blacklist the PCI address of the Mellanox d= evice associated with your login session (normally this is the PCI device associated with eth0). By default, DPDK will take over all VF devices it finds as part of the Mell= anox device startup. This means the traffic that was going to the VF associated with et= h0 (your ssh) is now going to DPDK; which is not what you want. The solution is to either use blacklist (-b option) or whitelist (-w option= ) to get only the PCI devices you want to be part of the DPDK.