Message ID | 1503658183-4078-24-git-send-email-hemant.agrawal@nxp.com |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp814326qge; Fri, 25 Aug 2017 03:55:22 -0700 (PDT) X-Received: by 10.223.166.41 with SMTP id k38mr5658799wrc.284.1503658522661; Fri, 25 Aug 2017 03:55:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503658522; cv=none; d=google.com; s=arc-20160816; b=l5siYhk1xT72fd0j0gMdb9ad4NGVDnBxplMEGaJvfkORPCUBlp0ek03xxFc1KX2QqT nBIvNv+Pli+2TELvxCvIZCpCrMhjrYNYB2qekB1PRp20Ol930cupBaSLEnIU9+1yuLjo PnI3m0lEW8HXckNhr6j1WLAkQ+3ObctvysJ/7na5qa9KSnpqSCR0PqpjOnVzVaWKOgjZ 2jh94+I+e/i7ObvX/3na2HekzjV3LIbC5NLpKXLWLl/YSKGSUppcZULIyEBlzn1uZsVp ELWv9hN2QZCCOtZ/zzcl0NsVy7fLrfKMdknUBLD217mK2lxPcf3DUPa3422YfHplGqQu Z4TQ== 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:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:cc:to:from:arc-authentication-results; bh=V9b+JLc3Nwqe3Fd1gDrv5rhMD3AXyP9Eplzp3EZMYms=; b=ljcJK2aW9IxA1bqhyhh5r1/ooaSCqwJuduX8hD8D39jvVDi3cxRdlUm0BYOlTUn6/0 zi0YYhKuYbGBmTlIZJa0g1yTK500uoUowYjN2Ix/Mt0Fn88tEyKK/529DtZDIPCc+ezr jxNb6v4TGAAxNgJQdBMxX94wiR2xMAf+w/bJFsDHFhSly6PgqYLk+N0VxJ+O/NuSyPz6 i3gEe66EtxS/yjSVhNMPUxqui7nkxMMJM2PPz+VCvsedzTVs+qFiu4QzrEP5xS7m/FmO XggphNFG9yQgIGqY6SM48Ltx9CFdGH8CY8IW8DJqt+Ct4ZWdSZy7a38CztwTG2zEY322 onGA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 2001:4b98:dc0:41:216:3eff:fe72:dd13 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: <dev-bounces@dpdk.org> Received: from dpdk.org ([2001:4b98:dc0:41:216:3eff:fe72:dd13]) by mx.google.com with ESMTP id m6si1061586wmi.78.2017.08.25.03.55.22; Fri, 25 Aug 2017 03:55:22 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 2001:4b98:dc0:41:216:3eff:fe72:dd13 as permitted sender) client-ip=2001:4b98:dc0:41:216:3eff:fe72:dd13; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 2001:4b98:dc0:41:216:3eff:fe72:dd13 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 [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 22DB399C9; Fri, 25 Aug 2017 12:50:49 +0200 (CEST) Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0064.outbound.protection.outlook.com [104.47.37.64]) by dpdk.org (Postfix) with ESMTP id 7B04799B0 for <dev@dpdk.org>; Fri, 25 Aug 2017 12:50:46 +0200 (CEST) Received: from CY4PR03CA0097.namprd03.prod.outlook.com (10.171.242.166) by DM5PR03MB3322.namprd03.prod.outlook.com (10.174.241.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1385.9; Fri, 25 Aug 2017 10:50:45 +0000 Received: from BN1AFFO11FD009.protection.gbl (2a01:111:f400:7c10::193) by CY4PR03CA0097.outlook.office365.com (2603:10b6:910:4d::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1362.18 via Frontend Transport; Fri, 25 Aug 2017 10:50:44 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1AFFO11FD009.mail.protection.outlook.com (10.58.52.69) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1341.15 via Frontend Transport; Fri, 25 Aug 2017 10:50:44 +0000 Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.134.28]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v7PAnw6R032070; Fri, 25 Aug 2017 03:50:42 -0700 From: Hemant Agrawal <hemant.agrawal@nxp.com> To: <ferruh.yigit@intel.com> CC: <dev@dpdk.org>, <shreyansh.jain@nxp.com> Date: Fri, 25 Aug 2017 16:19:39 +0530 Message-ID: <1503658183-4078-24-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1503658183-4078-1-git-send-email-hemant.agrawal@nxp.com> References: <1503658183-4078-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131481318443723016; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(336005)(39380400002)(39860400002)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(86362001)(77096006)(47776003)(189998001)(97736004)(85426001)(50226002)(305945005)(2906002)(6916009)(104016004)(54906002)(2950100002)(626005)(6666003)(81166006)(8656003)(50986999)(5660300001)(498600001)(76176999)(33646002)(356003)(8936002)(106466001)(81156014)(2351001)(68736007)(8676002)(36756003)(53936002)(105606002)(50466002)(110136004)(48376002)(5003940100001)(4326008); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR03MB3322; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD009; 1:qqyesDRhdIyc4O1L9+edbp+cnfvJ1ViunA18f57WGCJy4snU90Hhr2CQSuGImRVvX8BjX2+3Lihb4U/24AyaDavniKHZBA99kOY37Vrl6ogdpBxh3h2vT+TWFuu6Or4r MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5545ba67-775e-4858-c7a8-08d4eba722e4 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(2017052603199)(201703131430075)(201703131517081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:DM5PR03MB3322; X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB3322; 3:pgqVKt6/gIP0vpzjyGT6s/eyTda/o69pf4+kTDCWeDagHkGgIS4tJDweGxGkjnWCUufruYI8siQSFPFJCaXH4WhPoPA6yR4sqirP9zH1QIKzuuKugMP30dG4ZBnD08dNZuyzn+M0vPCccVLqRwC9i83USFa+9Uq9pYtAaPMjUx4m4Z0zsQ0Q42cWjrLc1U0kW6I+R3Zj69y9NYFUMYjReVBagEtVa8zux95YQ3DFouM140mAa85MAm80Qhk1w5vT++3EoijP81liY1qy1lcZrdsFgsuUB8XF0IkOIUE5i8+QjbXYBsOyNVR/IXpngSkFSoybAxFTq3CjchthpZ1tRaXiZqF95/2l+79uBIzzvL8=; 25:NwzEaXnbAcburskYYVs3QJ11l1tFOA4uDfrfuTaHAoFOxHYXe3UPJU8LSFH0o+RMJ0bGuB4wmqRlwuy2+GA+D+GZ26fSyGNNtsitChKBRwC1ePqRXD0jLQFOY8gSXawid0k+mCm06edgsrdhVaT0SA1yb63RWPZXMC/mV9F4C1DqMOhRomL8OEZ8T6pZHUKZdGrFn47uAMfTSPJlJaBvKlEk++opetRPS9tmi1m+B8BUJSPq0qU7tDzTyWYIX2x9dmrA83aSPI2SxTcgOLbBj1fDInuffjAM0xg9c19DJpqkdcqlCH6TxAd3akk2oL7LLSn77Y4mliQ+gQSCnM2+Dw== X-MS-TrafficTypeDiagnostic: DM5PR03MB3322: X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB3322; 31:mE0v5QXAtATgnx8WcdWJwN+8z+mzpfiqaKvCRnE1GKK6WdSpMbA+O3s8ZWEyS7BWSPh2xHF2vicYi/4mhicelE5N9H/uipnWwnfOYTaKQhGQoYOSSMQlJaZr+kR50of+w8eVqPj5cHXQ5bP/1Qw9ckjmFk8RB0BloyNR1UtVvPyggRx9ns6KLXz9TBOOngiZ5b6kKIBkp7oeXYwhGhnohWIKycTmiY5uSl47p24hTY0=; 4:ad4dQC6rAJqET6pf3ocgnt6OiFXkQV6Ak3ow0Uvt9tsvch3gwuCHmdtsxOmUWbIw0+6wsG5a62roEqZpp0dz5a8II/2VwHtOUNZ5Lyr22D24l6nvFo1CeiXNxgn9MldonwfFBlAqjoUgD+f8pn+kD18M8965AlBHXR9KWT4CeIZwlc1r13WzKd3ZxYgee7WLcxmEljXD8VSMwZqlsFclZzQFeS1byAIotoEzxFSeUNZ4fmoNS7cFA5WtEkChsT70pcU8gPH9/L9r/FOIGybSzpNAE9dNAFi5Gv0CG4tH+MY= X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Microsoft-Antispam-PRVS: <DM5PR03MB332232CFFF9A60A751BF1A1D899B0@DM5PR03MB3322.namprd03.prod.outlook.com> X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(601004)(2401047)(8121501046)(5005006)(13016025)(13018025)(100000703101)(100105400095)(3002001)(10201501046)(93006095)(93001095)(6055026)(6096035)(20161123559100)(20161123556025)(20161123561025)(20161123563025)(20161123565025)(201703131430075)(201703131448075)(201703131433075)(201703161259150)(201703151042153)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM5PR03MB3322; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM5PR03MB3322; X-Forefront-PRVS: 041032FF37 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR03MB3322; 23:kA8f8FxWDRRRHbCDqMkQGdeQvIloqllIMWeN5P0Mm?= nAU2dZyMiD7PDLXJ1x3Q1OE+HA7rvZ/HJTWscFdyISXF0amR5GqekSx3Wi9sNVxN3S9Kt9a+3EyG41doi1YsuegsCIw0ZOgvwedcY9flDloaVYydhKiD4qeSEHfznexMGIQ60pElx0U3wkjBZbu4WAO/MmLcZDZTUvHAEUcJ2UTKO7R4mkxkX3gj7ugFAvznRGN05VwWqGTwuR36bg7fHfn0V4jJcSi66k65h4ELjcziJE2gPvFSWbnqsj+kLtJKCsgAjyVzpuiHMpkBbc2lDoY/LGs4EvfLmn5te2z1/VD2yE4XKua7nXknIQE0fmfYgTt7cp0b1V+fi9a7ojCJG6yzYeHfh3sLu0loDmwuKJ7bHzXraPuhYLue2jbglK/9aXG03g/MglkZtwztSuU7pkQYNpDb9cD3euBUQRnx+4QRR4FfKEo5DJHI+f6aM7ElqpX6wONRK+PTZEfwRb7kAr23Y4neC/rVlFGcNvba6d2pa82zCstVlX+FsClrfbMbNQ5Ropdjvaqd9fkiDLdDY6Mj9Qr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9q9kdh1z65TmdbssxcWKmIoIUGqbCSoiZSD0E5PRG5koWl1aBg==; 24:xGJyrvPye0XxHhxylCZC+mO6rYIkyBAbzqJcAlvHzNhu9GdcJrminpcqWxJc2rHup6OwYRr6zKmbxgt8IuOjd+s+NKCAPhb2tB3T3sdhOcc=; 7:EKyj40VfZMvFY1Ym2ypp+veloymHCSk14WzHBhM7sMGriE9l4hrAty6Rp9I3ymbstQuvKrJxZrBdlVZOBIsDFfdUKg40EZYtSi206mFP3kRMAmiXCh4pi814EI3zkvxNE0xVVLGN/rV+KNQ64S62RgAZkyDj3Pdge1DPEyAJzEkz9I6U61N71evYqsyt0Sx1g+CkyqoN52SB2oOpZQFn9z3/nPCwHA5vwJVCYtwPDSY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Aug 2017 10:50:44.1851 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR03MB3322 Subject: [dpdk-dev] [PATCH 23/27] net/dpaa2: add support for RSS hash update and get X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <http://dpdk.org/ml/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://dpdk.org/ml/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <http://dpdk.org/ml/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Series |
NXP DPAA2 PMD updates
|
expand
|
diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c index dcf783b..4eeddb8 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -1422,6 +1422,46 @@ dpaa2_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf) return ret; } +static int +dpaa2_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; + int ret; + + PMD_INIT_FUNC_TRACE(); + + if (rss_conf->rss_hf) { + ret = dpaa2_setup_flow_dist(dev, rss_conf->rss_hf); + if (ret) { + PMD_INIT_LOG(ERR, "unable to set flow dist"); + return ret; + } + } else { + ret = dpaa2_remove_flow_dist(dev, 0); + if (ret) { + PMD_INIT_LOG(ERR, "unable to remove flow dist"); + return ret; + } + } + eth_conf->rx_adv_conf.rss_conf.rss_hf = rss_conf->rss_hf; + return 0; +} + +static int +dpaa2_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; + + /* dpaa2 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 struct eth_dev_ops dpaa2_ethdev_ops = { .dev_configure = dpaa2_eth_dev_configure, .dev_start = dpaa2_dev_start, @@ -1451,6 +1491,8 @@ static struct eth_dev_ops dpaa2_ethdev_ops = { .mac_addr_add = dpaa2_dev_add_mac_addr, .mac_addr_remove = dpaa2_dev_remove_mac_addr, .mac_addr_set = dpaa2_dev_set_mac_addr, + .rss_hash_update = dpaa2_dev_rss_hash_update, + .rss_hash_conf_get = dpaa2_dev_rss_hash_conf_get, }; static int
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com> --- drivers/net/dpaa2/dpaa2_ethdev.c | 42 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) -- 2.7.4