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 55B71A051C for ; Tue, 11 Feb 2020 12:34:59 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4E2641BDFD; Tue, 11 Feb 2020 12:34:59 +0100 (CET) Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by dpdk.org (Postfix) with ESMTP id C85B21BDFD for ; Tue, 11 Feb 2020 12:34:57 +0100 (CET) Received: by mail-wm1-f68.google.com with SMTP id c84so3095421wme.4 for ; Tue, 11 Feb 2020 03:34:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3NEWry3ZcfqLQhDSNiKaiJGufvpM2h2146jU3cmLI5M=; b=Mf9l7LYMAx34bsa6J35J2B4fhjF8sYzaLsMxK1IvVguAudOU2/pZIb4hNdooyWmara 45/3Fk98tnw1JLnMqzGrbT6HQjDxrMOzGW3wddGH8J299xPuQxz1lLEqyVnvChsQ5qPO wykfIg2GbWqoQZsbk8DMDUXviVyWbv1TxiV5TMfBaIlJK/o8XilX4yXVDsQzLXEmtE7+ Mj6+IFRlllcAmyNM8rgvwyUD2Sguu+9QzMr/SUv9q2A64qoDqvqPILpH9+HzKrP0stIa ggiPGmGkwJ2hJQO8XI45Bo4yOk6RrUlOuVath6qSPYU198akDO8Poj9zn/qo8pOecJrJ OQpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3NEWry3ZcfqLQhDSNiKaiJGufvpM2h2146jU3cmLI5M=; b=bjE3GekY2yF/JXD7xRAwKsobefCRLGGMR8TDVio+NlhvY96eY/zQvTMFzmyyWq3KXK Tuu+02ayq5pu0uWjdnNsb2gslykuGfy7Qxa+av0gwWffcFn9kKxd1eGvP6SGLQullh+k ebQN6dBsbYirZZaiL9hsXaAXF0lyAvomAux/IbCtwAJ+4ImTk4RXaF+aBlWK4mxhe5SW cUKk3BJqHSrNSeftFhIa71yYujSu52i8zUzT4HUeq3W3dipHeEhwf5LIZwC2XobUItHH HC8ZEuJChpDuDgB5R3m+4A4xMfIhmUpi8P5mSBanv3voyIruLIeVhTH9l0c/3Mz6oqyl wnyg== X-Gm-Message-State: APjAAAWS1M8CzEAz5ua2tg9bVdQH5MMhuN/FP7TRnhHXklN1eo5ftlea ZtxsZ6oh02WMTGMXmxx1m9SIDEvnxj8= X-Google-Smtp-Source: APXvYqwtOzFBV+r9HbTkzNvn41NTfMSkzihxefuduUM21KErLvbhjwbExWTY67m6v1R1Ag+Wh5w9ZQ== X-Received: by 2002:a1c:bc46:: with SMTP id m67mr5065631wmf.40.1581420897541; Tue, 11 Feb 2020 03:34:57 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id 5sm5148851wrc.75.2020.02.11.03.34.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Feb 2020 03:34:57 -0800 (PST) From: luca.boccassi@gmail.com To: Kalesh AP Cc: Somnath Kotur , Ajit Khaparde , Santoshkumar Karanappa Rastapur , dpdk stable Date: Tue, 11 Feb 2020 11:21:17 +0000 Message-Id: <20200211112216.3929-131-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200211112216.3929-1-luca.boccassi@gmail.com> References: <20200211112216.3929-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/bnxt: fix probe in FreeBSD' has been queued to stable release 19.11.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/13/20. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Thanks. Luca Boccassi --- >From 877136a915e552265f3c657de7b0cf4df10d199d Mon Sep 17 00:00:00 2001 From: Kalesh AP Date: Thu, 16 Jan 2020 18:34:47 +0530 Subject: [PATCH] net/bnxt: fix probe in FreeBSD [ upstream commit d9fc6a0d07559cfa718efe971a51620c23ba211e ] In FreeBSD environment, nic_uio driver does not support interrupts and rte_intr_callback_register() will fail to register interrupts which in turn causes bnxt driver probe failure. Fixed driver to ignore interrupt callback failures in FreeBSD. Also fixed to not use a dedicated completion ring for async events from FW and process these events on RXQ0 in FreeBSD. Fixes: 6de4c538b393 ("net/bnxt: fix error handling in port start") Fixes: 43f78b380f89 ("net/bnxt: retry IRQ callback deregistration") Signed-off-by: Kalesh AP Reviewed-by: Somnath Kotur Reviewed-by: Ajit Khaparde Reviewed-by: Santoshkumar Karanappa Rastapur --- drivers/net/bnxt/bnxt.h | 8 ++++++++ drivers/net/bnxt/bnxt_ethdev.c | 3 +++ drivers/net/bnxt/bnxt_irq.c | 8 ++++++++ 3 files changed, 19 insertions(+) diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h index d00186f79e..c818bede80 100644 --- a/drivers/net/bnxt/bnxt.h +++ b/drivers/net/bnxt/bnxt.h @@ -117,6 +117,14 @@ #define BNXT_NUM_ASYNC_CPR(bp) 1 #endif +/* In FreeBSD OS, nic_uio driver does not support interrupts */ +#ifdef RTE_EXEC_ENV_FREEBSD +#ifdef BNXT_NUM_ASYNC_CPR +#undef BNXT_NUM_ASYNC_CPR +#endif +#define BNXT_NUM_ASYNC_CPR(bp) 0 +#endif + #define BNXT_MISC_VEC_ID RTE_INTR_VEC_ZERO_OFFSET #define BNXT_RX_VEC_START RTE_INTR_VEC_RXTX_OFFSET diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 3e7bc61325..c3fec1561d 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -439,8 +439,11 @@ skip_cosq_cfg: /* enable uio/vfio intr/eventfd mapping */ rc = rte_intr_enable(intr_handle); +#ifndef RTE_EXEC_ENV_FREEBSD + /* In FreeBSD OS, nic_uio driver does not support interrupts */ if (rc) goto err_free; +#endif rc = bnxt_get_hwrm_link_config(bp, &new); if (rc) { diff --git a/drivers/net/bnxt/bnxt_irq.c b/drivers/net/bnxt/bnxt_irq.c index 846325ea96..40e1b0c980 100644 --- a/drivers/net/bnxt/bnxt_irq.c +++ b/drivers/net/bnxt/bnxt_irq.c @@ -181,5 +181,13 @@ int bnxt_request_int(struct bnxt *bp) irq->requested = 1; } +#ifdef RTE_EXEC_ENV_FREEBSD + /** + * In FreeBSD OS, nic_uio does not support interrupts and + * interrupt register callback will fail. + */ + rc = 0; +#endif + return rc; } -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-02-11 11:17:43.255973266 +0000 +++ 0131-net-bnxt-fix-probe-in-FreeBSD.patch 2020-02-11 11:17:38.628005610 +0000 @@ -1,8 +1,10 @@ -From d9fc6a0d07559cfa718efe971a51620c23ba211e Mon Sep 17 00:00:00 2001 +From 877136a915e552265f3c657de7b0cf4df10d199d Mon Sep 17 00:00:00 2001 From: Kalesh AP Date: Thu, 16 Jan 2020 18:34:47 +0530 Subject: [PATCH] net/bnxt: fix probe in FreeBSD +[ upstream commit d9fc6a0d07559cfa718efe971a51620c23ba211e ] + In FreeBSD environment, nic_uio driver does not support interrupts and rte_intr_callback_register() will fail to register interrupts which in turn causes bnxt driver probe failure. @@ -13,7 +15,6 @@ Fixes: 6de4c538b393 ("net/bnxt: fix error handling in port start") Fixes: 43f78b380f89 ("net/bnxt: retry IRQ callback deregistration") -Cc: stable@dpdk.org Signed-off-by: Kalesh AP Reviewed-by: Somnath Kotur @@ -26,7 +27,7 @@ 3 files changed, 19 insertions(+) diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h -index 21ca059b8a..3487b917ed 100644 +index d00186f79e..c818bede80 100644 --- a/drivers/net/bnxt/bnxt.h +++ b/drivers/net/bnxt/bnxt.h @@ -117,6 +117,14 @@ @@ -45,7 +46,7 @@ #define BNXT_RX_VEC_START RTE_INTR_VEC_RXTX_OFFSET diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c -index 7b5df9ac12..879ea580fe 100644 +index 3e7bc61325..c3fec1561d 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -439,8 +439,11 @@ skip_cosq_cfg: