From: Christian Ehrhardt <christian.ehrhardt@canonical.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: stable@dpdk.org
Subject: Re: [PATCH 19.11] kni: update kernel API to set random MAC address
Date: Fri, 17 Dec 2021 18:52:29 +0100 [thread overview]
Message-ID: <CAATJJ0+w9xfSwfP+ky8tJ03WUuNRhMa_83UBHavVT9YN=Ts3ag@mail.gmail.com> (raw)
In-Reply-To: <20211217155404.3259078-1-ferruh.yigit@intel.com>
On Fri, Dec 17, 2021 at 4:54 PM Ferruh Yigit <ferruh.yigit@intel.com> 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 <ferruh.yigit@intel.com>
> ---
> 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
prev parent reply other threads:[~2021-12-17 17:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-17 15:54 Ferruh Yigit
2021-12-17 17:52 ` Christian Ehrhardt [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAATJJ0+w9xfSwfP+ky8tJ03WUuNRhMa_83UBHavVT9YN=Ts3ag@mail.gmail.com' \
--to=christian.ehrhardt@canonical.com \
--cc=ferruh.yigit@intel.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).