From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0069.outbound.protection.outlook.com [104.47.42.69]) by dpdk.org (Postfix) with ESMTP id C1A721B27E for ; Sat, 9 Sep 2017 13:11:35 +0200 (CEST) Received: from BN3PR03CA0113.namprd03.prod.outlook.com (10.174.66.31) by CO2PR03MB2264.namprd03.prod.outlook.com (10.166.92.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.35.12; Sat, 9 Sep 2017 11:11:34 +0000 Received: from BL2FFO11OLC008.protection.gbl (2a01:111:f400:7c09::195) by BN3PR03CA0113.outlook.office365.com (2603:10b6:400:4::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.35.12 via Frontend Transport; Sat, 9 Sep 2017 11:11:33 +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 BL2FFO11OLC008.mail.protection.outlook.com (10.173.160.143) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1385.11 via Frontend Transport; Sat, 9 Sep 2017 11:11:32 +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 v89BAUhW026326; Sat, 9 Sep 2017 04:11:30 -0700 From: Shreyansh Jain To: CC: , Date: Sat, 9 Sep 2017 16:51:23 +0530 Message-ID: <20170909112132.13936-33-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170909112132.13936-1-shreyansh.jain@nxp.com> References: <20170823141213.25476-1-shreyansh.jain@nxp.com> <20170909112132.13936-1-shreyansh.jain@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131494290934579196; (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)(199003)(189002)(2906002)(76176999)(50986999)(1076002)(81156014)(81166006)(8656003)(5003940100001)(50466002)(2351001)(106466001)(48376002)(104016004)(97736004)(105606002)(356003)(5660300001)(305945005)(8676002)(189998001)(77096006)(110136004)(68736007)(15650500001)(85426001)(54906002)(53936002)(6666003)(33646002)(498600001)(47776003)(8936002)(6916009)(50226002)(4326008)(2950100002)(36756003)(86362001); DIR:OUT; SFP:1101; SCL:1; SRVR:CO2PR03MB2264; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11OLC008; 1:dUuTureIuCnGjK5wKV1MPyri69eRFl+o1ltPiXEeQx3YRS2mrVCTHGbc+1vJzqS0EMwKPNM86VvS2DGF4WFvghAyKguOoGHx1KMAL6197r+uAfdFtB9+yW0OUBaPrD0Q MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fb69bbe7-1c21-488e-5e9f-08d4f773879a 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:CO2PR03MB2264; X-Microsoft-Exchange-Diagnostics: 1; CO2PR03MB2264; 3:j2khzJ6aqtJ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03AWdWvzZCmJmrSWuZ5vC3mV5sMJ6ArzBBsHNpGcaw2NtgeeNZR7rQNMrzJQvbtfOU0uryX7OlXwDxUNgj7TOVFEN17LgJHrURXNq1qe3KkCQZK5jYAL9u1r5JjZvJySnikFpBia1DHF0RsoJ0gCNO02Qrh8xXbdx0IQnQ1Ed+dFJxIb0dP5QYQ9xSVR2+l3y3PaXH9G7PRd0VrNIIZs/j823t5EdOpSm0Bpw= 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)(93006095)(93001095)(3002001)(10201501046)(100000703101)(100105400095)(6055026)(6096035)(20161123556025)(20161123561025)(201703131430075)(201703131433075)(201703131448075)(201703161259150)(201703151042153)(20161123559100)(20161123563025)(20161123565025)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CO2PR03MB2264; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CO2PR03MB2264; X-Forefront-PRVS: 0425A67DEF X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CO2PR03MB2264; 23:ZD2QZxtu6FdxptMd2ih/6HBO97Wh/mmRK6Mhd/R9K?= =?us-ascii?Q?SSGxEuu0/B4uIDSwADhpp7u9v6PML9LlSSl2HS100NAAlo3WeFp+qSdmq/wE?= =?us-ascii?Q?5pALb5CSufAdTqrVUgWHEZp6NI2hRgtqhAvwYsW79lBFOtOkKlfurg5AB1+c?= =?us-ascii?Q?iUXbBDO6N5pkUFNgxYqzggwINU6EuNYsCnOkOxNJcNUyH2HyXLzqeBuXRE6u?= =?us-ascii?Q?b3sSiwo5WiUXLMutSjh6mzX3l6aC6IZhIKmFLlZFCjZrI7nrvnJa7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BmLPa7mcPVVwie1R9zBQ=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; CO2PR03MB2264; 6:IQOZDF6Z5rVOSaNXzKPTvcxiFaMdnlDfHHxApmrktiKH84KmvywhH+85ScAwe6JVsMuudhubbBUXrZp2n6OtB2cQzVvMuGJ65S93zbHGjB2u632zeCFZ6+tDv7dXBAHiYVUKPhBxaKj1kfTValDqpmm4HlDP0SOGgidO25/liT5BXqO+fLNSbgSKBNN1a3rME091nccMFrNb8bx0D3tsTjR7pCcp+96aH7M+1R/+dSV5JKO+VsOJZ2N0UZhchQNXBwXrw1VKlOgnduPHX/0oJoGXqw3l8rAxvArMxJMWlYfVdJoT+uPio/mORndEbwpaLmniFGnqnCu+dfWJ193GNA==; 5:JTNisy0slKmCIAyo9/A/1HYV+EIc6TInNYbYDHVRgjApL5dVV2+0tcExxa4uYPuAMLs6cHkVxubKcQlpNo8x4TCQi+3w145aOvlMmrNgeQh7Kfd4rEtnaK9DTItHbCBUd5IWMaaiOqoMq5NAM9gdPQ==; 24:Juus6ixRT7gDvsel8RrJzIX73fVyQ+XPj2bNS1iEGum6ef4NIt6RfBwPd8CWnYrhq4pBQ9XxiGhen2eEy341nUHBSt7b83JLny5ERfRq4Jw=; 7:e4iAUgCf5veau+d47/bvrYtIPqX6D4Iu/uAkj/hOCAXfKFo+zUuYMf2e4a4CXvnJ5ev7UyJuxo+GVg9VAz4SZAPomuwShiEMci0Q/fFioZXHCT0k+gTGZ0ZGFhySH7YXwReYa9zd64Zh0BFyyTq0E8ENzkyjULSb8dbml62Bu7KXDRcy4OMV88diplLQGuFywFdKrdvY55Dd4sZHCeDjkQFPy0t6DcwnklQpBAJ6cd8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Sep 2017 11:11:32.2567 (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: CO2PR03MB2264 Subject: [dpdk-dev] [PATCH v4 32/41] net/dpaa: add support for 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: Sat, 09 Sep 2017 11:11:36 -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 982e762..437943e 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