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 13D39A051C for ; Tue, 11 Feb 2020 12:29:10 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0BCBD374; Tue, 11 Feb 2020 12:29:10 +0100 (CET) Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by dpdk.org (Postfix) with ESMTP id 44C9B1BFA8 for ; Tue, 11 Feb 2020 12:29:08 +0100 (CET) Received: by mail-wm1-f66.google.com with SMTP id p9so3041676wmc.2 for ; Tue, 11 Feb 2020 03:29:08 -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=JQEy3HgIE9cxJPtI2Z2q6Iahur/CxVxEvSuMFxpBBiA=; b=hKZFHh9sQ/CYMtqFwuX+XTctwDNzo+8l3zXgGTUPdmNUW1c19fmw8KQkl0OUpnNxtJ Xp73AhN8GZk4GBLpM+TI9SC8zDHlw0Mk5VF3Y+TVEc+SRqf2bg8jX9igNqAxVf9mK99/ wAO8ewgHUOK1PUxpa2gRdU4KEQcgT/7JkOkyhiQRpRhZ0ymRGLnzvuI8TVroS2Pcuewo US7YH3PFy0O2df8YgLClCnYs99M5nadYrPUKWn7Ukc245HUgu7Y8J1YAInUlJyEBDAmg EDBtp+DVGEqymBsQtNHqiZpVVY4mrtY03Ejs85Hk3MzQm6/sUsIW1JcdoQSuyL4hgXy/ DpNA== 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=JQEy3HgIE9cxJPtI2Z2q6Iahur/CxVxEvSuMFxpBBiA=; b=XXWNBzhoL5vLP0vclKdTxBtkiJaN2rBjYp4nvwZe62hFBkD9Aljvfs3ISgpvaaZA9e yrXY1bVrN5GJ3L/kmY/zD4OKdFZ59HiRX3HTG0HmUgFsuqhCqMIR2tdf79FYnzXK+4/6 SiTMgo9CAwZ9Df5L+TNKAwbopBCX+DdeV4U4UC8xWmKaUYySKDUyeiK2FwOSWg+iZRE0 0xGMLc21Ujh9pMwFTGRZjvqUVnMCVe8xlOttmeDmC3Du3tjXerolUParqjjPxBWRpG5U 1usnWW/1a4nQTgXSHP3S3KUMOU2o66w5kd8SmUFizIu5xRAvzIEr00tZPVlYEeM4K+7B LuBA== X-Gm-Message-State: APjAAAV67QGfsEabzd2Sevl472eF3Gcz9DPSGhQdV00LzoEK6bdJZqkS 1CovGV8ote0XesN0CKhgDEg= X-Google-Smtp-Source: APXvYqyHh72hVX4nKWwcCX3zjEHI/ZXZnKKYOewBqS9/BqeobhI22C/mfogcJuJjC45lfEC5sP/P/w== X-Received: by 2002:a05:600c:295d:: with SMTP id n29mr5160097wmd.101.1581420548005; Tue, 11 Feb 2020 03:29:08 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id q1sm4951069wrw.5.2020.02.11.03.29.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Feb 2020 03:29:07 -0800 (PST) From: luca.boccassi@gmail.com To: Kiran Kumar K Cc: Jerin Jacob , dpdk stable Date: Tue, 11 Feb 2020 11:20:35 +0000 Message-Id: <20200211112216.3929-89-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/octeontx2: fix PTP and HIGIG2 coexistence' 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 22db84d0ca4a1355a401891e378c368daf2a9f1c Mon Sep 17 00:00:00 2001 From: Kiran Kumar K Date: Tue, 14 Jan 2020 14:56:22 +0530 Subject: [PATCH] net/octeontx2: fix PTP and HIGIG2 coexistence [ upstream commit 8dc4ff37fe8b7c656aafdf81360f2ef2cd0d94d3 ] octeontx2 PMD does not support both PTP and HIGIG2 together. Added a check to enforce this and updated the Rx offload capabilities when Higig2 mode enabled. Fixes: 602009ee2dfb ("net/octeontx2: support HIGIG2") Signed-off-by: Kiran Kumar K Acked-by: Jerin Jacob --- drivers/net/octeontx2/otx2_ethdev.c | 9 ++++++++- drivers/net/octeontx2/otx2_ptp.c | 5 +++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c index 43c6107a80..268b383dbd 100644 --- a/drivers/net/octeontx2/otx2_ethdev.c +++ b/drivers/net/octeontx2/otx2_ethdev.c @@ -18,7 +18,8 @@ nix_get_rx_offload_capa(struct otx2_eth_dev *dev) { uint64_t capa = NIX_RX_OFFLOAD_CAPA; - if (otx2_dev_is_vf(dev)) + if (otx2_dev_is_vf(dev) || + dev->npc_flow.switch_header_type == OTX2_PRIV_FLAGS_HIGIG) capa &= ~DEV_RX_OFFLOAD_TIMESTAMP; return capa; @@ -1641,6 +1642,12 @@ otx2_nix_configure(struct rte_eth_dev *eth_dev) goto fail_offloads; } + if (dev->ptp_en && + dev->npc_flow.switch_header_type == OTX2_PRIV_FLAGS_HIGIG) { + otx2_err("Both PTP and switch header enabled"); + goto free_nix_lf; + } + rc = nix_lf_switch_header_type_enable(dev); if (rc) { otx2_err("Failed to enable switch type nix_lf rc=%d", rc); diff --git a/drivers/net/octeontx2/otx2_ptp.c b/drivers/net/octeontx2/otx2_ptp.c index f34b9339c4..ae5a2b7cd1 100644 --- a/drivers/net/octeontx2/otx2_ptp.c +++ b/drivers/net/octeontx2/otx2_ptp.c @@ -221,6 +221,11 @@ otx2_nix_timesync_enable(struct rte_eth_dev *eth_dev) return -EINVAL; } + if (dev->npc_flow.switch_header_type == OTX2_PRIV_FLAGS_HIGIG) { + otx2_err("Both PTP and switch header enabled"); + return -EINVAL; + } + /* Allocating a iova address for tx tstamp */ const struct rte_memzone *ts; ts = rte_eth_dma_zone_reserve(eth_dev, "otx2_ts", -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-02-11 11:17:42.011577531 +0000 +++ 0089-net-octeontx2-fix-PTP-and-HIGIG2-coexistence.patch 2020-02-11 11:17:38.528003740 +0000 @@ -1,14 +1,15 @@ -From 8dc4ff37fe8b7c656aafdf81360f2ef2cd0d94d3 Mon Sep 17 00:00:00 2001 +From 22db84d0ca4a1355a401891e378c368daf2a9f1c Mon Sep 17 00:00:00 2001 From: Kiran Kumar K Date: Tue, 14 Jan 2020 14:56:22 +0530 Subject: [PATCH] net/octeontx2: fix PTP and HIGIG2 coexistence +[ upstream commit 8dc4ff37fe8b7c656aafdf81360f2ef2cd0d94d3 ] + octeontx2 PMD does not support both PTP and HIGIG2 together. Added a check to enforce this and updated the Rx offload capabilities when Higig2 mode enabled. Fixes: 602009ee2dfb ("net/octeontx2: support HIGIG2") -Cc: stable@dpdk.org Signed-off-by: Kiran Kumar K Acked-by: Jerin Jacob