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 95BA4459B0; Tue, 17 Sep 2024 05:36:06 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8341D402C4; Tue, 17 Sep 2024 05:36:06 +0200 (CEST) Received: from mail-pj1-f44.google.com (mail-pj1-f44.google.com [209.85.216.44]) by mails.dpdk.org (Postfix) with ESMTP id 5206440261 for ; Tue, 17 Sep 2024 05:36:05 +0200 (CEST) Received: by mail-pj1-f44.google.com with SMTP id 98e67ed59e1d1-2daaa9706a9so4198927a91.1 for ; Mon, 16 Sep 2024 20:36:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1726544164; x=1727148964; 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=T3zweo2PbiSnjcjUk7mBAsS8hyQI75YBqxEKkFnsPa4=; b=ljkX4dPL/nGxrSf7RJEWclm/XNRd54cw7R0Ny6rl6pHOnospJjMg//1ymgFqdSAMQX L6mg5HjoFsyp6Tc0tjdWwGn6fxR9dHzam79lPmnJlDd7aK1xrwUBtqKuakEE88DPSW0s 2ydwYOENsZun5G28xwaq3dD3QZI0UmDwopH8USFWcVjVZtnBYohl1SycowzqJpmU1phL rHWzB2MDjSChUUHiV7j1dQA4cjQ+K/DrI1PVan9k5vi/fDcRDyBYy3okNY9QJkk/yb9d 5LvWx9UDM2SN++6rOc0cdz31MeCjOXDZ2WSgo5YwRU3R7eD2xzj8RxC7mC6ax+N5gRnc DEdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726544164; x=1727148964; 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=T3zweo2PbiSnjcjUk7mBAsS8hyQI75YBqxEKkFnsPa4=; b=BRaashd9+WrpQMQ64+ZihwqL6coz7G+aA5R2HMh84meFbMjRZKhIs8m2qeXmaEXhE5 Rwox2+/rLBjrAk11GfoaW/cxo3TiOpMPeVvQTjfafDziXLD4Jp7B53EgmJSjbA9zFEQU 8RjS16GU0S5uZovcB8pPev90PBcFsmmen08Clg7wYuCCGOtIXnki4f4f9olZb0nOxNPD eojR84G/udGyPb8Hcz6ajjCRAPipoBJpeMn7LFAqyEuJ4RDyEr69Hyj9hybJuOUh95N1 7t3CclsiB8/24ccjhemJr7S2AGJuT2E7lvZ82VXflBkdHLKmPjcm+luf2zdX9X9VR51a wuIQ== X-Gm-Message-State: AOJu0YyXdxek6Ck9K3xYTvSHHoZhifuW4ZyXpYNjlqOGziRDyYJCoq1c KprXaD4LiFWppPduYChP0br25TivKHqgpaMZLjNjQbkhWPUd6j/pxg4/L3JuTfs= X-Google-Smtp-Source: AGHT+IG1kEN6tfqetohSQIBoGPAcFY1neZ91toh3OWJix37WSE1EQc3xMYla4Pqn4xsNEfrCLjPXmA== X-Received: by 2002:a17:90a:ad96:b0:2d8:f3e7:a177 with SMTP id 98e67ed59e1d1-2db9ffa11b6mr18032968a91.6.1726544164421; Mon, 16 Sep 2024 20:36:04 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2dbb9d5bb73sm8289917a91.38.2024.09.16.20.36.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Sep 2024 20:36:04 -0700 (PDT) Date: Mon, 16 Sep 2024 20:36:02 -0700 From: Stephen Hemminger To: Isaac Boukris Cc: dev@dpdk.org Subject: Re: [PATCH] net/tap: add new macpair option for split MAC address Message-ID: <20240916203602.62f8f66e@hermes.local> In-Reply-To: <20240916173851.369395-1-iboukris@gmail.com> References: <20240916173851.369395-1-iboukris@gmail.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 Mon, 16 Sep 2024 20:38:51 +0300 Isaac Boukris wrote: > + if (mac_pair) { > + struct rte_ether_addr *mac; > + mac = (struct rte_ether_addr*)ifr.ifr_hwaddr.sa_data; > + mac->addr_bytes[3]++; You need to generate a new MAC to be safe, just incrementing by one can easily cause address conflicts.