From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0064.outbound.protection.outlook.com [104.47.34.64]) by dpdk.org (Postfix) with ESMTP id 7717A2BA9 for ; Thu, 28 Sep 2017 13:24:06 +0200 (CEST) Received: from MWHPR03CA0014.namprd03.prod.outlook.com (10.175.133.152) by DM5PR03MB2698.namprd03.prod.outlook.com (10.168.197.136) 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 11:24:05 +0000 Received: from BY2FFO11FD048.protection.gbl (2a01:111:f400:7c0c::121) by MWHPR03CA0014.outlook.office365.com (2603:10b6:300:117::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.56.9 via Frontend Transport; Thu, 28 Sep 2017 11:24:05 +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 BY2FFO11FD048.mail.protection.outlook.com (10.1.15.176) 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 11:24:04 +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 v8SBMpG7016035; Thu, 28 Sep 2017 04:24:02 -0700 From: Shreyansh Jain To: CC: , Date: Thu, 28 Sep 2017 17:03:35 +0530 Message-ID: <20170928113344.12248-32-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170928113344.12248-1-shreyansh.jain@nxp.com> References: <20170909112132.13936-1-shreyansh.jain@nxp.com> <20170928113344.12248-1-shreyansh.jain@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131510714450250065; (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)(346002)(376002)(39380400002)(39860400002)(2980300002)(1109001)(1110001)(339900001)(199003)(189002)(50226002)(104016004)(8936002)(8676002)(81166006)(81156014)(97736004)(8656003)(68736007)(48376002)(4326008)(77096006)(356003)(305945005)(50466002)(2906002)(15650500001)(6666003)(86362001)(85426001)(575784001)(36756003)(76176999)(50986999)(2950100002)(5660300001)(6916009)(53936002)(54906003)(106466001)(2351001)(47776003)(1076002)(33646002)(105606002)(316002)(189998001)(16586007)(498600001)(5003940100001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR03MB2698; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD048; 1:7xkb4a+CUR71YWSNJBD20+vSamBNqE4UprBhtwX6NVMIS2Kx+L3LavU9bRA1htXuLC4OCMS7OJLxAkN0DYn7udVcTCMQgb0Y9ai1UjNQ7oXz1ZclJvnRW5f+di9NRHwS MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 71797fc7-7ad6-4071-0951-08d506636d6e X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017052603199)(201703131430075)(201703131517081); SRVR:DM5PR03MB2698; X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2698; 3:NxaRlNNBh7h1F+MFadFAQZb1yxEgdgqbCHUXVCrgKiNir1/80CNNMPYyBSsN6DqVSKJTVb+8pabr7bvNm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uRXYsTbDtpOcVWzB0i7kk+CfeJ1y+dkcLtJwn3YMEdYdUv2/pQBrvBdDYmpmSf4GPDrbXDkEgX/0X+gDbHAOHNJxK692wEZA85tnaLYKNhcoqMYCMSlVE4f6PL+l98KvCIXBqfA6/opcgG2wpNfg7rPZDPxLDTbHV4CMN/I9kE= 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)(93006095)(93001095)(100000703101)(100105400095)(3002001)(6055026)(6096035)(20161123565025)(20161123559100)(201703131430075)(201703131433075)(201703131448075)(201703161259150)(201703151042153)(20161123556025)(20161123563025)(20161123561025)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM5PR03MB2698; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM5PR03MB2698; X-Forefront-PRVS: 0444EB1997 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR03MB2698; 23:RXil3b4DII8hNGd3bQ+Fi7CZ5Kr5Qads/H+u3PsRV?= =?us-ascii?Q?g49KgWwf9/kHXjR69agJeony52+FvfB/2awPDHIcTIHu2BXiYkWmsWuV9Gyb?= =?us-ascii?Q?S8OuURE8ABQ5O7bRGkR4wW34O5o+qazC3HOGqYdsgzdwKd9EQu/qQXtVuDKP?= =?us-ascii?Q?WHgqgWZZAUbDDPObv5inur7Wopj4OjIftJChnNhKaAkBNZcQ64Syu3Vp5bXJ?= =?us-ascii?Q?9yuxVFC8P+ya1lTzXlxuafUtkg/rwYUO0R2emyx9TPswLm7LsKW54CPeVKP2?= =?us-ascii?Q?1C9rjRR+wSOPzV3miXAKegx0CRoz/3/CmUNU/K9ZFDjVvq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GmvqzZAGI4qmEvWAnUdfDws8VQH7EMBGgCRm8z3RZ5V6kttfei9w=3D?= =?us-ascii?Q?=3D?= X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2698; 6:DkD0zfYqxsPdYwUu5WP+ulTy6CumqD/mLKDJg0EIVnFrPXpkqov+PhxjrXjXYPWEreohdP2kKK55ZRhsjKwm6rAs79XbwLc2Ed0jTCgheEjLqVdcVzIoJ9WFpN97oJ4kDEGD+YJdjAo/9eYSvYVxR+7IY74PCO8PPN4S1CMiS/82usSAjf2w+3/+ArflU+lnfq2PS8mlmoFzBiOboztC6f95ouWHdLXvnZWbMvIsJzzrSDrirxtUUqJaJnaMLUi6i9iztBIm7/R++Vp63giT9GdFDttyN9hOgd0oEwDgzt8lFZWNuZduE690nDZqe6ebA+9tBjNHXtPxf5PARZNH6g==; 5:zfvbwEPptbaU7ExuO6ra8h6pcq5b+NSnoTqC4Wph2KDT00T5s5hrApgTf/JFfeuMfX3hY/mrCjdMrV3/afSHq9gMyArh/p1fS8wyk+XpMRXjOq4UHiwh6+uqyBxpXUlHJE8dJoApjQyRCZJHpc9U8Q==; 24:Gmr8ZCpv30J35zp4G1kKD1I1lKkLYRd2qp3FClTFlgTOG7l8OKeKHL0gEpDW/DQuy1ow19GUGzrpTRGlqZbATw3nZ8AfCdYV1Whda7ZImSw=; 7:xUGK9iKJh8f89btF0sgQe7AmPXGzAkmkDKZ0alcJcCxcqrDlUnnjvFJnYaBhg0dH8dOrfSs4uPM23cfLdmCf+XE/UTTmLUobDuMaoppYHuUSnR24Uue3kx9DuB5BZbSgAq+WcV73ec887dkXAbnXCC57M+YBn3X8DKanWBj8+WIUIkkvcH5JXUEvE0MlTo+IXM9YuJY56jSOJbvblJ4wa7e4ytfYOrnwyltK7Uhp3kE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Sep 2017 11:24:04.8378 (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: DM5PR03MB2698 Subject: [dpdk-dev] [PATCH v5 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 11:24:07 -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 f6a2e22..f1d0f75 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