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 B2CCFA034F; Mon, 6 Dec 2021 14:58:43 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3996741160; Mon, 6 Dec 2021 14:58:43 +0100 (CET) Received: from smtp-gw.pt.net (smtp-gw.pt.net [206.210.194.15]) by mails.dpdk.org (Postfix) with ESMTP id 29A8C410E5 for ; Mon, 6 Dec 2021 14:58:41 +0100 (CET) X-ASG-Debug-ID: 1638799119-09411a39e0a4e000001-TfluYd Received: from mail.pt.net (mail.pt.net [206.210.194.11]) by smtp-gw.pt.net with ESMTP id yHmGteUtOMEuVCOS (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 06 Dec 2021 07:58:39 -0600 (CST) X-Barracuda-Envelope-From: lew@donzis.com X-Barracuda-Effective-Source-IP: mail.pt.net[206.210.194.11] X-Barracuda-Apparent-Source-IP: 206.210.194.11 Received: from localhost (localhost [IPv6:::1]) by mail.pt.net (Postfix) with ESMTP id CF073E6FE1D; Mon, 6 Dec 2021 07:58:39 -0600 (CST) Received: from mail.pt.net ([IPv6:::1]) by localhost (mail.pt.net [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id 7THfQXTNEVNN; Mon, 6 Dec 2021 07:58:39 -0600 (CST) Received: from localhost (localhost [IPv6:::1]) by mail.pt.net (Postfix) with ESMTP id 8C266E6FDB7; Mon, 6 Dec 2021 07:58:39 -0600 (CST) X-Virus-Scanned: amavisd-new at pt.net Received: from mail.pt.net ([IPv6:::1]) by localhost (mail.pt.net [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id W5tF5BYe5p-A; Mon, 6 Dec 2021 07:58:39 -0600 (CST) Received: from mail.pt.net (mail.pt.net [206.210.194.11]) by mail.pt.net (Postfix) with ESMTP id 6D7F1E6FE1C; Mon, 6 Dec 2021 07:58:39 -0600 (CST) Date: Mon, 6 Dec 2021 07:58:39 -0600 (CST) From: Lewis Donzis To: "Ananyev, Konstantin" Cc: Bruce Richardson , dev , yongwang Message-ID: <1363635277.2864001.1638799119299.JavaMail.zimbra@donzis.com> In-Reply-To: References: <2134779104.413217.1638218715124.JavaMail.zimbra@donzis.com> <1909271468.2730688.1638755553311.JavaMail.zimbra@donzis.com> Subject: Re: vmxnet3 no longer functional on DPDK 21.11 MIME-Version: 1.0 X-ASG-Orig-Subj: Re: vmxnet3 no longer functional on DPDK 21.11 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Originating-IP: [206.210.194.11] X-Mailer: Zimbra 8.8.15_GA_4173 (ZimbraWebClient - GC96 (Mac)/8.8.15_GA_4177) Thread-Topic: vmxnet3 no longer functional on DPDK 21.11 Thread-Index: o/jjZ+CyItzPMbs7SgqJF7gIpB8YY74FEI8AgAinjoCAAHwqgIAAL+/wfl8tyXU= X-Barracuda-Connect: mail.pt.net[206.210.194.11] X-Barracuda-Start-Time: 1638799119 X-Barracuda-Encrypted: TLS_AES_256_GCM_SHA384 X-Barracuda-URL: https://smtp-gw.pt.net:443/cgi-mod/mark.cgi X-Barracuda-BRTS-Status: 1 X-Virus-Scanned: by bsmtpd at pt.net X-Barracuda-Scan-Msg-Size: 2848 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=9.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.94446 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 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 Dec 6, 2021, at 6:08 AM, Ananyev, Konstantin konstantin.ananyev@intel.com wrote: > So to clarify, it fails at: > static int > vmxnet3_dev_start(struct rte_eth_dev *dev) > { > ... > line 1695: > if (rte_intr_enable(dev->intr_handle) < 0) { > PMD_INIT_LOG(ERR, "interrupt enable failed"); > return -EIO; > } > > Right? That's right. And further, the failure inside of rte_intr_enable() is the test on rte_intr_dev_fd_get(): int rte_intr_enable(const struct rte_intr_handle *intr_handle) { ... if (rte_intr_fd_get(intr_handle) < 0 || rte_intr_dev_fd_get(intr_handle) < 0) { rc = -1; goto out; } switch (rte_intr_type_get(intr_handle)) { /* not used at this moment */ case RTE_INTR_HANDLE_ALARM: rc = -1; break; /* not used at this moment */ case RTE_INTR_HANDLE_DEV_EVENT: rc = -1; break; /* unknown handle type */ default: RTE_LOG(ERR, EAL, "Unknown handle type of fd %d\n", rte_intr_fd_get(intr_handle)); rc = -1; break; } out: rte_eal_trace_intr_enable(intr_handle, rc); return rc; } Two things about this code that confuse me: 1. rte_intr_dev_fd_get(intr_handle) just returns the value of intr_handle->dev_fd, which is never set to anything other than -1 in any code I can find. 2. Even if it made it past that "if" statement, I don't see how the switch that follows ever *doesn't* return an error, i.e., every single case results in an error! Even if it got past rte_intr_dev_fd_get(), the interrupt type is neither of the first two cases, so it would presumably execute the default case. > The strange thing here is that 7a0935239b9e > doesn't change dev_start or rte_intr code in any way. I agree, and also don't see any way the diffs between those two commits could cause this. > Anyway, if git blames that commit, let's try to figure out what is going on. > Unfortunately, I don't have freebsd with vmxnet3, so will need to rely on your > help here. Sure no problem. If it helps, we could arrange for remote access to a FreeBSD VM, but I suspect this is going to be something simple, so let's see if we can get it figured out. > As the first thing can you try to run testpmd build with last good commit > (c87d435a4d79) > and then testpmd build with bad commit applied and collect for both cases: > - contents of 'struct rte_eth_dev' and ' rte_eth_dev->intr_handle' for > your vmxnet3 port > - debug log output (--log-level=eal,debug --log-level=pmd,debug) Ok, we'll check it out. Thanks, lew