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 AA17E43B04; Thu, 15 Feb 2024 01:38:58 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2FF6A4026C; Thu, 15 Feb 2024 01:38:58 +0100 (CET) Received: from smtp-gw.pt.net (smtp-gw.pt.net [206.210.192.15]) by mails.dpdk.org (Postfix) with ESMTP id 9117B4025C for ; Thu, 15 Feb 2024 01:38:56 +0100 (CET) X-ASG-Debug-ID: 1707957535-09411a7d9a2c9e70001-TfluYd Received: from mail.pt.net (mail.pt.net [206.210.194.11]) by smtp-gw.pt.net with ESMTP id Y93Dg8YIj9NLEPBF (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Wed, 14 Feb 2024 18:38:55 -0600 (CST) X-Barracuda-Envelope-From: lew@perftech.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 E91CE1BE115B for ; Wed, 14 Feb 2024 18:38:54 -0600 (CST) Received: from mail.pt.net ([IPv6:::1]) by localhost (mail.pt.net [IPv6:::1]) (amavis, port 10032) with ESMTP id CDQkI_68eAB3 for ; Wed, 14 Feb 2024 18:38:54 -0600 (CST) Received: from localhost (localhost [IPv6:::1]) by mail.pt.net (Postfix) with ESMTP id 8D0F91BE1317 for ; Wed, 14 Feb 2024 18:38:54 -0600 (CST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.pt.net 8D0F91BE1317 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=perftech.com; s=B15A3A56-ABEA-11EE-9719-5F12F125680F; t=1707957534; bh=lvJc/SUk69CjpQcDkFOucPEr2XtTUxEBONP+yeNfNLM=; h=Date:From:To:Message-ID:MIME-Version; b=aXtQM4SXChnwH3792Ryiddz/jZXwrLPr8O5/1xtS7QvsTbnP00rnsoKa6mvPrr+y7 d+uCWeR7M0HOMIIZMFrVxYw8QNfGKGHEq0HjEndwWf4X7XWd08miT4uyZ/sjH5iBta P9XGeko2mUYM2Mfyo2rdHgmV9h8cAtJ2Qt4UwouwLuPS52vwVR7UwSkyClBvh8EoBa EFNGY7p9OTONRlRvdKug8GDq3FYcXonut0dJ6ChEe4RSE1G9gMIPNDlMBv5PdIhZEU NhfZf1l9htDxDd41FRg+iGm5DjGi2DHyyQWwLeVmM5tCZsQYQuN4XH1q/kBK04X/ZU IHnJcugScVV7A== X-Virus-Scanned: amavis at pt.net Received: from mail.pt.net ([IPv6:::1]) by localhost (mail.pt.net [IPv6:::1]) (amavis, port 10026) with ESMTP id zSlaEH0STmjU for ; Wed, 14 Feb 2024 18:38:54 -0600 (CST) Received: from mail.pt.net (mail.pt.net [206.210.194.11]) by mail.pt.net (Postfix) with ESMTP id 754A31BE1158 for ; Wed, 14 Feb 2024 18:38:54 -0600 (CST) Date: Wed, 14 Feb 2024 18:38:54 -0600 (CST) From: Lewis Donzis To: dev Message-ID: <1480279383.14236704.1707957534180.JavaMail.zimbra@donzis.com> Subject: ixgbe link status semi-broken on FreeBSD MIME-Version: 1.0 X-ASG-Orig-Subj: ixgbe link status semi-broken on FreeBSD 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_4581 (ZimbraWebClient - GC121 (Mac)/8.8.15_GA_4581) Thread-Index: ObqHxA68GlVa+v85AKHvbdwrtgDOFQ== Thread-Topic: ixgbe link status semi-broken on FreeBSD X-Barracuda-Connect: mail.pt.net[206.210.194.11] X-Barracuda-Start-Time: 1707957535 X-Barracuda-Encrypted: TLS_AES_256_GCM_SHA384 X-Barracuda-URL: https://smtp-gw.pt.net:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at pt.net X-Barracuda-Scan-Msg-Size: 917 X-Barracuda-BRTS-Status: 1 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.120843 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 I keep meaning to mention this because we've been patching the ixgbe driver for a while... In ixgbe_ethdev.c, function ixgbe_dev_link_update_share(), we find the following: /* BSD has no interrupt mechanism, so force NIC status synchronization. */ #ifdef RTE_EXEC_ENV_FREEBSD wait = 1; #endif Which changes the behavior of rte_eth_link_get_nowait() and causes it to wait. For a port that does not have link up, this takes approximately 12-14 seconds before it returns, which is highly undesirable. However, after disabling this one line of code, it still appears to work properly. It returns the correct link status on ports that are up or down, but does so without any delay. So I'm wondering, is this still necessary? No doubt, FreeBSD doesn't support interrupts, but why does that require that we wait in this case? Empirically, it works much better without that line of code.