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 E95EDA04A6 for ; Fri, 17 Dec 2021 18:52:56 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E005740040; Fri, 17 Dec 2021 18:52:56 +0100 (CET) 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 4F78740040 for ; Fri, 17 Dec 2021 18:52:56 +0100 (CET) Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) (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 2B1883F048 for ; Fri, 17 Dec 2021 17:52:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1639763576; bh=EdIz/oLDYWR7GqVYWtq7fpOwHdvtoKxZ2M67hyhrG4M=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=fg9NSx38MfVVmOjWcmTwXW785GVK7QoKCIqk3FvQ/jXuHiaDcP8/jtjZHFVFr4xzQ 8ERRXPTE68qfRxaz7o8EEXbG+etZzCoijpNBmFgV80n1BjPp40QxH3b4MgIZVwVCP4 XTlNQdqygTEWmMP+f5uRfFryOiFP4ufgRg9+rgdr+/6MdOhP1DAOt0hzdgg6BUuJg6 aY17yH3jY7V8ThjcaAbIyq/jvUdPCgthwOOr0iLJJQmjtKnz+8YKj9TnM/EWKu/5EJ aJtkZIlGsoqHcde6XUPvW/sd+H9QlRrv4LphLnwPliFmVnkFMARv3HOvdg0YL+jKpw Tv7O8hOmDF73w== Received: by mail-qv1-f69.google.com with SMTP id kj12-20020a056214528c00b003bde2e1df71so3275348qvb.18 for ; Fri, 17 Dec 2021 09:52:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EdIz/oLDYWR7GqVYWtq7fpOwHdvtoKxZ2M67hyhrG4M=; b=Hh0VtGvRSg+3/vwRZeaZ/9TBHCbS+mMczi9dhKEXO9CqGIV3tc4X5B2MK9bj3QhVI2 yac4MEenQgAzFzZNN+ysz0b6vqr18Sw3LD0g8M607zZAb10qCPMdt0g+VBX/8nT1UHAR YqbJHweblcbKi9zqy58O+FVF90++WCBB60M7IWARdlcT0Y/ORKjEsH9ALokCdbUvKEMx 1bxNo51RCJlfSPD8EsIGISlGnctg9/EtOibSFM7TsWugbbwCvKGELfAuGKvS/Z5FXiSs 6qM+vmuN4+zMdwQHJ7IRE4tLmA/kazL5xBoOhn05bq1e6K3eA4askrsGJqsnZTAZgGRc oJ3Q== X-Gm-Message-State: AOAM530yb0A7wyHww1otjySOA63SkpGr8biFPDtqRTNqjsIr7qX84bW4 1zg8EqEtyp1z3pkZB3cuceW9BcPaldTeZhoBFk5I+daO2i/CnkY86ux9WqWaYvDw9jDnX9wbVaQ BIZ3NtTMufRsS41fh0gpvxfzQBYaBzzxNRmVKXh+w X-Received: by 2002:ad4:5b82:: with SMTP id 2mr3624661qvp.87.1639763575251; Fri, 17 Dec 2021 09:52:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJyz16n2onvdJFYGSQl0acUOR3r7NI8RNAFxSLM7MAMZT5PaxLzzCMtBC51FVaLhmQppBhyorPILiskDx+NU8Dg= X-Received: by 2002:ad4:5b82:: with SMTP id 2mr3624646qvp.87.1639763574974; Fri, 17 Dec 2021 09:52:54 -0800 (PST) MIME-Version: 1.0 References: <20211217155404.3259078-1-ferruh.yigit@intel.com> In-Reply-To: <20211217155404.3259078-1-ferruh.yigit@intel.com> From: Christian Ehrhardt Date: Fri, 17 Dec 2021 18:52:29 +0100 Message-ID: Subject: Re: [PATCH 19.11] kni: update kernel API to set random MAC address To: Ferruh Yigit Cc: stable@dpdk.org Content-Type: text/plain; charset="UTF-8" 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 On Fri, Dec 17, 2021 at 4:54 PM Ferruh Yigit wrote: > > [ upstream commit e6cbfd9bf30bbc4170fe8c7c04a16d9cf795fb90 ] > > Previously used 'random_ether_addr()' API is removed in upstream kernel > with commit > Commit ba530fea8ca1 ("ethernet: remove random_ether_addr()") Thanks, applied > Replacement API 'eth_random_addr()' is around since v3.6 [1], so > simply switching to this API without any version checks. > > [1] > 0a4dd594982a ("etherdevice: Rename random_ether_addr to eth_random_addr") > > Signed-off-by: Ferruh Yigit > --- > kernel/linux/kni/kni_misc.c | 7 ++----- > 1 file changed, 2 insertions(+), 5 deletions(-) > > diff --git a/kernel/linux/kni/kni_misc.c b/kernel/linux/kni/kni_misc.c > index 2b464c438113..f4944e1ddf33 100644 > --- a/kernel/linux/kni/kni_misc.c > +++ b/kernel/linux/kni/kni_misc.c > @@ -399,11 +399,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() is the > - * newer version of generating mac address in kernel. > - */ > - random_ether_addr(net_dev->dev_addr); > + /* Generate random MAC address. */ > + eth_random_addr(net_dev->dev_addr); > > if (dev_info.mtu) > net_dev->mtu = dev_info.mtu; > -- > 2.33.1 > -- Christian Ehrhardt Staff Engineer, Ubuntu Server Canonical Ltd