From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D6290A0C47; Tue, 15 Jun 2021 14:40:49 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 58BD84067A; Tue, 15 Jun 2021 14:40:49 +0200 (CEST) Received: from mail-il1-f181.google.com (mail-il1-f181.google.com [209.85.166.181]) by mails.dpdk.org (Postfix) with ESMTP id 6968640140 for ; Tue, 15 Jun 2021 14:40:48 +0200 (CEST) Received: by mail-il1-f181.google.com with SMTP id b5so15110506ilc.12 for ; Tue, 15 Jun 2021 05:40:48 -0700 (PDT) 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=8KoyM6Qgyp+i5bhe4wUdkFu3SP8L+Yehk8nw3ZSygM8=; b=us0J0P1jD4TJsYB18Ro9Ni8ISVXmKHFO++pq5t0dAIyrXHHE0Nxz/8fsIhkEHtwXOl Le+VNYTnAMRbPuiKTmSroWkPGSJkrIrsumrFeK/G5sdXcJ3uW4VLXyFlHQqRA3Z/dppH JlmkUrf/zY4go3XQc6LeUn5H0QcgoEBESF3FWsfxW15YkapHXBDJvGu2y6JGrf2Isbfp QO+qrVksNASqGsJoK64jzZ3xZETdQE99/0haYXYOukQDKQzNJN/37wGyh5MQT9bMfM0i LQ/1OClGirc3yrKkULV+pp6XC7mBbT9Z88LmuunBiFuksGQHOnShXx04YYC6oJOMMCBn wCFQ== 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=8KoyM6Qgyp+i5bhe4wUdkFu3SP8L+Yehk8nw3ZSygM8=; b=p67QCOqyrUTlx9d/yEgQLHkqocOZ4ekMotV2FjSJ0TxqI2gNUeQIFbArHj4PNEoTg3 7cF5Hl6GVXKKPC7Jk5jZJBPli/Dj6jHnI4jhyxmfE/0b2uLabK4Olx2VQJ2YkStO106m yzCOigPsf2Bq+7Be5pnO3SCXikBR63zyeYRX0thnwusxWR0T+Z0LSwUtFwxaZLtpnJ2M MBNsffSp9m2v8lAsVNYrzijLe36IL2bdz1MTR6jw3JydZPquiDDmhcAh3P0fnir4021R Eyn3Q83y59VvHyuIBBOSW5B7a8bErhuSHoUXvyh6VIU/3qGZgcQWA1kAk4uf2GbFKrox xHIw== X-Gm-Message-State: AOAM533gUTJ7WZmI31QglGkg+bbQbHdgshFXe2gO3L1sdNOMlGbOslNn DE9463O6i/K4UujtIlBmlorNOzOpaA6afAYM7o4= X-Google-Smtp-Source: ABdhPJwnuzz2wGuWiCoF0LxXKYx8Q+Ds/8PpmKyTwHtpV/quo3Nv07Fg8bdBZwZcamM8HDuqp7AwVuFGV/j6P1PIP5I= X-Received: by 2002:a05:6e02:5d1:: with SMTP id l17mr17448817ils.162.1623760847539; Tue, 15 Jun 2021 05:40:47 -0700 (PDT) MIME-Version: 1.0 References: <20210306153404.10781-1-ndabilpuram@marvell.com> <20210607175943.31690-1-ndabilpuram@marvell.com> <20210607175943.31690-39-ndabilpuram@marvell.com> In-Reply-To: <20210607175943.31690-39-ndabilpuram@marvell.com> From: Jerin Jacob Date: Tue, 15 Jun 2021 18:10:31 +0530 Message-ID: To: Nithin Dabilpuram Cc: dpdk-dev , Jerin Jacob , Sunil Kumar Kori , Satha Koteswara Rao Kottidi , Pavan Nikhilesh , Kiran Kumar K , Satheesh Paul , Ashwin Sekhar Thalakalath Kottilveetil Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v2 38/62] net/cnxk: add flow ctrl set/get ops X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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, Jun 7, 2021 at 11:37 PM Nithin Dabilpuram wrote: > > From: Sunil Kumar Kori > > Patch implements set and get operations for flow control. > > Signed-off-by: Sunil Kumar Kori > --- > + > + /* Check if TX pause frame is already enabled or not */ > + if (fc->tx_pause ^ tx_pause) { > + if (roc_model_is_cn96_Ax() && data->dev_started) { > + /* On Ax, CQ should be in disabled state > + * while setting flow control configuration. > + */ > + plt_info("Stop the port=%d for setting flow control", > + data->port_id); > + return 0; > + } > + > + for (i = 0; i < data->nb_rx_queues; i++) { >From here: > + memset(&fc_cfg, 0, sizeof(struct roc_nix_fc_cfg)); > + rxq = ((struct cnxk_eth_rxq_sp *) > + data->rx_queues[i]) - 1; > + cq = &dev->cqs[rxq->qid]; > + fc_cfg.cq_cfg_valid = true; > + fc_cfg.cq_cfg.enable = tx_pause; > + fc_cfg.cq_cfg.rq = rxq->qid; > + fc_cfg.cq_cfg.cq_drop = cq->drop_thresh; > + rc = roc_nix_fc_config_set(nix, &fc_cfg); > + if (rc) > + return rc; Better to move this separate static function. > + } > + } > + > + rc = roc_nix_fc_mode_set(nix, mode_map[fc_conf->mode]); > + if (rc) > + return rc; > + > + fc->rx_pause = rx_pause; > + fc->tx_pause = tx_pause; > + fc->mode = fc_conf->mode; > + > + return rc; > +} > + > +int > cnxk_nix_mac_addr_set(struct rte_eth_dev *eth_dev, struct rte_ether_addr *addr) > { > struct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev); > -- > 2.8.4 >