From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8349545E0B; Mon, 2 Dec 2024 23:30:56 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1C6D14060A; Mon, 2 Dec 2024 23:30:56 +0100 (CET) Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) by mails.dpdk.org (Postfix) with ESMTP id 8657F40270 for ; Mon, 2 Dec 2024 23:30:54 +0100 (CET) Received: by mail-pl1-f176.google.com with SMTP id d9443c01a7336-21290973bcbso47992635ad.3 for ; Mon, 02 Dec 2024 14:30:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1733178653; x=1733783453; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=P1AMG8C+vS4yBEEQmsZ+XbW8zFvWEbrmyi4w1Syr3aw=; b=MW3/GhLyIusqZKJDS3FexfjcpN+hdyLIKD5E2hboJbFDfo4+MpSpN/89s5OEs/ohkD xvCZkUWEHGeRlR7uCbCdia1GyuKefPWpjcCueJgiGlkwZApddnw1BAp1v85q46wP2dOX 7r+2pRUbRwR+X2TU/XiLLM5okFBj9vQcxMhjSa5O+/0wlMTmtoWE+zIM1QGV+Aa4iKvV joCh19Dk/Jo2QvFSKQriOdeOaMKcoe/uvqm6OW0ZgJuvg1CrqVTMOrFo/IoWBDaxIfZj zlCim4PLV/myMdL3BaU7R5YTfQOQ6F3ZR2FN/TcvuiZa++vW/NTJiVWAaH7AiBKwE5hs nNgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733178653; x=1733783453; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=P1AMG8C+vS4yBEEQmsZ+XbW8zFvWEbrmyi4w1Syr3aw=; b=d0K55a7baIGXffHOuBRoM8fft6q7yQW0CXKppKQ1e6BOkT7t7pIpovercgZzaRQEQj m4Y0AzAUaixAzkqOt5TANI4MGSK76C46tP9jbuPv4uilrQ5XvLWdRq1fpQTuAyYX/En2 lLQ+U1dtsW5H1l6FWBVnvpaHS1CFf/CrDcrVVpPYhWftFnwz0ZkPVvobzGkEP7EvaP5J KnWGxzc2QO7K9WqIJV4/8wiz1EIWv+7GHrJLz0UCzDrvoqyFcWHV2EIztoRS/8a+2BCt chenfPwRmXyQOXFkXSaa7mxrNsyLKUEkcTJEzo05u/RFBrqJ0p98J/0dCsZOKcHct3o/ AmHg== X-Gm-Message-State: AOJu0YxwSth6E7DGjtyeKOYUyLxNYdnUsKG+NOYWOHKhnSQLTmlAuKqp B22Q4NZ+MhjEgzbjrZfGIBkm71O8b0fnhez47KJtg99qGzm7OwPmwPC2YZp26gQ= X-Gm-Gg: ASbGncuqsq5JAU27/j3Z6pzanKRYwzvbsBz/U7cnrNbz9/OHvfyPMXaTSshRhh2GVj4 b0lNbghWAKuBYAuDUN+08ZBJCTy4ic2jvK3E6R7pFMAovF0bSyQL9ubEstEkZYbCTtJnNaSTNwt uvaeogYlweAzMxq6GH8YaZF+Xcf9uj3T8TjaInCWcLN1wAGaz5u3L7os5HvEfUAgcOyDvL6n3Ji NnFQo68/8c3gDl/YmoKTD0IhyLn+NjMb39cfxN/RrOJDiAaKcMswj+LMIPpcnqZPpobKwHn0Ks+ wJxuvSKk1GSMCDYPcLLV4hHvf/k= X-Google-Smtp-Source: AGHT+IFmxfco1IfEx1v6nEDEBVpUeyVxhIBsyxy3gu5lQpRn7N6JM6Z9ry5GhQg4faWJ2K4HEnFIkA== X-Received: by 2002:a17:902:e5cb:b0:215:a412:4f12 with SMTP id d9443c01a7336-215bd2145cbmr2724055ad.33.1733178653556; Mon, 02 Dec 2024 14:30:53 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-215413d3408sm64956775ad.159.2024.12.02.14.30.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Dec 2024 14:30:53 -0800 (PST) Date: Mon, 2 Dec 2024 14:30:20 -0800 From: Stephen Hemminger To: vanshika.shukla@nxp.com Cc: dev@dpdk.org, Thomas Monjalon , Wathsala Vithanage , Bruce Richardson , Gagandeep Singh , Sachin Saxena , Anatoly Burakov , Apeksha Gupta Subject: Re: [v1 01/12] net/enetc: Add initial ENETC4 PMD driver support Message-ID: <20241202143020.6c80702b@hermes.local> In-Reply-To: <20241018072644.2379012-2-vanshika.shukla@nxp.com> References: <20241018072644.2379012-1-vanshika.shukla@nxp.com> <20241018072644.2379012-2-vanshika.shukla@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Fri, 18 Oct 2024 12:56:33 +0530 vanshika.shukla@nxp.com wrote: > if ((high_mac | low_mac) == 0) { > + char *first_byte; > + > + ENETC_PMD_NOTICE("MAC is not available for this SI, " > + "set random MAC"); > + mac = (uint32_t *)hw->mac.addr; > + *mac = (uint32_t)rte_rand(); > + first_byte = (char *)mac; > + *first_byte &= 0xfe; /* clear multicast bit */ > + *first_byte |= 0x02; /* set local assignment bit (IEEE802) */ Why do you need to reinvent rte_eth_random_addr()?