* [dpdk-users] Setting real MAC address in KNI application
@ 2017-05-16 17:10 Sushil Adhikari
2017-05-17 10:42 ` Andriy Berestovskyy
0 siblings, 1 reply; 3+ messages in thread
From: Sushil Adhikari @ 2017-05-16 17:10 UTC (permalink / raw)
To: users
When I run the DPDK KNI application it gives random mac address to the
ethernet ports. How can I configure it to set up the real MAC address of
the hardware(ethernet ports)? It seems like I can get mac address by
calling rte_eth_macaddr_get but to set up I need to call kni_net_set_mac
which takes in net_device structure which again I don't have access to from
my application. Is there a way to set up the mac address of dpdk ports to
its original mac address in kni application.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-users] Setting real MAC address in KNI application
2017-05-16 17:10 [dpdk-users] Setting real MAC address in KNI application Sushil Adhikari
@ 2017-05-17 10:42 ` Andriy Berestovskyy
2017-05-17 19:47 ` Sushil Adhikari
0 siblings, 1 reply; 3+ messages in thread
From: Andriy Berestovskyy @ 2017-05-17 10:42 UTC (permalink / raw)
To: Sushil Adhikari; +Cc: users
Hey Suchil,
Just add a MAC to your /etc/network/interfaces:
iface kni0 inet static
hwaddress 10:20:30:40:50:60
Regards,
Andriy
On Tue, May 16, 2017 at 7:10 PM, Sushil Adhikari <sushil446@gmail.com> wrote:
> When I run the DPDK KNI application it gives random mac address to the
> ethernet ports. How can I configure it to set up the real MAC address of
> the hardware(ethernet ports)? It seems like I can get mac address by
> calling rte_eth_macaddr_get but to set up I need to call kni_net_set_mac
> which takes in net_device structure which again I don't have access to from
> my application. Is there a way to set up the mac address of dpdk ports to
> its original mac address in kni application.
--
Andriy Berestovskyy
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-users] Setting real MAC address in KNI application
2017-05-17 10:42 ` Andriy Berestovskyy
@ 2017-05-17 19:47 ` Sushil Adhikari
0 siblings, 0 replies; 3+ messages in thread
From: Sushil Adhikari @ 2017-05-17 19:47 UTC (permalink / raw)
To: Andriy Berestovskyy; +Cc: users
Thank you for the replay but I am trying to do it in the KNI application
which runs before bringing the network up. I found one recent patch which
seem to work
http://dpdk.org/dev/patchwork/patch/24067/
I applied the patch and added mac address in configuration parameter of
struct rte_kni_conf.
On Wed, May 17, 2017 at 5:42 AM, Andriy Berestovskyy <aber@semihalf.com>
wrote:
> Hey Suchil,
> Just add a MAC to your /etc/network/interfaces:
>
> iface kni0 inet static
> hwaddress 10:20:30:40:50:60
>
> Regards,
> Andriy
>
>
> On Tue, May 16, 2017 at 7:10 PM, Sushil Adhikari <sushil446@gmail.com>
> wrote:
> > When I run the DPDK KNI application it gives random mac address to the
> > ethernet ports. How can I configure it to set up the real MAC address of
> > the hardware(ethernet ports)? It seems like I can get mac address by
> > calling rte_eth_macaddr_get but to set up I need to call kni_net_set_mac
> > which takes in net_device structure which again I don't have access to
> from
> > my application. Is there a way to set up the mac address of dpdk ports to
> > its original mac address in kni application.
>
>
>
> --
> Andriy Berestovskyy
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-05-17 19:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-16 17:10 [dpdk-users] Setting real MAC address in KNI application Sushil Adhikari
2017-05-17 10:42 ` Andriy Berestovskyy
2017-05-17 19:47 ` Sushil Adhikari
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).