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 EB577A04B8; Tue, 5 May 2020 14:36:04 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E85E31D573; Tue, 5 May 2020 14:36:03 +0200 (CEST) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id BA37D1C1BB for ; Tue, 5 May 2020 14:36:02 +0200 (CEST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 0B31F5C0110; Tue, 5 May 2020 08:36:02 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Tue, 05 May 2020 08:36:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm1; bh= qmdZI0pgiyftY4q+UaLWwf5dLbq6y2DxgqnNgcHSNBg=; b=EbHKLhOTGcnC3eTK E0otXrDVmkD+4FAxgiOvEUkLDNOEPUh1zDGn519gvAHMQNNMkuEMrdc+vmX8KgIj 7ROICiF2AP5SIULPfYmwqtpTScbbDX/+4XiBYL9GgoiulpzZR7aceSSXkR10ruRA qftybC8KHvVwFixHWD2RtWgUoJ5OYL71gwbpIKVE6YCAEShu1iBBUP4YA91Dhxm5 TivvfMfHvYznrjulqsf/S4WcTpdf97TeL3dBJXI4SUbs7d8nBO9Nlyz4kNRih6yI +TdG0f6Ty3zpyFyop/Cn1KkJ0Ej7b2hHVRVmwzjrfAaZDbqQrHlIyT/eXYRehK2C M6OMlA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=qmdZI0pgiyftY4q+UaLWwf5dLbq6y2DxgqnNgcHSN Bg=; b=SE8UFEulM66C3vscVngLbs6k1+b0O7D6Wm7LZqxn+Bb+Ptllq3guFLfp3 6jSQnMKYuCQJk+pf37FgBg4E4mK/QnnzxWD3bZaup75snvcilpjyUd6vyzp2ZMWW vGN1mM5BvO5NI4QPQiD8dqNNmspZT/cwnZwAP4309hgXBIE6ru6yvHE/JBjfVOO+ wP+AE2/A1Q0m7hEwSeG9nqjpTA1vdrgbVkdkWZct9csrl1njdvXb9LNVkYKXcKC5 tK+wX5s2t7mgHFW4NhJLj9oxHKYsoq28US5MSVq978//l0JEHRz4ejHJ3xTvWJ78 pJf+IQJL7s7YwcJx80G9dG66Sjf8A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrjeeigdehtdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtf frrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdejueei iedvffegheenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhho nhdrnhgvth X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id CA18A3065FD6; Tue, 5 May 2020 08:36:00 -0400 (EDT) From: Thomas Monjalon To: Renata Saiakhova Cc: "dev@dpdk.org" , "ferruh.yigit@intel.com" , "arybchenko@solarflare.com" Date: Tue, 05 May 2020 14:35:59 +0200 Message-ID: <36107549.10thIPus4b@thomas> In-Reply-To: References: <20200503162636.5233-1-Renata.Saiakhova@ekinops.com> <2456587.k3LOHGUjKi@thomas> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH 0/2] Memory corruption due to HW rings allocation 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" 05/05/2020 13:19, Renata Saiakhova: > Hi Thomas, > > In our application dpdk port can be connected and disconnected: > > Connect: > new_port_id = netdev_dpdk_get_port_by_devargs(dpdk_port->pci_addr_str); > > if (!rte_eth_dev_is_valid_port(new_port_id)) { > /* Device not found in DPDK, attempt to attach it */ > if (rte_dev_probe(dpdk_port->pci_addr_str)) { > new_port_id = DPDK_ETH_PORT_ID_INVALID; > } else { > new_port_id = netdev_dpdk_get_port_by_devargs(dpdk_port->pci_addr_str); > if (rte_eth_dev_is_valid_port(new_port_id)) { > LO_TRACE("Device '%s' attached to DPDK", dpdk_port->pci_addr_str); > } else { > /* Attach unsuccessful */ > new_port_id = DPDK_ETH_PORT_ID_INVALID; > } > } > } > > Disconnect: > > dp_ConfigureRxQueues(dpdk_port, FALSE); > rte_eth_dev_set_link_down(port_id); > rte_eth_dev_stop(port_id); > rte_eth_dev_close(port_id); > > and yes, exactly, port id is recycled by eth_dev. Next time, switching from igb port to ixgbe with the same port and using HW rings of bigger size for ixgbe creates memory corruption. I see. Reusing the same rings for a new port seems really wrong indeed. Please check if same issue must be fixed in other PMDs.