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 AA2B1A0540 for ; Thu, 7 Jul 2022 09:58:04 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A367A406B4; Thu, 7 Jul 2022 09:58:04 +0200 (CEST) Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by mails.dpdk.org (Postfix) with ESMTP id B4E32406B4 for ; Thu, 7 Jul 2022 09:58:03 +0200 (CEST) Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 827FF3F04C for ; Thu, 7 Jul 2022 07:58:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1657180683; bh=YVeanTXm2cdb3djENJ8SIaibZnulmb6oaU/90R/FwB8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=PhVUwvqaWXG/016LFbnQdBeGXluJh2pSIvzNbrg9+8VtDzt+0QHS8C0lpNo6/HPOD O1H1rZ8U7KuIv8Hg1cfJku4RJLD7R0h6YsEukcz3i+snF9qyjs6EisG+8FwA4Z+2BQ P1WapdJVzefxbhTjSsjfqGJXRNxeqkQ/zYjGUu0wvh7Qq6NL7Xv8M6mLoAc7FrlYsZ zYQQ8uL3vFt8JcRSnE5Km7Z5xRjnLUUbeIfuNGb5zZa6uqVJNX1PJ2q45ojgPjAJl5 dHRWZJ7LlNf6REEmy9D817HAO5AK/wCauCRVebHIm5fHitVhRxKtat6LacPoLPK4a1 EHdqM76GquyyA== Received: by mail-ej1-f72.google.com with SMTP id s4-20020a170906500400b006feaccb3a0eso4448778ejj.11 for ; Thu, 07 Jul 2022 00:58:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=YVeanTXm2cdb3djENJ8SIaibZnulmb6oaU/90R/FwB8=; b=sBgKoB2ot70D5NKhE7nmr045qSqWW+T42Z1DyMVBXD14sm9TY0VRFULTjrtSllsqVy A4NQrexeN8taGeKKd829zNkhGC1at99EePSHXUXsNASr5iHBX25dJkzSNPv8hWsPh4Gd CgnLHrGPznD/EGr6CMtDiR/m2fgNJIFw5/4ezMfdO3q3j7IBl/HmYAWysS7c2rBLBhZf Hfo6FZqYSozV2+oSUqRyGi4MxkOVgvI7AnXhriB3vCULH56FF86c6JyNw08wVaD3TwCO XonjJsts4etpCTdAthFR0KZzP/iGX061Paj0C21s4ay0utLZzf23f9Vn5hV/aYbbTpBD MeKA== X-Gm-Message-State: AJIora+VS5DaeiYyA1Tnrbp+Qi56Y37pfCWfa6fp3Me6LOxTihTMyFZW vIi0Xlx/g96kpRo1YQykdY+dht+jCX57ZFyrKL8AsPbBHWhvECSfVhzV1B1ouC1JCluhDnZ8DoH S8SAtCyJF1RGHbZR+9qzrPOc8 X-Received: by 2002:a17:907:7251:b0:723:dc32:aefb with SMTP id ds17-20020a170907725100b00723dc32aefbmr42250560ejc.91.1657180682902; Thu, 07 Jul 2022 00:58:02 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uEAXzKPad/EckHknX9ordOwHa7MCiRLMy6miT3AJScqIlvlH8fF4Qp/uEsq6dWZy2aBZPuoQ== X-Received: by 2002:a17:907:7251:b0:723:dc32:aefb with SMTP id ds17-20020a170907725100b00723dc32aefbmr42250549ejc.91.1657180682680; Thu, 07 Jul 2022 00:58:02 -0700 (PDT) Received: from Keschdeichel.fritz.box ([2a02:6d40:3a4f:7b00:c19b:938e:7c97:afe2]) by smtp.gmail.com with ESMTPSA id q21-20020aa7cc15000000b0042617ba638esm27392052edt.24.2022.07.07.00.58.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jul 2022 00:58:02 -0700 (PDT) From: christian.ehrhardt@canonical.com To: Ke Zhang Cc: Andrew Rybchenko , Ferruh Yigit , dpdk stable Subject: patch 'kni: use dedicated function to set random MAC address' has been queued to stable release 19.11.13 Date: Thu, 7 Jul 2022 09:54:46 +0200 Message-Id: <20220707075522.194223-51-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220707075522.194223-1-christian.ehrhardt@canonical.com> References: <20220707075522.194223-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 19.11.13 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/09/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/051010a32bbfa656279cfd86ff41160bac43c3f6 Thanks. Christian Ehrhardt --- >From 051010a32bbfa656279cfd86ff41160bac43c3f6 Mon Sep 17 00:00:00 2001 From: Ke Zhang Date: Wed, 8 Jun 2022 15:11:16 +0300 Subject: [PATCH] kni: use dedicated function to set random MAC address MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit 2ee8c67ef9399759cb0d3f34b2c9fb6ea0ecc832 ] eth_hw_addr_random() sets address type correctly. eth_hw_addr_random() is available since Linux v3.4, so no compat is required. Also fix the warning: warning: passing argument 1 of ‘memcpy’ discards ‘const’ qualifier from pointer target type Variable dev_addr is done const intentionally in Linux v5.17 to prevent using it directly. Fixes: ea6b39b5b847 ("kni: remove ethtool support") Signed-off-by: Ke Zhang Signed-off-by: Andrew Rybchenko Acked-by: Ferruh Yigit --- kernel/linux/kni/kni_misc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/linux/kni/kni_misc.c b/kernel/linux/kni/kni_misc.c index 2067cb4841..f908ebcd82 100644 --- a/kernel/linux/kni/kni_misc.c +++ b/kernel/linux/kni/kni_misc.c @@ -403,8 +403,8 @@ kni_ioctl_create(struct net *net, uint32_t ioctl_num, if (is_valid_ether_addr(dev_info.mac_addr)) memcpy(net_dev->dev_addr, dev_info.mac_addr, ETH_ALEN); else - /* Generate random MAC address. */ - eth_random_addr(net_dev->dev_addr); + /* Assign random MAC address. */ + eth_hw_addr_random(net_dev); if (dev_info.mtu) net_dev->mtu = dev_info.mtu; -- 2.37.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-07-07 09:54:13.336526896 +0200 +++ 0051-kni-use-dedicated-function-to-set-random-MAC-address.patch 2022-07-07 09:54:10.941824469 +0200 @@ -1 +1 @@ -From 2ee8c67ef9399759cb0d3f34b2c9fb6ea0ecc832 Mon Sep 17 00:00:00 2001 +From 051010a32bbfa656279cfd86ff41160bac43c3f6 Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit 2ee8c67ef9399759cb0d3f34b2c9fb6ea0ecc832 ] + @@ -22 +23,0 @@ -Cc: stable@dpdk.org @@ -32 +33 @@ -index 780187d8bf..4f6dd373a3 100644 +index 2067cb4841..f908ebcd82 100644 @@ -35 +36 @@ -@@ -405,8 +405,8 @@ kni_ioctl_create(struct net *net, uint32_t ioctl_num, +@@ -403,8 +403,8 @@ kni_ioctl_create(struct net *net, uint32_t ioctl_num,