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 A29A6A04B3; Tue, 28 Jan 2020 12:27:55 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3D3C01C2A0; Tue, 28 Jan 2020 12:27:53 +0100 (CET) Received: from mail-io1-f67.google.com (mail-io1-f67.google.com [209.85.166.67]) by dpdk.org (Postfix) with ESMTP id DB9C91C29F for ; Tue, 28 Jan 2020 12:27:51 +0100 (CET) Received: by mail-io1-f67.google.com with SMTP id t26so13823223ioi.13 for ; Tue, 28 Jan 2020 03:27:51 -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=dVNRriNQ4u7/DsxXnf/ObiWEAOeTC7f6/sa1g4cxze4=; b=GXGzRU0Xma5gF6cdDUchn5zUg/MPuNkQuTo0CBMFEt0tXfCE05UgLoi8pBW6bJ9Y8s 7s9QOG3oVn5atD9fTthQWt5Ia1HuHrE5z+7+MN/JRw988b6+d2duNqyeaQ8q4cOT+tkr o1AiOUxQ/AZbXh8neLE/TNQTmOboNYmTNl0GvDd02nrns1T3Jgjc2ecpIFAs5w0cPbI5 hLR2ONVsq+YZb7QgCxqtj6zs3LYVQBpdmT5zf436NHfGIcmGxoZ7lb2sJlwMbkk6wU6u +QvFsXBNkGBtQxWizmXNADvhcxN8AlRuS7RscmUqkKBGn4lSwwJRAFDoODWQbPxE/e53 Uwnw== 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=dVNRriNQ4u7/DsxXnf/ObiWEAOeTC7f6/sa1g4cxze4=; b=Pw9N7qPkw8svgnBlk+qbSK2jQf85TpfmpnIZ48Xzqkoo2cXjEvH4SxkSOWkKZFGvuC CFIKeRCkj+GkDKJIrgbbhQOJhKw2Z2cPCRBOyTORbKbgp86fgnjqCLed/j9edUwFn+yj qLjn8uyRiznRAUHnkNVGyj6wH7VIQfS9MVIDvjOSB3dx/2ZkoXGxp2GzKFlHKxsOnp/Z PEfMS6iZWU+VNVngD193JSh8bYT+cvUU8IgX8oXDdEL/+bMNGQwrslKP6DmhJtg1AgUS 2vGK3NhmqXLmkCge5JXWMf4l9SkfDo/rAY+MIXJuhDHNIgUv1V266rR/YSyqV4pHMkRR ojOA== X-Gm-Message-State: APjAAAVNhxZgGAwIkDlIPV6rIqWttvA4QkZQnVUlcjFZOfy0M0bUR0Hc 7J9NOHmkN8vks/uSDm8Yzxni/Iu/2a98CuKiXb0= X-Google-Smtp-Source: APXvYqy1+LqH5qiJmqzZ4qD/5Xz5ENk/9nYlipvO7mhmIh11qRv9OKB9l9nnN7lA6A4J0a2wYesRfjCmXtB5XU+E6nQ= X-Received: by 2002:a5d:8cce:: with SMTP id k14mr17185769iot.294.1580210871158; Tue, 28 Jan 2020 03:27:51 -0800 (PST) MIME-Version: 1.0 References: <20200124135426.13157-1-kirankumark@marvell.com> In-Reply-To: <20200124135426.13157-1-kirankumark@marvell.com> From: Jerin Jacob Date: Tue, 28 Jan 2020 16:57:35 +0530 Message-ID: To: Kiran Kumar K , Ferruh Yigit Cc: Jerin Jacob , Nithin Dabilpuram , dpdk-dev Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH] net/octeontx2: disable HIGIG on port stop 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 Fri, Jan 24, 2020 at 7:25 PM wrote: > > From: Kiran Kumar K > > If HIGIG mode is enabled on configure, This needs to be disabled > on port stop. Adding support to send mbox message on port stop > to configure the port to default. > > Signed-off-by: Kiran Kumar K Acked-by: Jerin Jacob Applied to dpdk-next-net-mrvl/master. Thanks > --- > drivers/net/octeontx2/otx2_ethdev.c | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c > index 268b383db..11f8c786b 100644 > --- a/drivers/net/octeontx2/otx2_ethdev.c > +++ b/drivers/net/octeontx2/otx2_ethdev.c > @@ -93,7 +93,7 @@ nix_lf_alloc(struct otx2_eth_dev *dev, uint32_t nb_rxq, uint32_t nb_txq) > } > > static int > -nix_lf_switch_header_type_enable(struct otx2_eth_dev *dev) > +nix_lf_switch_header_type_enable(struct otx2_eth_dev *dev, bool enable) > { > struct otx2_mbox *mbox = dev->mbox; > struct npc_set_pkind *req; > @@ -106,12 +106,16 @@ nix_lf_switch_header_type_enable(struct otx2_eth_dev *dev) > /* Notify AF about higig2 config */ > req = otx2_mbox_alloc_msg_npc_set_pkind(mbox); > req->mode = dev->npc_flow.switch_header_type; > + if (enable == 0) > + req->mode = OTX2_PRIV_FLAGS_DEFAULT; > req->dir = PKIND_RX; > rc = otx2_mbox_process_msg(mbox, (void *)&rsp); > if (rc) > return rc; > req = otx2_mbox_alloc_msg_npc_set_pkind(mbox); > req->mode = dev->npc_flow.switch_header_type; > + if (enable == 0) > + req->mode = OTX2_PRIV_FLAGS_DEFAULT; > req->dir = PKIND_TX; > return otx2_mbox_process_msg(mbox, (void *)&rsp); > } > @@ -1648,7 +1652,7 @@ otx2_nix_configure(struct rte_eth_dev *eth_dev) > goto free_nix_lf; > } > > - rc = nix_lf_switch_header_type_enable(dev); > + rc = nix_lf_switch_header_type_enable(dev, true); > if (rc) { > otx2_err("Failed to enable switch type nix_lf rc=%d", rc); > goto free_nix_lf; > @@ -1882,6 +1886,7 @@ otx2_nix_dev_stop(struct rte_eth_dev *eth_dev) > struct otx2_eth_rxq *rxq; > int count, i, j, rc; > > + nix_lf_switch_header_type_enable(dev, false); > nix_cgx_stop_link_event(dev); > npc_rx_disable(dev); > > -- > 2.17.1 >