From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0040.outbound.protection.outlook.com [104.47.36.40]) by dpdk.org (Postfix) with ESMTP id 2ACBD3195 for ; Thu, 28 Sep 2017 14:20:10 +0200 (CEST) Received: from BN6PR03CA0021.namprd03.prod.outlook.com (10.168.230.159) by CY4PR03MB2694.namprd03.prod.outlook.com (10.173.43.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Thu, 28 Sep 2017 12:20:08 +0000 Received: from BY2FFO11FD023.protection.gbl (2a01:111:f400:7c0c::108) by BN6PR03CA0021.outlook.office365.com (2603:10b6:404:23::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.56.8 via Frontend Transport; Thu, 28 Sep 2017 12:20:08 +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 BY2FFO11FD023.mail.protection.outlook.com (10.1.15.212) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.56.11 via Frontend Transport; Thu, 28 Sep 2017 12:20:07 +0000 Received: from Tophie.ap.freescale.net ([10.232.14.39]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v8SCJ72O008785; Thu, 28 Sep 2017 05:20:06 -0700 From: Shreyansh Jain To: CC: , Date: Thu, 28 Sep 2017 17:59:51 +0530 Message-ID: <20170928123000.1711-32-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170928123000.1711-1-shreyansh.jain@nxp.com> References: <20170928113344.12248-1-shreyansh.jain@nxp.com> <20170928123000.1711-1-shreyansh.jain@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131510748082898098; (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)(7966004)(39860400002)(376002)(346002)(39380400002)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(498600001)(2906002)(316002)(77096006)(81156014)(81166006)(54906003)(8936002)(48376002)(8676002)(50226002)(356003)(47776003)(85426001)(5660300001)(50466002)(16586007)(1076002)(68736007)(305945005)(2351001)(6916009)(33646002)(6666003)(2950100002)(189998001)(15650500001)(4326008)(8656003)(104016004)(76176999)(50986999)(86362001)(5003940100001)(106466001)(97736004)(105606002)(53936002)(36756003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR03MB2694; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD023; 1:h2sTVoKPTG7h65/R+OVl9NoTl+IxodS6id/qez2EanW2rLBDtEnlE0yfBL8ERqNz3qJebmf1JS/pE4DZQPFMkzL7l7r72jEhXzeJ0xM101GAXYn04qLf2LTKqLs4vY1f MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ce38bc54-3e3d-4813-79aa-08d5066b4204 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017052603199)(201703131430075)(201703131517081); SRVR:CY4PR03MB2694; X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2694; 3:XcjTcP/9C4BVCmk1E9A9c6ug4TMof7cLJBskls3HV177B33KYIqLxxuKx0C2IQmRzVL8l4Hb/EIUd07LveiQr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QkGxSAl89eC3QVKM5CjXhkL4c4j+ccbErAb3Df/3VST7aa+WGEJHQfHr4IpK1vzdnhrdiPaByXeKB6uhdAZS70A8by0att+hCMXKhgcfsddIckizdhnX40JU3ntWuavawOkVNdugMeRuRDmcxTPKJJCHSVcXnntZhOKfNJ+hbhVY= X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(2401047)(8121501046)(5005006)(10201501046)(3002001)(100000703101)(100105400095)(93006095)(93001095)(6055026)(6096035)(20161123561025)(20161123556025)(20161123565025)(201703131430075)(201703131433075)(201703131441075)(201703131448075)(201703161259150)(20161123563025)(20161123559100)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY4PR03MB2694; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY4PR03MB2694; X-Forefront-PRVS: 0444EB1997 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR03MB2694; 23:O0ztp6Rd7dRDPh/7QWhOt7ZpTeoQ5qRkb6CDDljuc?= =?us-ascii?Q?bvBiApLMEhWPFp+CCayH7HiXawbVZCmw6WSA6GyjjJWLBSxUG/W1xUZeh+Wk?= =?us-ascii?Q?f4rOAF9vMSPQ98ucidWsB3bvlbAmNzgzTtutEbzZWFgr8ZZzjhvQIPcFTDc0?= =?us-ascii?Q?uEHrwpLSYtxzHIFIsdBp9+ZKuy2GCL7mE2c59kRwea+KTf3aeykbH53cbuxn?= =?us-ascii?Q?glU/QnlxTF7yiX9cik589uMeKaiv+yMDJ0wr1tBv0SY7A2fsaE3Hl6O2NOAW?= =?us-ascii?Q?+kTxpTLQHv3UsS/y17tLVa8v2VZBedEBq8aZpwhYpPlJd0MO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a4Jwkbg8sAYssAdTNpyqm7v5j4Bhw=3D?= =?us-ascii?Q?=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2694; 6:+BGyNmyVBOIJydtU5ZZVTvLAkmklWw6ZVggVeebp9lVOlQi51ICgZSCxGoua9KxiWZLTlFl5Tyb06ysIUksOsB1+nSjMCWnFSNCjUrpFxcpAzMuJH8r1btDN2Qt2gHIIsyr6gumEPQjDTiKGnlYnNL5I7vF9kFHSXRoseDooha/nWf5EWRp9mMAZh3GNLPjWKAFCmUGr693NlNam4eIpRroaTOOb63B1cQEJ+2wfuaqR2W2gtjtugbujhp0zlEbmxxzAfXlpI3WRfmHHbI0hxYb5eZlcMBzUMU5cqGRTtvztlyuFXLN7JgpvBJJSJN93yWnFPqxGm5ZXsYOPb+gu6w==; 5:F7OZktwDczUFrZac2KBT1xkPF22cKWHYw6mBkMTLmzUmnOU6IUT37fZ6WdATwsesVuD7JvvrxvHtcF7a+bGdNlxaqHF2UVGVyGFZWhrHluVsPSZQ3MaBrt/JyaYF01qMiaiWWdu0a+WlHLRnZMkd0w==; 24:bqFsVHukPXBAHRAjzWK4aP+/MFvZBaHA2G0Fw+LL52alzyMGm1js/xx6hcflZlPsz+w0knPqTEmXRGUEPEcpsBeyOynwkZ3Fvzs06/J358A=; 7:PZPJxe89kxrWUSbBhBG97cQ/n2xoBQ850el5TYeIBh319j4Ao6aYRnE/vkzFlngFqJa6ktilRcW/SRaZ9Jrra+oRo/h9J/KykycMVfeA60B6LxK3LM2kWcPy4O8XecSZpQYWX960KjTvMJG60gLGezgcUncGxFOxgd+I5HLSFj+GdkAQ0UYrr++WmAykJtTeYjBSTu/PczQN3SsYwhC84C284cRRwxcJDJpYnx77XBk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Sep 2017 12:20:07.9778 (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: CY4PR03MB2694 Subject: [dpdk-dev] [PATCH v6 31/40] net/dpaa: support MAC address update 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: , X-List-Received-Date: Thu, 28 Sep 2017 12:20:10 -0000 Signed-off-by: Hemant Agrawal Signed-off-by: Shreyansh Jain --- doc/guides/nics/features/dpaa.ini | 1 + drivers/net/dpaa/dpaa_ethdev.c | 48 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) diff --git a/doc/guides/nics/features/dpaa.ini b/doc/guides/nics/features/dpaa.ini index f21a85f..cdf5e46 100644 --- a/doc/guides/nics/features/dpaa.ini +++ b/doc/guides/nics/features/dpaa.ini @@ -10,5 +10,6 @@ Jumbo frame = Y MTU update = Y Promiscuous mode = Y Allmulticast mode = Y +Unicast MAC filter = Y ARMv8 = Y Usage doc = Y diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index f45ed5e..893e7f5 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -310,6 +310,50 @@ static int dpaa_link_up(struct rte_eth_dev *dev) return 0; } +static int +dpaa_dev_add_mac_addr(struct rte_eth_dev *dev, + struct ether_addr *addr, + uint32_t index, + __rte_unused uint32_t pool) +{ + int ret; + struct dpaa_if *dpaa_intf = dev->data->dev_private; + + PMD_INIT_FUNC_TRACE(); + + ret = fman_if_add_mac_addr(dpaa_intf->fif, addr->addr_bytes, index); + + if (ret) + RTE_LOG(ERR, PMD, "error: Adding the MAC ADDR failed:" + " err = %d", ret); + return 0; +} + +static void +dpaa_dev_remove_mac_addr(struct rte_eth_dev *dev, + uint32_t index) +{ + struct dpaa_if *dpaa_intf = dev->data->dev_private; + + PMD_INIT_FUNC_TRACE(); + + fman_if_clear_mac_addr(dpaa_intf->fif, index); +} + +static void +dpaa_dev_set_mac_addr(struct rte_eth_dev *dev, + struct ether_addr *addr) +{ + int ret; + struct dpaa_if *dpaa_intf = dev->data->dev_private; + + PMD_INIT_FUNC_TRACE(); + + ret = fman_if_add_mac_addr(dpaa_intf->fif, addr->addr_bytes, 0); + if (ret) + RTE_LOG(ERR, PMD, "error: Setting the MAC ADDR failed %d", ret); +} + static struct eth_dev_ops dpaa_devops = { .dev_configure = dpaa_eth_dev_configure, .dev_start = dpaa_eth_dev_start, @@ -330,6 +374,10 @@ static struct eth_dev_ops dpaa_devops = { .mtu_set = dpaa_mtu_set, .dev_set_link_down = dpaa_link_down, .dev_set_link_up = dpaa_link_up, + .mac_addr_add = dpaa_dev_add_mac_addr, + .mac_addr_remove = dpaa_dev_remove_mac_addr, + .mac_addr_set = dpaa_dev_set_mac_addr, + }; /* Initialise an Rx FQ */ -- 2.9.3