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 870C4A04FE; Tue, 14 Jan 2020 15:07:46 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4BD691C19B; Tue, 14 Jan 2020 15:07:45 +0100 (CET) Received: from mail-io1-f68.google.com (mail-io1-f68.google.com [209.85.166.68]) by dpdk.org (Postfix) with ESMTP id CC9021C06B; Tue, 14 Jan 2020 15:07:43 +0100 (CET) Received: by mail-io1-f68.google.com with SMTP id n11so13925109iom.9; Tue, 14 Jan 2020 06:07:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=e0lIPwj8/efUrL9ZBZSRStSJhmkWheQeHjB1IC143v4=; b=TMlv+L8FbQkm8UQU4Vs7EptZF2eUh6RaADFDyL/TESOYgbvnQHn5QekIHNiorK7Zab qFtpRb7xyzomtARwacBG4x0WE2UWJZxNc0l4PEDmb1NERyj6QyDJMbUtL8XjdiSAE+b4 QcOX67cbzZ0EcKL1fq+ROb5u3iZ7fkvGyk8+KNJjiBZ0e1yZsU202cyNkN/1D+bIZD0s 6wfmIJe1L0xY/QsrpKsv9AdmqqkKji4rjPUPGbUXpqdNM4H/ECL9Z2iFcNP1kQ6uEwY+ WubtVoGMl+9EqJ/9go7ORGwzdWrAJ17SfgOS2mfsIIWuC9OXTvOf2Mbm/75+6HCCW4eH sTOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=e0lIPwj8/efUrL9ZBZSRStSJhmkWheQeHjB1IC143v4=; b=Q2XCQV8c1Qis+VlUxrPDiLlHx0we3ZayCV1mBzxCVdx6iMXTKIMLMA7GG6k6CG/Vz8 3FnwyRuvl4sJm29RKJ+prScSFTQ0vExNYKHpbQ2EyIf1PBiPkCGVmi3q71EleZPFSVcB wtEE2F7jUWQy20Ane/XRp5HgVQsUokwtRLp1vs5rngMNIutdKhM7ZSpICxkQZ6gkTRLv 5tuxktDixGzBH0RwURXDq//qaOzapEz9tSuqjJ0zlMrpbAW01reARoSBPJaPqoLUrLiy 2N7HQ+mLVdCZwFwMxQQTFjiFwbj9cOh4vzyBZc9A/7xVkwovEiSAGptYR/YWY9jDmj10 TgZw== X-Gm-Message-State: APjAAAXd8ic2+v4hYkOLF1L7YacE9reYn8wYm2qPoHJDW1cErpCDdcdh QNxJShpOvcv/TKrUK2LEKfIWj9GSaCoWeZlXsIwddv9GhMEz5Q== X-Google-Smtp-Source: APXvYqxuQTSu2Chv6aaKEqHwJFvEPJOu+hfeoNhUKchOrlbNEASOH4F1OsA0keIFLq2qZoTZ/bHJkt7VP+fU+Ds1bq4= X-Received: by 2002:a6b:c742:: with SMTP id x63mr17365928iof.162.1579010863076; Tue, 14 Jan 2020 06:07:43 -0800 (PST) MIME-Version: 1.0 References: <20200114082854.13198-1-kirankumark@marvell.com> <20200114092622.13944-1-kirankumark@marvell.com> In-Reply-To: <20200114092622.13944-1-kirankumark@marvell.com> From: Jerin Jacob Date: Tue, 14 Jan 2020 19:37:27 +0530 Message-ID: To: Kiran Kumar K , Ferruh Yigit Cc: Jerin Jacob , Nithin Dabilpuram , dpdk-dev , dpdk stable Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v3] net/octeontx2: fix PTP and HIGIG2 coexistence 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" On Tue, Jan 14, 2020 at 2:57 PM wrote: > > From: Kiran Kumar K > > 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 Fixed the ./devtools/check-git-log.sh issues. Applied to dpdk-next-net-mrvl/master. Thanks > --- > V3 Changes: > * Fixed commit log > > V2 Chanhes: > * Fixed error message > > 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 ed329273d..2e91a5ab7 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 f34b9339c..ae5a2b7cd 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.17.1 >