From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0062.outbound.protection.outlook.com [104.47.36.62]) by dpdk.org (Postfix) with ESMTP id 8B0A87D97 for ; Thu, 31 Aug 2017 16:56:06 +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=EwjGEJEK280Pmo5ZpN9PetZ+R3TzvjK5RpB8U+rtZi0=; b=TwbAaNYBEvtsOR67RR94xIgi6e2grnO3peeUIFJ0jpRYv6xeSz5JslylCjcUFFAtZbDsGHDskwwj8OgUrJSwUk5k11X6/MyXRn0Bx4APXspClwAl3lWzcW3uwrO84bJr+g3/IMj9cR1zVGe77b6bhwUGuvhDc6Q5qeEuQT2OWEo= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin.domain.name (171.76.126.71) by SN2PR07MB2526.namprd07.prod.outlook.com (2603:10b6:804:6::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.13.10; Thu, 31 Aug 2017 14:56:04 +0000 From: Jerin Jacob To: dev@dpdk.org Cc: ferruh.yigit@intel.com, santosh.shukla@caviumnetworks.com, Jerin Jacob Date: Thu, 31 Aug 2017 20:24:28 +0530 Message-Id: <20170831145436.5397-19-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170831145436.5397-1-jerin.jacob@caviumnetworks.com> References: <20170831145436.5397-1-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [171.76.126.71] X-ClientProxiedBy: MA1PR01CA0109.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:1::25) To SN2PR07MB2526.namprd07.prod.outlook.com (2603:10b6:804:6::26) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c23a703d-2971-4060-a238-08d4f08067ea X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(300000502095)(300135100095)(22001)(2017030254152)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:SN2PR07MB2526; X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2526; 3:8CeOfYesfmNxhLKv5wEHCvTQr7wvgZJRUXilp/fyHSttOhDNKVoBfgNmzoC4/im8D6QQVZV/n9A9v+wQcbkC6QxpqlKYXdKra3pQhbzrjt2yGLYftetsOkY6pMgEvIRqwebLh3qhp+UYF9ZQNq52bQ1exiMbMMYUUUnj3jVcnXUvAeL6JGSgm+kjUQ4XTjpmyxr3zqDF1MLp6TKQCbiHt4c5EKTHlrXyLyDSsRWAjYALIewuDqaM/RMUSb3HNT0O; 25:BB1OfQnYJdhRRUeK4rEPd4iDQE4IP6Pm8XWsf9A2N26wJ//Lcp/UQMAcuOAUMungbpjKnXykCaf1ygFvXgXAg/OHloyq9yOW9y0KrC+Y9pvTN+gRWkCLg0nDS6TGMob3O4tGUHWmfiM5G/LEROGuAbKtBC6OhKECVYPJrFc8AAYzBXJUJ6oxtYu1CfL0aUVq7dahmrl2tXydhxCbwrhS+U8azpmFaSmyUKAgbEEKcOiAZBCf+nqr7tNYlOpZ50Wfu3KVimg0gxyj7//9gxS2gHK0+63qolIxRMVIs3F5OLg5I3Autr1txx8fZu5jevfE2IIqVINoWYt9nP4ETXnFVg==; 31:bfuhdhSf6nl2AH2T3xnooQgdPYsveqzI6B6dsv3mrv8fmZBIoe/BmmkOacfP7+KTozP7CgOG8SAQ0g7uLY1+XwU36a75GHV3P2GHoaIcCg3KYfViMtmcLjOiQg6i3NR/trMQA5QVhgSg1kF2XWKMKYfiWIyXwt2vXQuuMmb3oJIDLYMl4KTzmARK237SlkwXMXaiwTNL/QIoSTr7IR1rRexZxp0s8XyZfWHIG0PDHns= X-MS-TrafficTypeDiagnostic: SN2PR07MB2526: X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2526; 20:YT9Vlm9z/jJklHP+/O8Trp+xuu/BtJum2+dly3Crn7pemfx+260ApGfi3JylGOf0umpJ0LZuViuodugxQhFDDiwKsTWKt1J08KK+KMNjTyViMNtNBvjX9J+hCfQPE5dIBHc4g+u6arNCVtbgTECoh8cMtoaoNcpuzXF6zoSKat61G7/uZEJ3rZUfd5kLEfhECzF1aNTa/1tFQz6FqZU1bHvic62jy3iMg7c0+8K44bNKOgiYZHC0z5jR4RWoMV0cyDviYJoB9X/TTs4APuFLuEHqIZ61nXp1N+5rCIWGaXkLgfJtQRF+oQvvp+SBP+pX/eSB3Gab4qztsDMqMTj6hwhV5fO9tRdptsyhmhLMr//WCn5zrrb7znRqc9EaTheW245w6Gw8JXR/OZbdvIx+svc4RrllX5S9Xkq/9NuIly0nTJF5rd05ZsQmqiNS6QCGUypRYwC2QO+Sukd9g96HjU+CcL42ktRaZr/WSHTRFsDJ/QbAmjSc+Ka5jkd06cAZ2U0WghCEMO9fuXq7sq4np6B4Iw1b5K78sRkddzbwbzeAUzEbfMpq0RAaYdGyNLnL/rhkb6v3GMhnTqDyn+7cvA81xo2KrWYTpxmVrBvsMHk=; 4:wQVymQDUIiMaDJl/vImhjQeDtg8UTHDq7+3+PyIbuCIzdA1osFKf8SNmVpo1uzMrmzt9KX3j4P/NS5X2F51iC/lUvZBhGL4R2vV6p7CPJjGP4S63siwRHXNwQ56NAO3rnDdEoOaQiTecYdvv2tTOVDu1kWJKIpgoqNj3LEzl1edTvVIimTug4K14PtrHYnDNKLPkFAy9O4Ce11qUPryMVAR/HVQ7H6VgdsJzdeRNqYjYwzxwyw1r0jI+naI4Lhai 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)(601004)(2401047)(5005006)(8121501046)(93006095)(100000703101)(100105400095)(10201501046)(3002001)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123564025)(20161123562025)(20161123560025)(20161123555025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:SN2PR07MB2526; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:SN2PR07MB2526; X-Forefront-PRVS: 04163EF38A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(199003)(189002)(25786009)(1076002)(53936002)(3846002)(6116002)(575784001)(478600001)(110136004)(72206003)(7736002)(6666003)(107886003)(6512007)(305945005)(6506006)(36756003)(6486002)(68736007)(5003940100001)(189998001)(50986999)(42882006)(106356001)(101416001)(76176999)(2950100002)(6916009)(5660300001)(2361001)(33646002)(2351001)(2906002)(4326008)(97736004)(105586002)(48376002)(50466002)(81166006)(66066001)(69596002)(8936002)(47776003)(53416004)(8676002)(50226002)(81156014)(42186005); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR07MB2526; H:jerin.domain.name; 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; SN2PR07MB2526; 23:trrB6iH0e45BaB6xjfycwx8cGynRr9y5AXOeJEoqu?= =?us-ascii?Q?dm2mEKfbiWUYnNN46mmeQEJrRn9LeFUnJ4Oj8ns230qL18yG6x5QfV1pSMi4?= =?us-ascii?Q?tWm8o+3ZXaPDgFRXUcPYCV4H55dx0WJThHz5BUWkbhaz7pjK3JM4SdQBzjMP?= =?us-ascii?Q?b07k4Ra7Pxm4saer34i6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:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Aug 2017 14:56:04.0367 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN2PR07MB2526 Subject: [dpdk-dev] [PATCH 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: Thu, 31 Aug 2017 14:56:07 -0000 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 --- 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