DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Min Hu (Connor)" <humin29@huawei.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: <dev@dpdk.org>, <ferruh.yigit@intel.com>, <thomas@monjalon.net>
Subject: Re: [PATCH] kni: fix device address set
Date: Thu, 7 Apr 2022 08:44:23 +0800	[thread overview]
Message-ID: <40f8ce34-982c-d96f-b1a7-d8381c36dcf1@huawei.com> (raw)
In-Reply-To: <20220406081700.4aa2d9a7@hermes.local>

Hi, Stephen,
  I think this is a good option, but the macro definition is like:
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0)
+#define ether_addr_copy(dst, src) memcpy(dst, src, ETH_ALEN)
+#endif

@Ferry, why is it limited for "LINUX_VERSION_CODE < KERNEL_VERSION(3, 
14, 0)" ?


在 2022/4/6 23:17, Stephen Hemminger 写道:
> On Wed, 6 Apr 2022 16:22:13 +0800
> "Min Hu (Connor)" <humin29@huawei.com> wrote:
> 
>>   	/* if user has provided a valid mac address */
>>   	if (is_valid_ether_addr(dev_info.mac_addr))
>> -		memcpy(net_dev->dev_addr, dev_info.mac_addr, ETH_ALEN);
>> +		memcpy(mac_addr, dev_info.mac_addr, ETH_ALEN);
> 
> Minor enhancement. Could this use ether_addr_copy instead?
> 		ether_addr_copy(mac_addr, dev_info.mac_addr);
> .
> 

  reply	other threads:[~2022-04-07  0:44 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-06  8:22 Min Hu (Connor)
2022-04-06 15:17 ` Stephen Hemminger
2022-04-07  0:44   ` Min Hu (Connor) [this message]
2022-04-07  3:18     ` Stephen Hemminger
2022-04-07  6:21       ` Min Hu (Connor)
2022-04-07  7:42     ` Thomas Monjalon
2022-04-07  8:08       ` Min Hu (Connor)
2022-04-07  8:25 ` [PATCH v2] " Min Hu (Connor)
2022-04-25  3:58   ` Min Hu (Connor)
2022-05-23  9:24 ` [PATCH v3] " Min Hu (Connor)
2022-05-31 15:32   ` Andrew Rybchenko
2022-06-01  2:01     ` Min Hu (Connor)
2022-06-01  1:59 ` [PATCH v4] " Min Hu (Connor)
2022-06-01  9:02   ` Andrew Rybchenko
2022-06-02  6:58     ` Min Hu (Connor)
2022-06-02  6:54 ` [PATCH v5] " Min Hu (Connor)
2022-06-03 11:50   ` Andrew Rybchenko
2022-06-02 15:31 ` [PATCH] " Stephen Hemminger

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=40f8ce34-982c-d96f-b1a7-d8381c36dcf1@huawei.com \
    --to=humin29@huawei.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=stephen@networkplumber.org \
    --cc=thomas@monjalon.net \
    /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).