From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0044.outbound.protection.outlook.com [104.47.36.44]) by dpdk.org (Postfix) with ESMTP id BFA1A1B24C for ; Sun, 8 Oct 2017 14:46:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=363Dek8EPxCMiP6WhrlVQkvfANdxy4sacfNb9rB0dS4=; b=i0AUbZRGwBZyo7Lzis+GSW9rnox5WUpwxmAQ6lpJXblfQon2Vxczy0WpmTGaMP3XRGYbzJaG1x63WoFnEPZuc8R3GW//BkSkgMfuupu6KmRLvNtEsQQGbfpt5eBEtazu0SHVlii0HitA/UhYWVMeyP3Nl76cBuRDHa8qbDwjOgE= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Santosh.Shukla@cavium.com; Received: from localhost.localdomain (14.140.2.178) by BN6PR07MB3089.namprd07.prod.outlook.com (10.172.105.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Sun, 8 Oct 2017 12:46:04 +0000 From: Santosh Shukla To: dev@dpdk.org Cc: ferruh.yigit@intel.com, jerin.jacob@caviumnetworks.com, Santosh Shukla Date: Sun, 8 Oct 2017 18:14:22 +0530 Message-Id: <20171008124430.1866-19-santosh.shukla@caviumnetworks.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20171008124430.1866-1-santosh.shukla@caviumnetworks.com> References: <20170831145436.5397-1-jerin.jacob@caviumnetworks.com> <20171008124430.1866-1-santosh.shukla@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [14.140.2.178] X-ClientProxiedBy: MA1PR01CA0113.INDPRD01.PROD.OUTLOOK.COM (10.174.56.157) To BN6PR07MB3089.namprd07.prod.outlook.com (10.172.105.7) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7c1215a7-36a8-47db-453b-08d50e4a8b0c X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:BN6PR07MB3089; X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3089; 3:KzOJ1eUV0k1rW74+qo/GN0ySRmmTTSmu1D+D6skhC0OoQkjNDZW3FG/f9n3m1/IWSKU9kTpVnctJ+9gt69r2MwEontViefxzcXQ4wj+TBiIeaQm9xzYvPtSay/RXvr2WchKHCA+z50mebgaroVTGwWU2q9TFA4++TYHSvCjNhzF0q0ntoXer1B4JQRjCJod+xuSn4+eDCX0WsXRsokLb4J1XfevPisuRUniQKi6qEGJ7D++TnMGcGqKkUlOvbqE8; 25:KYYO9+3ilUjvkXBB98Mg3RWgTjocNXn5qVNLfcWMJmVcrFdUIerFvRxUuwd/PbsKl0AaPnIRN1/OsY9d0XnnaKL67yRlHr6+v1NxoC26JeNFQKFmqKDfEYXVOSzz+C7cb8HWjw13DxV9omi5GsEPXMYcZHDrcXIG5O1TTTBLVPO6fh/nHWSZa96jfPYagTUlTdjRRfczQkNtC/2+nMgnWejUEAreIyILGuTQg/eYI6ziCQdiNpeGpSBzfmHs0eqEWULEAJhyEMlhpIjSIMY0bVxlCY0U+T2AtPTzN9ZxquF2qASCHJJvn8IWNAweh6GX0UMYPBMWkyUKROrv6ACUEQ==; 31:iJzZ9wHLmUbW/UnUA9CDG39WDZvgLv0/PbVZFYylgrsK14w3rPTj3s09J2n+2ce8GEl2K19LULhdtNyr0mnZrLIcPb8k/m0dhQTiINaaHhx7XFPGzB2RxMgoh5iT0U9pk9qgJACSQRiutJhTXPYQHeAgIe1KP2sinTkR9Z+ZpyxXZzzUI54JMfPXbpeT+FPFne5LW9a/IE7+RmvcVsKw8PEhBzgSnYY63zYhmsFQgDY= X-MS-TrafficTypeDiagnostic: BN6PR07MB3089: X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3089; 20:ZaIK0U14FGGXco0B32hpXfFWDNUiCLGhI/nheeRgu6WvbVm95mXmVsczoIBHZPGiXd2eiuHK6XRCa3B8n1vyPYSrISeMz1g7nC3HvQD7bHx9fzcUDNxrL2I4z3LmX/tGGU57aymYEBti4C+MSewoTyEAQXIC14UtKsWWgMpZxGYfJBLJGlVDAEUbMEJpfEwUvrifBAlWPAlkYIhim7CpKqBdFGqVAumGaiFxUXXOykkYQH8Zxq5ZzvdI+a5hMfoG4NqI6BgZ5hp07XskU6AyRU1bnsJL7ukDQSu7lfLrpF5Jvd5tabzXAPpCD9ezhGFLCHBfJUpzE769kuGW+7b1t5svUlD2DeFbAcf7uDHemQkvRKgu8YUHmXE+y2kWwLpGbdk/e25ZfapMz7DdeGm3aJRvFCLX3OPhKuWkWFKYsK1wwARe43XYULBe8W7+Yz/bvUdeJwGg1ffJPe3iCLukohicqYPPcgc42zn/h0VzEmZxU0Qxmum+aV6RJfGzebPnxzz1O3PvBPYAJYFjQHyLqU/LSVKkEIHlWYlUsJp3EisTYucdBaeIbHmu/ATs/Thp0BEc1ps9DxMsYxDBL7ODWPnbrOv6ZO5k37d/wHMgXtY=; 4:xI/6ulhDoj+fyQ9tbQfpRQcZAUaI/Qzsvtnvzp1jCySubs238rlc6sKR76rQD4wKDA9vgLpG19fVdh6F28PmN8zT26yEJnbrc3p0jzmeqcdbIed9jELcONwGfZmJihIAQI712iaCsMPeBe/uk937od7+gYo9aStqlEt4gO+GeZrxVUVxTfzpAZKjLqKbfWSVW6dSAVE+V5qRKJIJazXR12MsX+BbEUGjbCdSYOU1pBVIzinRman4/6WFVef1VydG X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(100000703101)(100105400095)(6041248)(20161123562025)(20161123558100)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123560025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN6PR07MB3089; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN6PR07MB3089; X-Forefront-PRVS: 0454444834 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(6009001)(376002)(346002)(199003)(189002)(6916009)(42882006)(81166006)(575784001)(2950100002)(81156014)(8936002)(50226002)(6486002)(16526018)(6666003)(189998001)(16586007)(316002)(6116002)(1076002)(6506006)(3846002)(7736002)(305945005)(8676002)(106356001)(105586002)(5009440100003)(53936002)(4326008)(66066001)(107886003)(47776003)(2906002)(5660300001)(6512007)(76176999)(5003940100001)(50986999)(97736004)(25786009)(101416001)(68736007)(48376002)(50466002)(478600001)(72206003)(2351001)(2361001)(33646002)(36756003)(110426004); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR07MB3089; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR07MB3089; 23:f0uANypbV6ddWQxkUQIyeOicsmtXgEaJPurAei6Xo?= =?us-ascii?Q?W8jNyqLh+UcgHiAIuRySYBoKW+3zVs8/4dxhU6K13TmnATn1oIGsV5Ksjwlz?= =?us-ascii?Q?1C8/+Z22WfV3X8/KbAQM0DcQvFgncRaRZVU1A6TbMbYIkX5MJYuBGJDDoyRl?= =?us-ascii?Q?xTZ6nnoZYlAyIu+xCrLNyfduJa/dQt85W/tY2RhFUCSKtb+6XJkCQGGTeRrm?= =?us-ascii?Q?ngKt9xJ1XxWrcszkOB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mbkZoHp5CxJoiExfRoMQBg= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Oct 2017 12:46:04.7095 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR07MB3089 Subject: [dpdk-dev] [PATCH v2 18/26] net/octeontx: add MAC addr set op 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: Sun, 08 Oct 2017 12:46:08 -0000 From: Jerin Jacob Implement "mac_addr_set" op and mark "Unicast MAC filter" feature as "P" as "mac_addr_add" and "mac_addr_remove" are not implemented. Signed-off-by: Jerin Jacob Co-authored-by: Santosh Shukla Signed-off-by: Santosh Shukla --- doc/guides/nics/features/octeontx.ini | 1 + drivers/net/octeontx/octeontx_ethdev.c | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/doc/guides/nics/features/octeontx.ini b/doc/guides/nics/features/octeontx.ini index a7eabc42a..a8f38e031 100644 --- a/doc/guides/nics/features/octeontx.ini +++ b/doc/guides/nics/features/octeontx.ini @@ -9,6 +9,7 @@ Link status = Y Lock-free Tx queue = Y Jumbo frame = Y Promiscuous mode = Y +Unicast MAC filter = P CRC offload = Y Basic stats = Y Linux VFIO = Y diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c index 95045ab0c..d77859aea 100644 --- a/drivers/net/octeontx/octeontx_ethdev.c +++ b/drivers/net/octeontx/octeontx_ethdev.c @@ -451,6 +451,19 @@ octeontx_dev_stats_reset(struct rte_eth_dev *dev) octeontx_port_stats_clr(nic); } +static void +octeontx_dev_default_mac_addr_set(struct rte_eth_dev *dev, + struct ether_addr *addr) +{ + struct octeontx_nic *nic = octeontx_pmd_priv(dev); + int ret; + + ret = octeontx_bgx_port_mac_set(nic->port_id, addr->addr_bytes); + if (ret != 0) + octeontx_log_err("failed to set MAC address on port %d", + nic->port_id); +} + static void octeontx_dev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) @@ -496,6 +509,7 @@ static const struct eth_dev_ops octeontx_dev_ops = { .link_update = octeontx_dev_link_update, .stats_get = octeontx_dev_stats_get, .stats_reset = octeontx_dev_stats_reset, + .mac_addr_set = octeontx_dev_default_mac_addr_set, }; /* Create Ethdev interface per BGX LMAC ports */ -- 2.14.1