From patchwork Tue Aug 11 12:30:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 247620 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp547241ilo; Tue, 11 Aug 2020 05:37:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxBKxQEJ+NORdzgbKbecE2kU7tVT0SLjbLkKBHLBnLx187WhtMOEK6bkzeYpZNli9zkMfEd X-Received: by 2002:a25:4056:: with SMTP id n83mr47229990yba.413.1597149425791; Tue, 11 Aug 2020 05:37:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597149425; cv=none; d=google.com; s=arc-20160816; b=zCS7m0cmmlfKZDz+gykdx+7QFZqEP7DMC62sNDFHlp3A3bynzKms3L9Cy2To1/7sHl W/xNkUB+Mxa/9sJZ3aZirOX4XeczwzWQkZDRDsEBU+qzk1xiobC3xUkClyQvJLL8yvyt IGTb2dmBu2wgszo2aMnV7Y+Fuf8b2AD6feoMIPxWD7C5Mov9IgrFn7lPDRK0Ie+Aanwi U/cS7omSqDfr4qbhNQzvIL9dzAr8O1LSACY4TQ7agZX0O48I0gvfhKSNE4DH9pkFKoTi 05+WVOfF/iMDs8eOOeRCv7MwZ7GyLvYmBsdOH+rKkW4pZWpOUxp343SaGx3MDj+m3Yww A1Cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:cc:to:from; bh=e0tKmvSKglDvyEC3KGbffKAB/k07makrmKHXC0Dr4Hk=; b=fV1g/dPsVkrQB02XDlR7QqvDaHeSx1FRGoNkvCdkFCu2EkQWgxaGCXauUU/013upqI YAy0sZrvXrL7aoa3rcfHz/hwWKvnEN7hb/MdJQ9Rzdm/AnaJjKKawXLUR8v/Exxgg9Lg w/5jxJpo6/5T9ukNvsJtZemyzunGybn0dgyuQ2/rCuPKfszjyTZhDR5SGCWA1/3yelEJ jutlTo2/lls4L4oFTTL1UfCpeSQLzce0lXaBjloh7W6cjqEZXXjQe1Gz9tXXHW1y5O/0 pCAfqgO+5zAFxRTRi2kG/5/hSX5/LDATQ8CE0NdCicpBka7LdADNkPUG83br/getd2c7 W/DQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id w8si16270854ybw.299.2020.08.11.05.37.05; Tue, 11 Aug 2020 05:37:05 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7A42C1C0D2; Tue, 11 Aug 2020 14:35:38 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id A55831C023 for ; Tue, 11 Aug 2020 14:35:30 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 878631A0A19; Tue, 11 Aug 2020 14:35:30 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id E041D1A0A16; Tue, 11 Aug 2020 14:35:28 +0200 (CEST) Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.133.63]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id B758B40323; Tue, 11 Aug 2020 14:35:26 +0200 (CEST) From: Hemant Agrawal To: dev@dpdk.org Cc: Hemant Agrawal , Sachin Saxena Date: Tue, 11 Aug 2020 18:00:01 +0530 Message-Id: <20200811123001.30045-8-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200811123001.30045-1-hemant.agrawal@nxp.com> References: <20200711081716.25173-1-hemant.agrawal@nxp.com> <20200811123001.30045-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v4 8/8] net/dpaa: add RSS update func with FMCless 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" From: Sachin Saxena With fmlib (FMCLESS) mode now RSS can be modified on runtime. This patch add support for RSS update functions Signed-off-by: Hemant Agrawal Signed-off-by: Sachin Saxena --- drivers/net/dpaa/dpaa_ethdev.c | 37 ++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) -- 2.17.1 diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index 0ce2f5ae3e..b0f2023e60 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -1303,6 +1303,41 @@ dpaa_dev_set_mac_addr(struct rte_eth_dev *dev, return ret; } +static int +dpaa_dev_rss_hash_update(struct rte_eth_dev *dev, + struct rte_eth_rss_conf *rss_conf) +{ + struct rte_eth_dev_data *data = dev->data; + struct rte_eth_conf *eth_conf = &data->dev_conf; + + PMD_INIT_FUNC_TRACE(); + + if (!(default_q || fmc_q)) { + if (dpaa_fm_config(dev, rss_conf->rss_hf)) { + DPAA_PMD_ERR("FM port configuration: Failed\n"); + return -1; + } + eth_conf->rx_adv_conf.rss_conf.rss_hf = rss_conf->rss_hf; + } else { + DPAA_PMD_ERR("Function not supported\n"); + return -ENOTSUP; + } + return 0; +} + +static int +dpaa_dev_rss_hash_conf_get(struct rte_eth_dev *dev, + struct rte_eth_rss_conf *rss_conf) +{ + struct rte_eth_dev_data *data = dev->data; + struct rte_eth_conf *eth_conf = &data->dev_conf; + + /* dpaa does not support rss_key, so length should be 0*/ + rss_conf->rss_key_len = 0; + rss_conf->rss_hf = eth_conf->rx_adv_conf.rss_conf.rss_hf; + return 0; +} + static int dpaa_dev_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id) { @@ -1418,6 +1453,8 @@ static struct eth_dev_ops dpaa_devops = { .rx_queue_intr_enable = dpaa_dev_queue_intr_enable, .rx_queue_intr_disable = dpaa_dev_queue_intr_disable, + .rss_hash_update = dpaa_dev_rss_hash_update, + .rss_hash_conf_get = dpaa_dev_rss_hash_conf_get, }; static bool