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 08668A04FD; Tue, 14 Jan 2020 07:49:38 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 810E31C00D; Tue, 14 Jan 2020 07:49:37 +0100 (CET) Received: from mail-io1-f65.google.com (mail-io1-f65.google.com [209.85.166.65]) by dpdk.org (Postfix) with ESMTP id 244FC1BFF8 for ; Tue, 14 Jan 2020 07:49:36 +0100 (CET) Received: by mail-io1-f65.google.com with SMTP id i11so12619262ioi.12 for ; Mon, 13 Jan 2020 22:49:36 -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=57vH80cO+cXjBf5yL07xpK+HsYTXOh/VN6We/UJ78vM=; b=hLE8moBXqbm6KI9y4Aei5xRS7b02jYInfesCE7FEuPl8NmOJLNsU7ivrwFSi8/jKHd iW79EyuUtJYjstz1A5urWGDxIC9oLubzvuRTmJN9fEfe1j4Buyns7lQZgjk6S/BtDz39 C4lAKeD7iFmMLFIxgLGWJce43s5aytHoLnnzC5MNA+aHsIWG4Zuzz2gNfg715ub+8Gbl QzQ84ZKuBBdocIw4NPVugs2fZ/PTtH7+4b5ITk8tX6WCZj/RBIA9KXH8+P7doizKbTlV NGRWshkKP2OXQWSOjoOixdCpQDjKPmcL72azBCeMfpRgfhnVGgxdZl5SC3wrLrGdygu3 PQMQ== 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=57vH80cO+cXjBf5yL07xpK+HsYTXOh/VN6We/UJ78vM=; b=qv6xa3Ebuth9jdh7MWqP0QGGvbr5iilxxbyFlNI+zF6HM7M5byh+wdFAvvQHFOoakD c0sGDBAaI+7LT/lVncVHlgopn8POXLzBOdl+BG9JM5wWs01LQJ4OVdhgRoxkqET/kAPV 04EQp616mEQ+ruYRO0o+R6iiBft8cqGFjJ7pe1gdoDFH+4rsqYQreQwDmNPBXZnCsqji mwDrh7u8EssWPhBmU9lrcKUDgaM+34c9d6WmBhQ2m3YehHbctlS2i24D7JrAqhEcCcMe /c3uBbuAYpBl/iBBDwSJxXVESkbeA0PQldrgTTKk+H5nvL4FTn6QQGDHgsR5h/b7Fu3W Ux3g== X-Gm-Message-State: APjAAAWQ7i/Humv5xQoCYCqDlS3Nvdd/OrXW5A7kW5L7X5Nsq2sLdcRC ck5jz+B3tMLdbKa/9uy06HZ9X+i/zGYe+qxA/mQ= X-Google-Smtp-Source: APXvYqxCRQpgi3ItvW+hnyFTEbmXBccyBi1r6pKjMYdHlryx/rvMMXAeH4HgYyJprk9gIWzWiamFQ2xz1Qkjt6i+qO4= X-Received: by 2002:a5e:8b44:: with SMTP id z4mr15810503iom.271.1578984575351; Mon, 13 Jan 2020 22:49:35 -0800 (PST) MIME-Version: 1.0 References: <20200113042452.29013-1-kirankumark@marvell.com> In-Reply-To: <20200113042452.29013-1-kirankumark@marvell.com> From: Jerin Jacob Date: Tue, 14 Jan 2020 12:19:19 +0530 Message-ID: To: Kiran Kumar K Cc: Jerin Jacob , Nithin Dabilpuram , dpdk-dev Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH] net/octeontx2: add check for PTP and HIGIG2 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 Mon, Jan 13, 2020 at 9:55 AM wrote: > > From: Kiran Kumar K > > For octeontx2 we won't support both PTP and HIGIG2 together. > Added a check to verify this. Since it is a bug fix, Could change to the following or similar and send v2: net/octeontx2: fix PTP and HIGIG2 coexistence. 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: .. Cc: stable@dpdk.org > > Signed-off-by: Kiran Kumar K > --- > 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..b4c68191d 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"); Please remove the space before "Both.." I think, we can use the below error message also here. > + 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..74cb007a0 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("PTP mode not supported in HIGIG mode"); See above. > + 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 >