From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Mallesh Koujalagi <malleshx.koujalagi@intel.com>, dev@dpdk.org
Cc: mtetsuyah@gmail.com
Subject: Re: [dpdk-dev] [PATCH v2] net/null:Different mac address support
Date: Tue, 6 Mar 2018 11:40:23 +0000 [thread overview]
Message-ID: <6c6d62cd-0b30-c68a-8036-ebe621f996bc@intel.com> (raw)
In-Reply-To: <1520307314-25049-1-git-send-email-malleshx.koujalagi@intel.com>
On 3/6/2018 3:35 AM, Mallesh Koujalagi wrote:
> After attaching two Null device to ovs, seeing "00.00.00.00.00.00" mac
> address for both null devices. Fix this issue, by setting different mac
> address.
>
> Signed-off-by: Mallesh Koujalagi <malleshx.koujalagi@intel.com>
<...>
> @@ -514,12 +524,21 @@ eth_dev_null_create(struct rte_vdev_device *dev,
> if (!data)
> return -ENOMEM;
>
> + eth_addr = rte_zmalloc_socket(rte_vdev_device_name(dev),
> + sizeof(*eth_addr), 0, dev->device.numa_node);
> + if (eth_addr == NULL) {
> + rte_free(data);
> + return -ENOMEM;
> + }
> +
> eth_dev = rte_eth_vdev_allocate(dev, sizeof(*internals));
> if (!eth_dev) {
> + rte_free(eth_addr);
> rte_free(data);
> return -ENOMEM;
> }
Same comment from previous version, why not put "eth_addr" inside "struct
pmd_internals"?
"struct pmd_internals" is already allocated/freed in the code, so you don't need
to manage "eth_addr" if you put it into "struct pmd_internals" it will come free.
<...>
next prev parent reply other threads:[~2018-03-06 11:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-03 2:11 [dpdk-dev] [PATCH] " Mallesh Koujalagi
2018-03-05 14:21 ` Ferruh Yigit
2018-03-06 3:35 ` [dpdk-dev] [PATCH v2] " Mallesh Koujalagi
2018-03-06 4:26 ` Stephen Hemminger
2018-03-06 11:40 ` Ferruh Yigit [this message]
2018-03-07 3:31 ` [dpdk-dev] [PATCH v3] " Mallesh Koujalagi
2018-03-07 10:45 ` Ferruh Yigit
2018-03-07 18:11 ` Koujalagi, MalleshX
2018-03-16 13:57 ` Ferruh Yigit
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=6c6d62cd-0b30-c68a-8036-ebe621f996bc@intel.com \
--to=ferruh.yigit@intel.com \
--cc=dev@dpdk.org \
--cc=malleshx.koujalagi@intel.com \
--cc=mtetsuyah@gmail.com \
/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).