DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment?
@ 2015-06-15 10:35 Scott.Jhuang (莊清翔) : 6309
  2015-06-16  6:48 ` Choi, Sy Jong
  0 siblings, 1 reply; 13+ messages in thread
From: "Scott.Jhuang (莊清翔) : 6309" @ 2015-06-15 10:35 UTC (permalink / raw)
  To: dev

Hi,

I want to get etherport's net_device structs and using ethtool_cmd to get some information of etherports.
Are these capabilitys igb_uio driver also provided?

If not, how can I get net_devices and use ethtool_cmd capabilitys?

--

Best Regards,
Scott Jhuang

Software Engineering Dept.
Software Engineer
CASwell
238 新北市樹林區博愛街242號8樓
8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan
Tel:+886-2-7705-8888 # 6309
Fax:+886-2-7731-9988
E-mail:scott.jhuang@cas-well.com<mailto:scott.jhuang@cas-well.com>
CASWELL Inc. 瑞祺電通 http://www.cas-well.com


本信件可能包含瑞祺電通機密資訊,非指定之收件者,請勿使用或揭露本信件內容,並請銷毀此信件。 This email may contain confidential information. Please do not use or disclose it in any way and delete it if you are not the intended recipient.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment?
  2015-06-15 10:35 [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment? Scott.Jhuang (莊清翔) : 6309
@ 2015-06-16  6:48 ` Choi, Sy Jong
  2015-06-17  3:11   ` Scott.Jhuang (莊清翔) : 6309
  0 siblings, 1 reply; 13+ messages in thread
From: Choi, Sy Jong @ 2015-06-16  6:48 UTC (permalink / raw)
  To: "Scott.Jhuang (莊清翔) : 6309", dev

Hi Scott,

You can review DPDK KNI sample app, there's ethtool support using a vEth device interfacing to DPDK PMD.

Pure DPDK PMD require programming to display the information in ethtool. The interfacing is demonstrate on KNI sample app.

Regards,
Choi, Sy Jong
Platform Application Engineer

-----Original Message-----
From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of "Scott.Jhuang (???) : 6309"
Sent: Monday, June 15, 2015 6:35 PM
To: dev@dpdk.org
Subject: [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment?

Hi,

I want to get etherport's net_device structs and using ethtool_cmd to get some information of etherports.
Are these capabilitys igb_uio driver also provided?

If not, how can I get net_devices and use ethtool_cmd capabilitys?

--

Best Regards,
Scott Jhuang

Software Engineering Dept.
Software Engineer
CASwell
238 新北市樹林區博愛街242號8樓
8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan
Tel:+886-2-7705-8888 # 6309
Fax:+886-2-7731-9988
E-mail:scott.jhuang@cas-well.com<mailto:scott.jhuang@cas-well.com>
CASWELL Inc. 瑞祺電通 http://www.cas-well.com


本信件可能包含瑞祺電通機密資訊,非指定之收件者,請勿使用或揭露本信件內容,並請銷毀此信件。 This email may contain confidential information. Please do not use or disclose it in any way and delete it if you are not the intended recipient.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment?
  2015-06-16  6:48 ` Choi, Sy Jong
@ 2015-06-17  3:11   ` Scott.Jhuang (莊清翔) : 6309
  2015-06-17  3:15     ` Choi, Sy Jong
  0 siblings, 1 reply; 13+ messages in thread
From: "Scott.Jhuang (莊清翔) : 6309" @ 2015-06-17  3:11 UTC (permalink / raw)
  To: Choi, Sy Jong, dev

Hi Sy Jong,

But...I am programming a driver now, have any sample driver I can reference?

Choi, Sy Jong 於 2015年06月16日 14:48 寫道:

Hi Scott,

You can review DPDK KNI sample app, there's ethtool support using a vEth device interfacing to DPDK PMD.

Pure DPDK PMD require programming to display the information in ethtool. The interfacing is demonstrate on KNI sample app.

Regards,
Choi, Sy Jong
Platform Application Engineer

-----Original Message-----
From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of "Scott.Jhuang (???) : 6309"
Sent: Monday, June 15, 2015 6:35 PM
To: dev@dpdk.org<mailto:dev@dpdk.org>
Subject: [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment?

Hi,

I want to get etherport's net_device structs and using ethtool_cmd to get some information of etherports.
Are these capabilitys igb_uio driver also provided?

If not, how can I get net_devices and use ethtool_cmd capabilitys?

--

Best Regards,
Scott Jhuang

Software Engineering Dept.
Software Engineer
CASwell
238 新北市樹林區博愛街242號8樓
8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan
Tel:+886-2-7705-8888 # 6309
Fax:+886-2-7731-9988
E-mail:scott.jhuang@cas-well.com<mailto:scott.jhuang@cas-well.com><mailto:scott.jhuang@cas-well.com><mailto:scott.jhuang@cas-well.com>
CASWELL Inc. 瑞祺電通 http://www.cas-well.com


本信件可能包含瑞祺電通機密資訊,非指定之收件者,請勿使用或揭露本信件內容,並請銷毀此信件。 This email may contain confidential information. Please do not use or disclose it in any way and delete it if you are not the intended recipient.



--

Best Regards,
Scott Jhuang

Software Engineering Dept.
Software Engineer
CASwell
238 新北市樹林區博愛街242號8樓
8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan
Tel:+886-2-7705-8888 # 6309
Fax:+886-2-7731-9988
E-mail:scott.jhuang@cas-well.com<mailto:scott.jhuang@cas-well.com>
CASWELL Inc. 瑞祺電通 http://www.cas-well.com


本信件可能包含瑞祺電通機密資訊,非指定之收件者,請勿使用或揭露本信件內容,並請銷毀此信件。 This email may contain confidential information. Please do not use or disclose it in any way and delete it if you are not the intended recipient.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment?
  2015-06-17  3:11   ` Scott.Jhuang (莊清翔) : 6309
@ 2015-06-17  3:15     ` Choi, Sy Jong
  2015-06-18  4:24       ` Scott.Jhuang (莊清翔) : 6309
  0 siblings, 1 reply; 13+ messages in thread
From: Choi, Sy Jong @ 2015-06-17  3:15 UTC (permalink / raw)
  To: "Scott.Jhuang (莊清翔) : 6309", dev

Hi Scott,

You are right, the KNI will be a good reference for you. It demonstrate how DPDK PMD interface with kernel.
May I know are you planning to build the interface to ethtool? You can try running KNI app.

Regards,
Choi, Sy Jong
Platform Application Engineer

From: "Scott.Jhuang (莊清翔) : 6309" [mailto:Scott.Jhuang@cas-well.com]
Sent: Wednesday, June 17, 2015 11:12 AM
To: Choi, Sy Jong; dev@dpdk.org
Subject: Re: [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment?

Hi Sy Jong,

But...I am programming a driver now, have any sample driver I can reference?

Choi, Sy Jong 於 2015年06月16日 14:48 寫道:

Hi Scott,



You can review DPDK KNI sample app, there's ethtool support using a vEth device interfacing to DPDK PMD.



Pure DPDK PMD require programming to display the information in ethtool. The interfacing is demonstrate on KNI sample app.



Regards,

Choi, Sy Jong

Platform Application Engineer



-----Original Message-----

From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of "Scott.Jhuang (???) : 6309"

Sent: Monday, June 15, 2015 6:35 PM

To: dev@dpdk.org<mailto:dev@dpdk.org>

Subject: [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment?



Hi,



I want to get etherport's net_device structs and using ethtool_cmd to get some information of etherports.

Are these capabilitys igb_uio driver also provided?



If not, how can I get net_devices and use ethtool_cmd capabilitys?



--



Best Regards,

Scott Jhuang



Software Engineering Dept.

Software Engineer

CASwell

238 新北市樹林區博愛街242號8樓

8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan

Tel:+886-2-7705-8888 # 6309

Fax:+886-2-7731-9988

E-mail:scott.jhuang@cas-well.com<mailto:scott.jhuang@cas-well.com><mailto:scott.jhuang@cas-well.com><mailto:scott.jhuang@cas-well.com>

CASWELL Inc. 瑞祺電通 http://www.cas-well.com





本信件可能包含瑞祺電通機密資訊,非指定之收件者,請勿使用或揭露本信件內容,並請銷毀此信件。 This email may contain confidential information. Please do not use or disclose it in any way and delete it if you are not the intended recipient.

--

Best Regards,

Scott Jhuang



Software Engineering Dept.

Software Engineer

CASwell

238 新北市樹林區博愛街242號8樓

8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan

Tel:+886-2-7705-8888 # 6309

Fax:+886-2-7731-9988

E-mail:scott.jhuang@cas-well.com<mailto:scott.jhuang@cas-well.com>

CASWELL Inc. 瑞祺電通 http://www.cas-well.com
本信件可能包含瑞祺電通機密資訊,非指定之收件者,請勿使用或揭露本信件內容,並請銷毀此信件。 This email may contain confidential information. Please do not use or disclose it in any way and delete it if you are not the intended recipient.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment?
  2015-06-17  3:15     ` Choi, Sy Jong
@ 2015-06-18  4:24       ` Scott.Jhuang (莊清翔) : 6309
  2015-06-19  2:35         ` Choi, Sy Jong
  0 siblings, 1 reply; 13+ messages in thread
From: "Scott.Jhuang (莊清翔) : 6309" @ 2015-06-18  4:24 UTC (permalink / raw)
  To: Choi, Sy Jong, dev

Dear Sy Jong,

I'm planning to program a driver to get all the ethport's net_device structure, because I need some information from these net_device structures.
And I also need to use net_device struct's ethtool_cmd to get some information e.g. ethtool_cmd.phy_address, net_device->ethtool_ops->get_settings.

In fact, I need some information from net_device struct to access and control PHY's link-up/down,
and I reference igb driver to design the link-up/down functions, since in DPDK envirenment doesn't have igb driver,
so In DPDK envirenment, I don't know how to get network deivce's net_device structs and more information which initial by igb driver(because doesn't have igb driver).

Choi, Sy Jong 於 2015年06月17日 11:15 寫道:
Hi Scott,

You are right, the KNI will be a good reference for you. It demonstrate how DPDK PMD interface with kernel.
May I know are you planning to build the interface to ethtool? You can try running KNI app.

Regards,
Choi, Sy Jong
Platform Application Engineer

From: "Scott.Jhuang (莊清 翔) : 6309" [mailto:Scott.Jhuang@cas-well.com]
Sent: Wednesday, June 17, 2015 11:12 AM
To: Choi, Sy Jong; dev@dpdk.org<mailto:dev@dpdk.org>
Subject: Re: [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment?

Hi Sy Jong,

But...I am programming a driver now, have any sample driver I can reference?

Choi, Sy Jong 於 2015年06月16日 14:48 寫道:

Hi Scott,



You can review DPDK KNI sample app, there's ethtool support using a vEth device interfacing to DPDK PMD.



Pure DPDK PMD require programming to display the information in ethtool. The interfacing is demonstrate on KNI sample app.



Regards,

Choi, Sy Jong

Platform Application Engineer



-----Original Message-----

From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of "Scott.Jhuang (???) : 6309"

Sent: Monday, June 15, 2015 6:35 PM

To: dev@dpdk.org<mailto:dev@dpdk.org>

Subject: [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment?



Hi,



I want to get etherport's net_device structs and using ethtool_cmd to get some information of etherports.

Are these capabilitys igb_uio driver also provided?



If not, how can I get net_devices and use ethtool_cmd capabilitys?



--



Best Regards,

Scott Jhuang



Software Engineering Dept.

Software Engineer

CASwell

238 新北市樹林區博愛街242號8樓

8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan

Tel:+886-2-7705-8888 # 6309

Fax:+886-2-7731-9988

E-mail:scott.jhuang@cas-well.com<mailto:scott.jhuang@cas-well.com><mailto:scott.jhuang@cas-well.com><mailto:scott.jhuang@cas-well.com>

CASWELL Inc. 瑞祺電通 http://www.cas-well.com





本信件可能包含瑞祺電通機密資訊,非指定之收件者,請勿使用或揭露本信件內容,並請銷毀此信件。 This email may contain confidential information. Please do not use or disclose it in any way and delete it if you are not the intended recipient.

--

Best Regards,

Scott Jhuang



Software Engineering Dept.

Software Engineer

CASwell

238 新北市樹林區博愛街242號8樓

8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan

Tel:+886-2-7705-8888 # 6309

Fax:+886-2-7731-9988

E-mail:scott.jhuang@cas-well.com<mailto:scott.jhuang@cas-well.com>

CASWELL Inc. 瑞祺電通 http://www.cas-well.com
本信件可能包含瑞祺電通機密資訊,非指定之收件者,請勿使用或揭露本信件內容,並請銷毀此信件。 This email may contain confidential information. Please do not use or disclose it in any way and delete it if you are not the intended recipient.


--

Best Regards,
Scott Jhuang

Software Engineering Dept.
Software Engineer
CASwell
238 新北市樹林區博愛街242號8樓
8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan
Tel:+886-2-7705-8888 # 6309
Fax:+886-2-7731-9988
E-mail:scott.jhuang@cas-well.com<mailto:scott.jhuang@cas-well.com>
CASWELL Inc. 瑞祺電通 http://www.cas-well.com


本信件可能包含瑞祺電通機密資訊,非指定之收件者,請勿使用或揭露本信件內容,並請銷毀此信件。 This email may contain confidential information. Please do not use or disclose it in any way and delete it if you are not the intended recipient.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment?
  2015-06-18  4:24       ` Scott.Jhuang (莊清翔) : 6309
@ 2015-06-19  2:35         ` Choi, Sy Jong
  2015-06-23 13:24           ` Scott.Jhuang (莊清翔) : 6309
  0 siblings, 1 reply; 13+ messages in thread
From: Choi, Sy Jong @ 2015-06-19  2:35 UTC (permalink / raw)
  To: "Scott.Jhuang (莊清翔) : 6309", dev

Hi Scott,

DPDK PMD are interfacing using rte_ethdev.c which link to ixgbe_ethdev.c there’s no “net_device” in our code.

But if you search DPDk code based, we have KNI example to teach you how to prepare the net_device structure.
Have you check out our DPDK KNI codes?

Regards,
Choi, Sy Jong
Platform Application Engineer

From: "Scott.Jhuang (莊清翔) : 6309" [mailto:Scott.Jhuang@cas-well.com]
Sent: Thursday, June 18, 2015 12:25 PM
To: Choi, Sy Jong; dev@dpdk.org
Subject: Re: [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment?

Dear Sy Jong,

I'm planning to program a driver to get all the ethport's net_device structure, because I need some information from these net_device structures.
And I also need to use net_device struct's ethtool_cmd to get some information e.g. ethtool_cmd.phy_address, net_device->ethtool_ops->get_settings.

In fact, I need some information from net_device struct to access and control PHY's link-up/down,
and I reference igb driver to design the link-up/down functions, since in DPDK envirenment doesn't have igb driver,
so In DPDK envirenment, I don't know how to get network deivce's net_device structs and more information which initial by igb driver(because doesn't have igb driver).

Choi, Sy Jong 於 2015年06月17日 11:15 寫道:
Hi Scott,

You are right, the KNI will be a good reference for you. It demonstrate how DPDK PMD interface with kernel.
May I know are you planning to build the interface to ethtool? You can try running KNI app.

Regards,
Choi, Sy Jong
Platform Application Engineer

From: "Scott.Jhuang (莊清 翔) : 6309" [mailto:Scott.Jhuang@cas-well.com]
Sent: Wednesday, June 17, 2015 11:12 AM
To: Choi, Sy Jong; dev@dpdk.org<mailto:dev@dpdk.org>
Subject: Re: [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment?

Hi Sy Jong,

But...I am programming a driver now, have any sample driver I can reference?

Choi, Sy Jong 於 2015年06月16日 14:48 寫道:

Hi Scott,



You can review DPDK KNI sample app, there's ethtool support using a vEth device interfacing to DPDK PMD.



Pure DPDK PMD require programming to display the information in ethtool. The interfacing is demonstrate on KNI sample app.



Regards,

Choi, Sy Jong

Platform Application Engineer



-----Original Message-----

From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of "Scott.Jhuang (???) : 6309"

Sent: Monday, June 15, 2015 6:35 PM

To: dev@dpdk.org<mailto:dev@dpdk.org>

Subject: [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment?



Hi,



I want to get etherport's net_device structs and using ethtool_cmd to get some information of etherports.

Are these capabilitys igb_uio driver also provided?



If not, how can I get net_devices and use ethtool_cmd capabilitys?



--



Best Regards,

Scott Jhuang



Software Engineering Dept.

Software Engineer

CASwell

238 新北市樹林區博愛街242號8樓

8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan

Tel:+886-2-7705-8888 # 6309

Fax:+886-2-7731-9988

E-mail:scott.jhuang@cas-well.com<mailto:scott.jhuang@cas-well.com><mailto:scott.jhuang@cas-well.com><mailto:scott.jhuang@cas-well.com>

CASWELL Inc. 瑞祺電通 http://www.cas-well.com





本信件可能包含瑞祺電通機密資訊,非指定之收件者,請勿使用或揭露本信件內容,並請銷毀此信件。 This email may contain confidential information. Please do not use or disclose it in any way and delete it if you are not the intended recipient.

--

Best Regards,

Scott Jhuang



Software Engineering Dept.

Software Engineer

CASwell

238 新北市樹林區博愛街242號8樓

8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan

Tel:+886-2-7705-8888 # 6309

Fax:+886-2-7731-9988

E-mail:scott.jhuang@cas-well.com<mailto:scott.jhuang@cas-well.com>

CASWELL Inc. 瑞祺電通 http://www.cas-well.com
本信件可能包含瑞祺電通機密資訊,非指定之收件者,請勿使用或揭露本信件內容,並請銷毀此信件。 This email may contain confidential information. Please do not use or disclose it in any way and delete it if you are not the intended recipient.

--

Best Regards,

Scott Jhuang



Software Engineering Dept.

Software Engineer

CASwell

238 新北市樹林區博愛街242號8樓

8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan

Tel:+886-2-7705-8888 # 6309

Fax:+886-2-7731-9988

E-mail:scott.jhuang@cas-well.com<mailto:scott.jhuang@cas-well.com>

CASWELL Inc. 瑞祺電通 http://www.cas-well.com
本信件可能包含瑞祺電通機密資訊,非指定之收件者,請勿使用或揭露本信件內容,並請銷毀此信件。 This email may contain confidential information. Please do not use or disclose it in any way and delete it if you are not the intended recipient.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment?
  2015-06-19  2:35         ` Choi, Sy Jong
@ 2015-06-23 13:24           ` Scott.Jhuang (莊清翔) : 6309
  2015-07-01  6:44             ` Scott.Jhuang (莊清翔) : 6309
  0 siblings, 1 reply; 13+ messages in thread
From: "Scott.Jhuang (莊清翔) : 6309" @ 2015-06-23 13:24 UTC (permalink / raw)
  To: Choi, Sy Jong, dev

Dear Sy Jong,

Yes, I have check out DPDK KNI, but I still can't find how to prepare net_device structure...
And I also doesn't find how to get "ethtool_cmd.phy_address"
Could you let me know the path of source code folder

Choi, Sy Jong 於 2015年06月19日 10:35 寫道:
Hi Scott,

DPDK PMD are interfacing using rte_ethdev.c which link to ixgbe_ethdev.c there’s no “net_device” in our code.

But if you search DPDk code based, we have KNI example to teach you how to prepare the net_device structure.
Have you check out our DPDK KNI codes?

Regards,
Choi, Sy Jong
Platform Application Engineer

From: "Scott.Jhuang (莊清 翔) : 6309" [mailto:Scott.Jhuang@cas-well.com]
Sent: Thursday, June 18, 2015 12:25 PM
To: Choi, Sy Jong; dev@dpdk.org<mailto:dev@dpdk.org>
Subject: Re: [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment?

Dear Sy Jong,

I'm planning to program a driver to get all the ethport's net_device structure, because I need some information from these net_device structures.
And I also need to use net_device struct's ethtool_cmd to get some information e.g. ethtool_cmd.phy_address, net_device->ethtool_ops->get_settings.

In fact, I need some information from net_device struct to access and control PHY's link-up/down,
and I reference igb driver to design the link-up/down functions, since in DPDK envirenment doesn't have igb driver,
so In DPDK envirenment, I don't know how to get network deivce's net_device structs and more information which initial by igb driver(because doesn't have igb driver).

Choi, Sy Jong 於 2015年06月17日 11:15 寫道:
Hi Scott,

You are right, the KNI will be a good reference for you. It demonstrate how DPDK PMD interface with kernel.
May I know are you planning to build the interface to ethtool? You can try running KNI app.

Regards,
Choi, Sy Jong
Platform Application Engineer

From: "Scott.Jhuang (莊清 翔) : 6309" [mailto:Scott.Jhuang@cas-well.com]
Sent: Wednesday, June 17, 2015 11:12 AM
To: Choi, Sy Jong; dev@dpdk.org<mailto:dev@dpdk.org>
Subject: Re: [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment?

Hi Sy Jong,

But...I am programming a driver now, have any sample driver I can reference?

Choi, Sy Jong 於 2015年06月16日 14:48 寫道:

Hi Scott,



You can review DPDK KNI sample app, there's ethtool support using a vEth device interfacing to DPDK PMD.



Pure DPDK PMD require programming to display the information in ethtool. The interfacing is demonstrate on KNI sample app.



Regards,

Choi, Sy Jong

Platform Application Engineer



-----Original Message-----

From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of "Scott.Jhuang (???) : 6309"

Sent: Monday, June 15, 2015 6:35 PM

To: dev@dpdk.org<mailto:dev@dpdk.org>

Subject: [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment?



Hi,



I want to get etherport's net_device structs and using ethtool_cmd to get some information of etherports.

Are these capabilitys igb_uio driver also provided?



If not, how can I get net_devices and use ethtool_cmd capabilitys?



--



Best Regards,

Scott Jhuang



Software Engineering Dept.

Software Engineer

CASwell

238 新北市樹林區博愛街242號8樓

8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan

Tel:+886-2-7705-8888 # 6309

Fax:+886-2-7731-9988

E-mail:scott.jhuang@cas-well.com<mailto:scott.jhuang@cas-well.com><mailto:scott.jhuang@cas-well.com><mailto:scott.jhuang@cas-well.com>

CASWELL Inc. 瑞祺電通 http://www.cas-well.com





本信件可能包含瑞祺電通機密資訊,非指定之收件者,請勿使用或揭露本信件內容,並請銷毀此信件。 This email may contain confidential information. Please do not use or disclose it in any way and delete it if you are not the intended recipient.

--

Best Regards,

Scott Jhuang



Software Engineering Dept.

Software Engineer

CASwell

238 新北市樹林區博愛街242號8樓

8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan

Tel:+886-2-7705-8888 # 6309

Fax:+886-2-7731-9988

E-mail:scott.jhuang@cas-well.com<mailto:scott.jhuang@cas-well.com>

CASWELL Inc. 瑞祺電通 http://www.cas-well.com
本信件可能包含瑞祺電通機密資訊,非指定之收件者,請勿使用或揭露本信件內容,並請銷毀此信件。 This email may contain confidential information. Please do not use or disclose it in any way and delete it if you are not the intended recipient.

--

Best Regards,

Scott Jhuang



Software Engineering Dept.

Software Engineer

CASwell

238 新北市樹林區博愛街242號8樓

8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan

Tel:+886-2-7705-8888 # 6309

Fax:+886-2-7731-9988

E-mail:scott.jhuang@cas-well.com<mailto:scott.jhuang@cas-well.com>

CASWELL Inc. 瑞祺電通 http://www.cas-well.com
本信件可能包含瑞祺電通機密資訊,非指定之收件者,請勿使用或揭露本信件內容,並請銷毀此信件。 This email may contain confidential information. Please do not use or disclose it in any way and delete it if you are not the intended recipient.


--

Best Regards,
Scott Jhuang

Software Engineering Dept.
Software Engineer
CASwell
238 新北市樹林區博愛街242號8樓
8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan
Tel:+886-2-7705-8888 # 6309
Fax:+886-2-7731-9988
E-mail:scott.jhuang@cas-well.com<mailto:scott.jhuang@cas-well.com>
CASWELL Inc. 瑞祺電通 http://www.cas-well.com


本信件可能包含瑞祺電通機密資訊,非指定之收件者,請勿使用或揭露本信件內容,並請銷毀此信件。 This email may contain confidential information. Please do not use or disclose it in any way and delete it if you are not the intended recipient.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment?
  2015-06-23 13:24           ` Scott.Jhuang (莊清翔) : 6309
@ 2015-07-01  6:44             ` Scott.Jhuang (莊清翔) : 6309
  2015-07-01  7:55               ` Choi, Sy Jong
  0 siblings, 1 reply; 13+ messages in thread
From: "Scott.Jhuang (莊清翔) : 6309" @ 2015-07-01  6:44 UTC (permalink / raw)
  To: Choi, Sy Jong, dev

Hi Sy Jong,

Have any idea?

"Scott.Jhuang (莊清翔) : 6309" 於 2015年06月23日 21:24 寫道:
Dear Sy Jong,

Yes, I have check out DPDK KNI, but I still can't find how to prepare net_device structure...
And I also doesn't find how to get "ethtool_cmd.phy_address"
Could you let me know the path of source code folder

Choi, Sy Jong 於 2015年06月19日 10:35 寫道:
Hi Scott,

DPDK PMD are interfacing using rte_ethdev.c which link to ixgbe_ethdev.c there’s no “net_device” in our code.

But if you search DPDk code based, we have KNI example to teach you how to prepare the net_device structure.
Have you check out our DPDK KNI codes?

Regards,
Choi, Sy Jong
Platform Application Engineer

From: "Scott.Jhuang (莊 清 翔) : 6309" [mailto:Scott.Jhuang@cas-well.com]
Sent: Thursday, June 18, 2015 12:25 PM
To: Choi, Sy Jong; dev@dpdk.org<mailto:dev@dpdk.org>
Subject: Re: [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment?

Dear Sy Jong,

I'm planning to program a driver to get all the ethport's net_device structure, because I need some information from these net_device structures.
And I also need to use net_device struct's ethtool_cmd to get some information e.g. ethtool_cmd.phy_address, net_device->ethtool_ops->get_settings.

In fact, I need some information from net_device struct to access and control PHY's link-up/down,
and I reference igb driver to design the link-up/down functions, since in DPDK envirenment doesn't have igb driver,
so In DPDK envirenment, I don't know how to get network deivce's net_device structs and more information which initial by igb driver(because doesn't have igb driver).

Choi, Sy Jong 於 2015年06月17日 11:15 寫道:
Hi Scott,

You are right, the KNI will be a good reference for you. It demonstrate how DPDK PMD interface with kernel.
May I know are you planning to build the interface to ethtool? You can try running KNI app.

Regards,
Choi, Sy Jong
Platform Application Engineer

From: "Scott.Jhuang (莊清 翔) : 6309" [mailto:Scott.Jhuang@cas-well.com]
Sent: Wednesday, June 17, 2015 11:12 AM
To: Choi, Sy Jong; dev@dpdk.org<mailto:dev@dpdk.org>
Subject: Re: [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment?

Hi Sy Jong,

But...I am programming a driver now, have any sample driver I can reference?

Choi, Sy Jong 於 2015年06月16日 14:48 寫道:

Hi Scott,



You can review DPDK KNI sample app, there's ethtool support using a vEth device interfacing to DPDK PMD.



Pure DPDK PMD require programming to display the information in ethtool. The interfacing is demonstrate on KNI sample app.



Regards,

Choi, Sy Jong

Platform Application Engineer



-----Original Message-----

From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of "Scott.Jhuang (???) : 6309"

Sent: Monday, June 15, 2015 6:35 PM

To: dev@dpdk.org<mailto:dev@dpdk.org>

Subject: [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment?



Hi,



I want to get etherport's net_device structs and using ethtool_cmd to get some information of etherports.

Are these capabilitys igb_uio driver also provided?



If not, how can I get net_devices and use ethtool_cmd capabilitys?



--



Best Regards,

Scott Jhuang



Software Engineering Dept.

Software Engineer

CASwell

238 新北市樹林區博愛街242號8樓

8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan

Tel:+886-2-7705-8888 # 6309

Fax:+886-2-7731-9988

E-mail:scott.jhuang@cas-well.com<mailto:scott.jhuang@cas-well.com><mailto:scott.jhuang@cas-well.com><mailto:scott.jhuang@cas-well.com>

CASWELL Inc. 瑞祺電通 http://www.cas-well.com





本信件可能包含瑞祺電通機密資訊,非指定之收件者,請勿使用或揭露本信件內容,並請銷毀此信件。 This email may contain confidential information. Please do not use or disclose it in any way and delete it if you are not the intended recipient.

--

Best Regards,

Scott Jhuang



Software Engineering Dept.

Software Engineer

CASwell

238 新北市樹林區博愛街242號8樓

8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan

Tel:+886-2-7705-8888 # 6309

Fax:+886-2-7731-9988

E-mail:scott.jhuang@cas-well.com<mailto:scott.jhuang@cas-well.com>

CASWELL Inc. 瑞祺電通 http://www.cas-well.com
本信件可能包含瑞祺電通機密資訊,非指定之收件者,請勿使用或揭露本信件內容,並請銷毀此信 件。 This email may contain confidential information. Please do not use or disclose it in any way and delete it if you are not the intended recipient.

--

Best Regards,

Scott Jhuang



Software Engineering Dept.

Software Engineer

CASwell

238 新北市樹林區博愛街242號8樓

8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan

Tel:+886-2-7705-8888 # 6309

Fax:+886-2-7731-9988

E-mail:scott.jhuang@cas-well.com<mailto:scott.jhuang@cas-well.com>

CASWELL Inc. 瑞祺電通 http://www.cas-well.com
本信件可能包含瑞祺電通機密資訊,非指定之收件者,請勿使用或揭露本信件內容,並請銷毀此信件。 This email may contain confidential information. Please do not use or disclose it in any way and delete it if you are not the intended recipient.


--

Best Regards,
Scott Jhuang

Software Engineering Dept.
Software Engineer
CASwell
238 新北市樹林區博愛街242號8樓
8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan
Tel:+886-2-7705-8888 # 6309
Fax:+886-2-7731-9988
E-mail:scott.jhuang@cas-well.com<mailto:scott.jhuang@cas-well.com>
CASWELL Inc. 瑞祺電通 http://www.cas-well.com



--

Best Regards,
Scott Jhuang

Software Engineering Dept.
Software Engineer
CASwell
238 新北市樹林區博愛街242號8樓
8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan
Tel:+886-2-7705-8888 # 6309
Fax:+886-2-7731-9988
E-mail:scott.jhuang@cas-well.com<mailto:scott.jhuang@cas-well.com>
CASWELL Inc. 瑞祺電通 http://www.cas-well.com


本信件可能包含瑞祺電通機密資訊,非指定之收件者,請勿使用或揭露本信件內容,並請銷毀此信件。 This email may contain confidential information. Please do not use or disclose it in any way and delete it if you are not the intended recipient.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment?
  2015-07-01  6:44             ` Scott.Jhuang (莊清翔) : 6309
@ 2015-07-01  7:55               ` Choi, Sy Jong
  2015-07-15  9:54                 ` Scott.Jhuang (莊清翔) : 6309
  0 siblings, 1 reply; 13+ messages in thread
From: Choi, Sy Jong @ 2015-07-01  7:55 UTC (permalink / raw)
  To: "Scott.Jhuang (莊清翔) : 6309", dev

Hi Scott,

Please refer to our KNI library at:-
dpdk-1.8.0\lib\librte_eal\linuxapp\kni\ethtool\igb\igb.h

Regards,
Choi, Sy Jong
Platform Application Engineer

From: "Scott.Jhuang (莊清翔) : 6309" [mailto:Scott.Jhuang@cas-well.com]
Sent: Wednesday, July 01, 2015 2:44 PM
To: Choi, Sy Jong; dev@dpdk.org
Subject: Re: [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment?

Hi Sy Jong,

Have any idea?

"Scott.Jhuang (莊清翔) : 6309" 於 2015年06月23日 21:24 寫道:
Dear Sy Jong,

Yes, I have check out DPDK KNI, but I still can't find how to prepare net_device structure...
And I also doesn't find how to get "ethtool_cmd.phy_address"
Could you let me know the path of source code folder

Choi, Sy Jong 於 2015年06月19日 10:35 寫道:
Hi Scott,

DPDK PMD are interfacing using rte_ethdev.c which link to ixgbe_ethdev.c there’s no “net_device” in our code.

But if you search DPDk code based, we have KNI example to teach you how to prepare the net_device structure.
Have you check out our DPDK KNI codes?

Regards,
Choi, Sy Jong
Platform Application Engineer

From: "Scott.Jhuang (莊 清 翔) : 6309" [mailto:Scott.Jhuang@cas-well.com]
Sent: Thursday, June 18, 2015 12:25 PM
To: Choi, Sy Jong; dev@dpdk.org<mailto:dev@dpdk.org>
Subject: Re: [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment?

Dear Sy Jong,

I'm planning to program a driver to get all the ethport's net_device structure, because I need some information from these net_device structures.
And I also need to use net_device struct's ethtool_cmd to get some information e.g. ethtool_cmd.phy_address, net_device->ethtool_ops->get_settings.

In fact, I need some information from net_device struct to access and control PHY's link-up/down,
and I reference igb driver to design the link-up/down functions, since in DPDK envirenment doesn't have igb driver,
so In DPDK envirenment, I don't know how to get network deivce's net_device structs and more information which initial by igb driver(because doesn't have igb driver).

Choi, Sy Jong 於 2015年06月17日 11:15 寫道:
Hi Scott,

You are right, the KNI will be a good reference for you. It demonstrate how DPDK PMD interface with kernel.
May I know are you planning to build the interface to ethtool? You can try running KNI app.

Regards,
Choi, Sy Jong
Platform Application Engineer

From: "Scott.Jhuang (莊清 翔) : 6309" [mailto:Scott.Jhuang@cas-well.com]
Sent: Wednesday, June 17, 2015 11:12 AM
To: Choi, Sy Jong; dev@dpdk.org<mailto:dev@dpdk.org>
Subject: Re: [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment?

Hi Sy Jong,

But...I am programming a driver now, have any sample driver I can reference?

Choi, Sy Jong 於 2015年06月16日 14:48 寫道:

Hi Scott,



You can review DPDK KNI sample app, there's ethtool support using a vEth device interfacing to DPDK PMD.



Pure DPDK PMD require programming to display the information in ethtool. The interfacing is demonstrate on KNI sample app.



Regards,

Choi, Sy Jong

Platform Application Engineer



-----Original Message-----

From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of "Scott.Jhuang (???) : 6309"

Sent: Monday, June 15, 2015 6:35 PM

To: dev@dpdk.org<mailto:dev@dpdk.org>

Subject: [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment?



Hi,



I want to get etherport's net_device structs and using ethtool_cmd to get some information of etherports.

Are these capabilitys igb_uio driver also provided?



If not, how can I get net_devices and use ethtool_cmd capabilitys?



--



Best Regards,

Scott Jhuang



Software Engineering Dept.

Software Engineer

CASwell

238 新北市樹林區博愛街242號8樓

8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan

Tel:+886-2-7705-8888 # 6309

Fax:+886-2-7731-9988

E-mail:scott.jhuang@cas-well.com<mailto:scott.jhuang@cas-well.com><mailto:scott.jhuang@cas-well.com><mailto:scott.jhuang@cas-well.com>

CASWELL Inc. 瑞祺電通 http://www.cas-well.com





本信件可能包含瑞祺電通機密資訊,非指定之收件者,請勿使用或揭露本信件內容,並請銷毀此信件。 This email may contain confidential information. Please do not use or disclose it in any way and delete it if you are not the intended recipient.

--

Best Regards,

Scott Jhuang



Software Engineering Dept.

Software Engineer

CASwell

238 新北市樹林區博愛街242號8樓

8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan

Tel:+886-2-7705-8888 # 6309

Fax:+886-2-7731-9988

E-mail:scott.jhuang@cas-well.com<mailto:scott.jhuang@cas-well.com>

CASWELL Inc. 瑞祺電通 http://www.cas-well.com
本信件可能包含瑞祺電通機密資訊,非指定之收件者,請勿使用或揭露本信件內容,並請銷毀此信 件。 This email may contain confidential information. Please do not use or disclose it in any way and delete it if you are not the intended recipient.

--

Best Regards,

Scott Jhuang



Software Engineering Dept.

Software Engineer

CASwell

238 新北市樹林區博愛街242號8樓

8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan

Tel:+886-2-7705-8888 # 6309

Fax:+886-2-7731-9988

E-mail:scott.jhuang@cas-well.com<mailto:scott.jhuang@cas-well.com>

CASWELL Inc. 瑞祺電通 http://www.cas-well.com
本信件可能包含瑞祺電通機密資訊,非指定之收件者,請勿使用或揭露本信件內容,並請銷毀此信件。 This email may contain confidential information. Please do not use or disclose it in any way and delete it if you are not the intended recipient.

--

Best Regards,

Scott Jhuang



Software Engineering Dept.

Software Engineer

CASwell

238 新北市樹林區博愛街242號8樓

8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan

Tel:+886-2-7705-8888 # 6309

Fax:+886-2-7731-9988

E-mail:scott.jhuang@cas-well.com<mailto:scott.jhuang@cas-well.com>

CASWELL Inc. 瑞祺電通 http://www.cas-well.com

--

Best Regards,

Scott Jhuang



Software Engineering Dept.

Software Engineer

CASwell

238 新北市樹林區博愛街242號8樓

8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan

Tel:+886-2-7705-8888 # 6309

Fax:+886-2-7731-9988

E-mail:scott.jhuang@cas-well.com<mailto:scott.jhuang@cas-well.com>

CASWELL Inc. 瑞祺電通 http://www.cas-well.com
本信件可能包含瑞祺電通機密資訊,非指定之收件者,請勿使用或揭露本信件內容,並請銷毀此信件。 This email may contain confidential information. Please do not use or disclose it in any way and delete it if you are not the intended recipient.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment?
  2015-07-01  7:55               ` Choi, Sy Jong
@ 2015-07-15  9:54                 ` Scott.Jhuang (莊清翔) : 6309
  2015-07-15 10:01                   ` Choi, Sy Jong
  0 siblings, 1 reply; 13+ messages in thread
From: "Scott.Jhuang (莊清翔) : 6309" @ 2015-07-15  9:54 UTC (permalink / raw)
  To: Choi, Sy Jong, dev,
	"Sandy.Liu (劉軒軒) : 6817",
	"Alan Yu (俞亦偉) : 6632"

Hi Sy Jong,

If I load "rte_kni.ko" driver, the net_device structs will be initialled by KNI, right?
If yes, how can I handle these net_device structs in other driver,
because I using "for_each_netdev()" kernel API can't find the net_device structs which KNI initialled.
Or these structs have not been exported to kernel?

Choi, Sy Jong 於 2015年07月01日 15:55 寫道:
Hi Scott,

Please refer to our KNI library at:-
dpdk-1.8.0\lib\librte_eal\linuxapp\kni\ethtool\igb\igb.h

Regards,
Choi, Sy Jong
Platform Application Engineer

From: "Scott.Jhuang (莊清 翔) : 6309" [mailto:Scott.Jhuang@cas-well.com]
Sent: Wednesday, July 01, 2015 2:44 PM
To: Choi, Sy Jong; dev@dpdk.org<mailto:dev@dpdk.org>
Subject: Re: [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment?

Hi Sy Jong,

Have any idea?

"Scott.Jhuang (莊 清翔) : 6309" 於 2015年06月23日 21:24 寫道:
Dear Sy Jong,

Yes, I have check out DPDK KNI, but I still can't find how to prepare net_device structure...
And I also doesn't find how to get "ethtool_cmd.phy_address"
Could you let me know the path of source code folder

Choi, Sy Jong 於 2015年06月19日 10:35 寫道:
Hi Scott,

DPDK PMD are interfacing using rte_ethdev.c which link to ixgbe_ethdev.c there’s no “net_device” in our code.

But if you search DPDk code based, we have KNI example to teach you how to prepare the net_device structure.
Have you check out our DPDK KNI codes?

Regards,
Choi, Sy Jong
Platform Application Engineer

From: "Scott.Jhuang (莊 清 翔) : 6309" [mailto:Scott.Jhuang@cas-well.com]
Sent: Thursday, June 18, 2015 12:25 PM
To: Choi, Sy Jong; dev@dpdk.org<mailto:dev@dpdk.org>
Subject: Re: [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment?

Dear Sy Jong,

I'm planning to program a driver to get all the ethport's net_device structure, because I need some information from these net_device structures.
And I also need to use net_device struct's ethtool_cmd to get some information e.g. ethtool_cmd.phy_address, net_device->ethtool_ops->get_settings.

In fact, I need some information from net_device struct to access and control PHY's link-up/down,
and I reference igb driver to design the link-up/down functions, since in DPDK envirenment doesn't have igb driver,
so In DPDK envirenment, I don't know how to get network deivce's net_device structs and more information which initial by igb driver(because doesn't have igb driver).

Choi, Sy Jong 於 2015年06月17日 11:15 寫道:
Hi Scott,

You are right, the KNI will be a good reference for you. It demonstrate how DPDK PMD interface with kernel.
May I know are you planning to build the interface to ethtool? You can try running KNI app.

Regards,
Choi, Sy Jong
Platform Application Engineer

From: "Scott.Jhuang (莊清 翔) : 6309" [mailto:Scott.Jhuang@cas-well.com]
Sent: Wednesday, June 17, 2015 11:12 AM
To: Choi, Sy Jong; dev@dpdk.org<mailto:dev@dpdk.org>
Subject: Re: [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment?

Hi Sy Jong,

But...I am programming a driver now, have any sample driver I can reference?

Choi, Sy Jong 於 2015年06月16日 14:48 寫道:

Hi Scott,



You can review DPDK KNI sample app, there's ethtool support using a vEth device interfacing to DPDK PMD.



Pure DPDK PMD require programming to display the information in ethtool. The interfacing is demonstrate on KNI sample app.



Regards,

Choi, Sy Jong

Platform Application Engineer



-----Original Message-----

From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of "Scott.Jhuang (???) : 6309"

Sent: Monday, June 15, 2015 6:35 PM

To: dev@dpdk.org<mailto:dev@dpdk.org>

Subject: [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment?



Hi,



I want to get etherport's net_device structs and using ethtool_cmd to get some information of etherports.

Are these capabilitys igb_uio driver also provided?



If not, how can I get net_devices and use ethtool_cmd capabilitys?



--



Best Regards,

Scott Jhuang



Software Engineering Dept.

Software Engineer

CASwell

238 新北市樹林區博愛街242號8樓

8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan

Tel:+886-2-7705-8888 # 6309

Fax:+886-2-7731-9988

E-mail:scott.jhuang@cas-well.com<mailto:scott.jhuang@cas-well.com><mailto:scott.jhuang@cas-well.com><mailto:scott.jhuang@cas-well.com>

CASWELL Inc. 瑞祺電通 http://www.cas-well.com





本信件可能包含瑞祺電通機密資訊,非指定之收件者,請勿使用或揭露本信件內容,並請銷毀此信件。 This email may contain confidential information. Please do not use or disclose it in any way and delete it if you are not the intended recipient.

--

Best Regards,

Scott Jhuang



Software Engineering Dept.

Software Engineer

CASwell

238 新北市樹林區博愛街242號8樓

8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan

Tel:+886-2-7705-8888 # 6309

Fax:+886-2-7731-9988

E-mail:scott.jhuang@cas-well.com<mailto:scott.jhuang@cas-well.com>

CASWELL Inc. 瑞祺電通 http://www.cas-well.com
本信件可能包含瑞祺電通機密資訊,非指定之收件者,請勿使用或揭露本信件內容,並請銷毀 此信 件。 This email may contain confidential information. Please do not use or disclose it in any way and delete it if you are not the intended recipient.

--

Best Regards,

Scott Jhuang



Software Engineering Dept.

Software Engineer

CASwell

238 新北市樹林區博愛街242號8樓

8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan

Tel:+886-2-7705-8888 # 6309

Fax:+886-2-7731-9988

E-mail:scott.jhuang@cas-well.com<mailto:scott.jhuang@cas-well.com>

CASWELL Inc. 瑞祺電通 http://www.cas-well.com
本信件可能包含瑞祺電通機密資訊,非指定之收件者,請勿使用或揭露本信件內容,並請銷毀此信 件。 This email may contain confidential information. Please do not use or disclose it in any way and delete it if you are not the intended recipient.

--

Best Regards,

Scott Jhuang



Software Engineering Dept.

Software Engineer

CASwell

238 新北市樹林區博愛街242號8樓

8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan

Tel:+886-2-7705-8888 # 6309

Fax:+886-2-7731-9988

E-mail:scott.jhuang@cas-well.com<mailto:scott.jhuang@cas-well.com>

CASWELL Inc. 瑞祺電通 http://www.cas-well.com

--

Best Regards,

Scott Jhuang



Software Engineering Dept.

Software Engineer

CASwell

238 新北市樹林區博愛街242號8樓

8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan

Tel:+886-2-7705-8888 # 6309

Fax:+886-2-7731-9988

E-mail:scott.jhuang@cas-well.com<mailto:scott.jhuang@cas-well.com>

CASWELL Inc. 瑞祺電通 http://www.cas-well.com
本信件可能包含瑞祺電通機密資訊,非指定之收件者,請勿使用或揭露本信件內容,並請銷毀此信件。 This email may contain confidential information. Please do not use or disclose it in any way and delete it if you are not the intended recipient.


--

Best Regards,
Scott Jhuang

Software Engineering Dept.
Software Engineer
CASwell
238 新北市樹林區博愛街242號8樓
8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan
Tel:+886-2-7705-8888 # 6309
Fax:+886-2-7731-9988
E-mail:scott.jhuang@cas-well.com<mailto:scott.jhuang@cas-well.com>
CASWELL Inc. 瑞祺電通 http://www.cas-well.com


本信件可能包含瑞祺電通機密資訊,非指定之收件者,請勿使用或揭露本信件內容,並請銷毀此信件。 This email may contain confidential information. Please do not use or disclose it in any way and delete it if you are not the intended recipient.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment?
  2015-07-15  9:54                 ` Scott.Jhuang (莊清翔) : 6309
@ 2015-07-15 10:01                   ` Choi, Sy Jong
  2015-07-17  7:53                     ` Scott.Jhuang (莊清翔) : 6309
  0 siblings, 1 reply; 13+ messages in thread
From: Choi, Sy Jong @ 2015-07-15 10:01 UTC (permalink / raw)
  To: "Scott.Jhuang (莊清翔) : 6309",
	dev, "Sandy.Liu (劉軒軒) : 6817",
	"Alan Yu (俞亦偉) : 6632"

Hi Scott,

You will need to start KNI sample app, it will create the vEth interface. After kni app, it will be there, kni app is the datapath, it get the packet into the kernel.

http://dpdk.org/doc/guides/prog_guide/kernel_nic_interface.html


  1.  Insert the KNI kernel module:
2.  insmod ./rte_kni.ko
If using KNI in multi-thread mode, use the following command line:
insmod ./rte_kni.ko kthread_mode=multiple

  1.  Running the KNI sample application:
4.  ./kni -c -0xf0 -n 4 -- -p 0x3 -P -config="(0,4,6),(1,5,7)"
This command runs the kni sample application with two physical ports. Each port pins two forwarding cores (ingress/egress) in user space.


Regards,
Choi, Sy Jong
Platform Application Engineer

From: "Scott.Jhuang (莊清翔) : 6309" [mailto:Scott.Jhuang@cas-well.com]
Sent: Wednesday, July 15, 2015 5:54 PM
To: Choi, Sy Jong; dev@dpdk.org; "Sandy.Liu (劉軒軒) : 6817"; "Alan Yu (俞亦偉) : 6632"
Subject: Re: [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment?

Hi Sy Jong,

If I load "rte_kni.ko" driver, the net_device structs will be initialled by KNI, right?
If yes, how can I handle these net_device structs in other driver,
because I using "for_each_netdev()" kernel API can't find the net_device structs which KNI initialled.
Or these structs have not been exported to kernel?

Choi, Sy Jong 於 2015年07月01日 15:55 寫道:
Hi Scott,

Please refer to our KNI library at:-
dpdk-1.8.0\lib\librte_eal\linuxapp\kni\ethtool\igb\igb.h

Regards,
Choi, Sy Jong
Platform Application Engineer

From: "Scott.Jhuang (莊清 翔) : 6309" [mailto:Scott.Jhuang@cas-well.com]
Sent: Wednesday, July 01, 2015 2:44 PM
To: Choi, Sy Jong; dev@dpdk.org<mailto:dev@dpdk.org>
Subject: Re: [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment?

Hi Sy Jong,

Have any idea?

"Scott.Jhuang (莊 清翔) : 6309" 於 2015年06月23日 21:24 寫道:
Dear Sy Jong,

Yes, I have check out DPDK KNI, but I still can't find how to prepare net_device structure...
And I also doesn't find how to get "ethtool_cmd.phy_address"
Could you let me know the path of source code folder

Choi, Sy Jong 於 2015年06月19日 10:35 寫道:
Hi Scott,

DPDK PMD are interfacing using rte_ethdev.c which link to ixgbe_ethdev.c there’s no “net_device” in our code.

But if you search DPDk code based, we have KNI example to teach you how to prepare the net_device structure.
Have you check out our DPDK KNI codes?

Regards,
Choi, Sy Jong
Platform Application Engineer

From: "Scott.Jhuang (莊 清 翔) : 6309" [mailto:Scott.Jhuang@cas-well.com]
Sent: Thursday, June 18, 2015 12:25 PM
To: Choi, Sy Jong; dev@dpdk.org<mailto:dev@dpdk.org>
Subject: Re: [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment?

Dear Sy Jong,

I'm planning to program a driver to get all the ethport's net_device structure, because I need some information from these net_device structures.
And I also need to use net_device struct's ethtool_cmd to get some information e.g. ethtool_cmd.phy_address, net_device->ethtool_ops->get_settings.

In fact, I need some information from net_device struct to access and control PHY's link-up/down,
and I reference igb driver to design the link-up/down functions, since in DPDK envirenment doesn't have igb driver,
so In DPDK envirenment, I don't know how to get network deivce's net_device structs and more information which initial by igb driver(because doesn't have igb driver).

Choi, Sy Jong 於 2015年06月17日 11:15 寫道:
Hi Scott,

You are right, the KNI will be a good reference for you. It demonstrate how DPDK PMD interface with kernel.
May I know are you planning to build the interface to ethtool? You can try running KNI app.

Regards,
Choi, Sy Jong
Platform Application Engineer

From: "Scott.Jhuang (莊清 翔) : 6309" [mailto:Scott.Jhuang@cas-well.com]
Sent: Wednesday, June 17, 2015 11:12 AM
To: Choi, Sy Jong; dev@dpdk.org<mailto:dev@dpdk.org>
Subject: Re: [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment?

Hi Sy Jong,

But...I am programming a driver now, have any sample driver I can reference?

Choi, Sy Jong 於 2015年06月16日 14:48 寫道:

Hi Scott,



You can review DPDK KNI sample app, there's ethtool support using a vEth device interfacing to DPDK PMD.



Pure DPDK PMD require programming to display the information in ethtool. The interfacing is demonstrate on KNI sample app.



Regards,

Choi, Sy Jong

Platform Application Engineer



-----Original Message-----

From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of "Scott.Jhuang (???) : 6309"

Sent: Monday, June 15, 2015 6:35 PM

To: dev@dpdk.org<mailto:dev@dpdk.org>

Subject: [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment?



Hi,



I want to get etherport's net_device structs and using ethtool_cmd to get some information of etherports.

Are these capabilitys igb_uio driver also provided?



If not, how can I get net_devices and use ethtool_cmd capabilitys?



--



Best Regards,

Scott Jhuang



Software Engineering Dept.

Software Engineer

CASwell

238 新北市樹林區博愛街242號8樓

8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan

Tel:+886-2-7705-8888 # 6309

Fax:+886-2-7731-9988

E-mail:scott.jhuang@cas-well.com<mailto:scott.jhuang@cas-well.com><mailto:scott.jhuang@cas-well.com><mailto:scott.jhuang@cas-well.com>

CASWELL Inc. 瑞祺電通 http://www.cas-well.com





本信件可能包含瑞祺電通機密資訊,非指定之收件者,請勿使用或揭露本信件內容,並請銷毀此信件。 This email may contain confidential information. Please do not use or disclose it in any way and delete it if you are not the intended recipient.

--

Best Regards,

Scott Jhuang



Software Engineering Dept.

Software Engineer

CASwell

238 新北市樹林區博愛街242號8樓

8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan

Tel:+886-2-7705-8888 # 6309

Fax:+886-2-7731-9988

E-mail:scott.jhuang@cas-well.com<mailto:scott.jhuang@cas-well.com>

CASWELL Inc. 瑞祺電通 http://www.cas-well.com
本信件可能包含瑞祺電通機密資訊,非指定之收件者,請勿使用或揭露本信件內容,並請銷毀 此信 件。 This email may contain confidential information. Please do not use or disclose it in any way and delete it if you are not the intended recipient.

--

Best Regards,

Scott Jhuang



Software Engineering Dept.

Software Engineer

CASwell

238 新北市樹林區博愛街242號8樓

8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan

Tel:+886-2-7705-8888 # 6309

Fax:+886-2-7731-9988

E-mail:scott.jhuang@cas-well.com<mailto:scott.jhuang@cas-well.com>

CASWELL Inc. 瑞祺電通 http://www.cas-well.com
本信件可能包含瑞祺電通機密資訊,非指定之收件者,請勿使用或揭露本信件內容,並請銷毀此信 件。 This email may contain confidential information. Please do not use or disclose it in any way and delete it if you are not the intended recipient.

--

Best Regards,

Scott Jhuang



Software Engineering Dept.

Software Engineer

CASwell

238 新北市樹林區博愛街242號8樓

8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan

Tel:+886-2-7705-8888 # 6309

Fax:+886-2-7731-9988

E-mail:scott.jhuang@cas-well.com<mailto:scott.jhuang@cas-well.com>

CASWELL Inc. 瑞祺電通 http://www.cas-well.com

--

Best Regards,

Scott Jhuang



Software Engineering Dept.

Software Engineer

CASwell

238 新北市樹林區博愛街242號8樓

8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan

Tel:+886-2-7705-8888 # 6309

Fax:+886-2-7731-9988

E-mail:scott.jhuang@cas-well.com<mailto:scott.jhuang@cas-well.com>

CASWELL Inc. 瑞祺電通 http://www.cas-well.com
本信件可能包含瑞祺電通機密資訊,非指定之收件者,請勿使用或揭露本信件內容,並請銷毀此信件。 This email may contain confidential information. Please do not use or disclose it in any way and delete it if you are not the intended recipient.

--

Best Regards,

Scott Jhuang



Software Engineering Dept.

Software Engineer

CASwell

238 新北市樹林區博愛街242號8樓

8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan

Tel:+886-2-7705-8888 # 6309

Fax:+886-2-7731-9988

E-mail:scott.jhuang@cas-well.com<mailto:scott.jhuang@cas-well.com>

CASWELL Inc. 瑞祺電通 http://www.cas-well.com
本信件可能包含瑞祺電通機密資訊,非指定之收件者,請勿使用或揭露本信件內容,並請銷毀此信件。 This email may contain confidential information. Please do not use or disclose it in any way and delete it if you are not the intended recipient.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment?
  2015-07-15 10:01                   ` Choi, Sy Jong
@ 2015-07-17  7:53                     ` Scott.Jhuang (莊清翔) : 6309
  2015-07-17  8:16                       ` Choi, Sy Jong
  0 siblings, 1 reply; 13+ messages in thread
From: "Scott.Jhuang (莊清翔) : 6309" @ 2015-07-17  7:53 UTC (permalink / raw)
  To: Choi, Sy Jong, dev,
	"Sandy.Liu (劉軒軒) : 6817",
	"Alan Yu (俞亦偉) : 6632"

Hi Sy Jong,

If I using KNI in DPDK, can I use another applications at the same time? (e.g. L2 forward, L3 forward)

Choi, Sy Jong 於 2015年07月15日 18:01 寫道:
Hi Scott,

You will need to start KNI sample app, it will create the vEth interface. After kni app, it will be there, kni app is the datapath, it get the packet into the kernel.

http://dpdk.org/doc/guides/prog_guide/kernel_nic_interface.html


  1.  Insert the KNI kernel module:
2.  insmod ./rte_kni.ko
If using KNI in multi-thread mode, use the following command line:
insmod ./rte_kni.ko kthread_mode=multiple

  1.  Running the KNI sample application:
4.  ./kni -c -0xf0 -n 4 -- -p 0x3 -P -config="(0,4,6),(1,5,7)"
This command runs the kni sample application with two physical ports. Each port pins two forwarding cores (ingress/egress) in user space.


Regards,
Choi, Sy Jong
Platform Application Engineer

From: "Scott.Jhuang (莊清 翔) : 6309" [mailto:Scott.Jhuang@cas-well.com]
Sent: Wednesday, July 15, 2015 5:54 PM
To: Choi, Sy Jong; dev@dpdk.org<mailto:dev@dpdk.org>; "Sandy.Liu (劉軒 軒) : 6817"; "Alan Yu (俞亦 偉) : 6632"
Subject: Re: [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment?

Hi Sy Jong,

If I load "rte_kni.ko" driver, the net_device structs will be initialled by KNI, right?
If yes, how can I handle these net_device structs in other driver,
because I using "for_each_netdev()" kernel API can't find the net_device structs which KNI initialled.
Or these structs have not been exported to kernel?

Choi, Sy Jong 於 2015年07月01日 15:55 寫道:
Hi Scott,

Please refer to our KNI library at:-
dpdk-1.8.0\lib\librte_eal\linuxapp\kni\ethtool\igb\igb.h

Regards,
Choi, Sy Jong
Platform Application Engineer

From: "Scott.Jhuang (莊清 翔) : 6309" [mailto:Scott.Jhuang@cas-well.com]
Sent: Wednesday, July 01, 2015 2:44 PM
To: Choi, Sy Jong; dev@dpdk.org<mailto:dev@dpdk.org>
Subject: Re: [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment?

Hi Sy Jong,

Have any idea?

"Scott.Jhuang (莊 清翔) : 6309" 於 2015年06月23日 21:24 寫道:
Dear Sy Jong,

Yes, I have check out DPDK KNI, but I still can't find how to prepare net_device structure...
And I also doesn't find how to get "ethtool_cmd.phy_address"
Could you let me know the path of source code folder

Choi, Sy Jong 於 2015年06月19日 10:35 寫道:
Hi Scott,

DPDK PMD are interfacing using rte_ethdev.c which link to ixgbe_ethdev.c there’s no “net_device” in our code.

But if you search DPDk code based, we have KNI example to teach you how to prepare the net_device structure.
Have you check out our DPDK KNI codes?

Regards,
Choi, Sy Jong
Platform Application Engineer

From: "Scott.Jhuang (莊 清 翔) : 6309" [mailto:Scott.Jhuang@cas-well.com]
Sent: Thursday, June 18, 2015 12:25 PM
To: Choi, Sy Jong; dev@dpdk.org<mailto:dev@dpdk.org>
Subject: Re: [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment?

Dear Sy Jong,

I'm planning to program a driver to get all the ethport's net_device structure, because I need some information from these net_device structures.
And I also need to use net_device struct's ethtool_cmd to get some information e.g. ethtool_cmd.phy_address, net_device->ethtool_ops->get_settings.

In fact, I need some information from net_device struct to access and control PHY's link-up/down,
and I reference igb driver to design the link-up/down functions, since in DPDK envirenment doesn't have igb driver,
so In DPDK envirenment, I don't know how to get network deivce's net_device structs and more information which initial by igb driver(because doesn't have igb driver).

Choi, Sy Jong 於 2015年06月17日 11:15 寫道:
Hi Scott,

You are right, the KNI will be a good reference for you. It demonstrate how DPDK PMD interface with kernel.
May I know are you planning to build the interface to ethtool? You can try running KNI app.

Regards,
Choi, Sy Jong
Platform Application Engineer

From: "Scott.Jhuang (莊清 翔) : 6309" [mailto:Scott.Jhuang@cas-well.com]
Sent: Wednesday, June 17, 2015 11:12 AM
To: Choi, Sy Jong; dev@dpdk.org<mailto:dev@dpdk.org>
Subject: Re: [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment?

Hi Sy Jong,

But...I am programming a driver now, have any sample driver I can reference?

Choi, Sy Jong 於 2015年06月16日 14:48 寫道:

Hi Scott,



You can review DPDK KNI sample app, there's ethtool support using a vEth device interfacing to DPDK PMD.



Pure DPDK PMD require programming to display the information in ethtool. The interfacing is demonstrate on KNI sample app.



Regards,

Choi, Sy Jong

Platform Application Engineer



-----Original Message-----

From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of "Scott.Jhuang (???) : 6309"

Sent: Monday, June 15, 2015 6:35 PM

To: dev@dpdk.org<mailto:dev@dpdk.org>

Subject: [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment?



Hi,



I want to get etherport's net_device structs and using ethtool_cmd to get some information of etherports.

Are these capabilitys igb_uio driver also provided?



If not, how can I get net_devices and use ethtool_cmd capabilitys?



--



Best Regards,

Scott Jhuang



Software Engineering Dept.

Software Engineer

CASwell

238 新北市樹林區博愛街242號8樓

8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan

Tel:+886-2-7705-8888 # 6309

Fax:+886-2-7731-9988

E-mail:scott.jhuang@cas-well.com<mailto:scott.jhuang@cas-well.com><mailto:scott.jhuang@cas-well.com><mailto:scott.jhuang@cas-well.com>

CASWELL Inc. 瑞祺電通 http://www.cas-well.com





本信件可能包含瑞祺電通機密資訊,非指定之收件者,請勿使用或揭露本信件內容,並請銷毀此信件。 This email may contain confidential information. Please do not use or disclose it in any way and delete it if you are not the intended recipient.

--

Best Regards,

Scott Jhuang



Software Engineering Dept.

Software Engineer

CASwell

238 新北市樹林區博愛街242號8樓

8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan

Tel:+886-2-7705-8888 # 6309

Fax:+886-2-7731-9988

E-mail:scott.jhuang@cas-well.com<mailto:scott.jhuang@cas-well.com>

CASWELL Inc. 瑞祺電通 http://www.cas-well.com
本信件可能包含瑞祺電通機密資訊,非指定之收件者,請勿使用或揭露本信件內容,並請 銷毀 此信 件。 This email may contain confidential information. Please do not use or disclose it in any way and delete it if you are not the intended recipient.

--

Best Regards,

Scott Jhuang



Software Engineering Dept.

Software Engineer

CASwell

238 新北市樹林區博愛街242號8樓

8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan

Tel:+886-2-7705-8888 # 6309

Fax:+886-2-7731-9988

E-mail:scott.jhuang@cas-well.com<mailto:scott.jhuang@cas-well.com>

CASWELL Inc. 瑞祺電通 http://www.cas-well.com
本信件可能包含瑞祺電通機密資訊,非指定之收件者,請勿使用或揭露本信件內容,並請銷毀 此信 件。 This email may contain confidential information. Please do not use or disclose it in any way and delete it if you are not the intended recipient.

--

Best Regards,

Scott Jhuang



Software Engineering Dept.

Software Engineer

CASwell

238 新北市樹林區博愛街242號8樓

8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan

Tel:+886-2-7705-8888 # 6309

Fax:+886-2-7731-9988

E-mail:scott.jhuang@cas-well.com<mailto:scott.jhuang@cas-well.com>

CASWELL Inc. 瑞祺電通 http://www.cas-well.com

--

Best Regards,

Scott Jhuang



Software Engineering Dept.

Software Engineer

CASwell

238 新北市樹林區博愛街242號8樓

8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan

Tel:+886-2-7705-8888 # 6309

Fax:+886-2-7731-9988

E-mail:scott.jhuang@cas-well.com<mailto:scott.jhuang@cas-well.com>

CASWELL Inc. 瑞祺電通 http://www.cas-well.com
本信件可能包含瑞祺電通機密資訊,非指定之收件者,請勿使用或揭露本信件內容,並請銷毀此信件。 This email may contain confidential information. Please do not use or disclose it in any way and delete it if you are not the intended recipient.

--

Best Regards,

Scott Jhuang



Software Engineering Dept.

Software Engineer

CASwell

238 新北市樹林區博愛街242號8樓

8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan

Tel:+886-2-7705-8888 # 6309

Fax:+886-2-7731-9988

E-mail:scott.jhuang@cas-well.com<mailto:scott.jhuang@cas-well.com>

CASWELL Inc. 瑞祺電通 http://www.cas-well.com
本信件可能包含瑞祺電通機密資訊,非指定之收件者,請勿使用或揭露本信件內容,並請銷毀此信件。 This email may contain confidential information. Please do not use or disclose it in any way and delete it if you are not the intended recipient.


--

Best Regards,
Scott Jhuang

Software Engineering Dept.
Software Engineer
CASwell
238 新北市樹林區博愛街242號8樓
8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan
Tel:+886-2-7705-8888 # 6309
Fax:+886-2-7731-9988
E-mail:scott.jhuang@cas-well.com<mailto:scott.jhuang@cas-well.com>
CASWELL Inc. 瑞祺電通 http://www.cas-well.com


本信件可能包含瑞祺電通機密資訊,非指定之收件者,請勿使用或揭露本信件內容,並請銷毀此信件。 This email may contain confidential information. Please do not use or disclose it in any way and delete it if you are not the intended recipient.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment?
  2015-07-17  7:53                     ` Scott.Jhuang (莊清翔) : 6309
@ 2015-07-17  8:16                       ` Choi, Sy Jong
  0 siblings, 0 replies; 13+ messages in thread
From: Choi, Sy Jong @ 2015-07-17  8:16 UTC (permalink / raw)
  To: "Scott.Jhuang (莊清翔) : 6309",
	dev, "Sandy.Liu (劉軒軒) : 6817",
	"Alan Yu (俞亦偉) : 6632"

HI Scott,

KNI app effectively will become your datapath, it is a sample app, you can modify it.
It receive packets from PMD and pass all packets to the kernel path from userspace.

You can run l2fwd, or other app, you will need to run it on other PMD ports. Not on the same ports on KNI.
Or you will need to modify KNI app, to distribute packets to kernel path or your new datapath. Basically it will be like coding  to combine kni app and l2fwd app.

Regards,
Choi, Sy Jong
Platform Application Engineer

From: "Scott.Jhuang (莊清翔) : 6309" [mailto:Scott.Jhuang@cas-well.com]
Sent: Friday, July 17, 2015 3:53 PM
To: Choi, Sy Jong; dev@dpdk.org; "Sandy.Liu (劉軒軒) : 6817"; "Alan Yu (俞亦偉) : 6632"
Subject: Re: [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment?

Hi Sy Jong,

If I using KNI in DPDK, can I use another applications at the same time? (e.g. L2 forward, L3 forward)

Choi, Sy Jong 於 2015年07月15日 18:01 寫道:
Hi Scott,

You will need to start KNI sample app, it will create the vEth interface. After kni app, it will be there, kni app is the datapath, it get the packet into the kernel.

http://dpdk.org/doc/guides/prog_guide/kernel_nic_interface.html


  1.  Insert the KNI kernel module:

  1.  insmod ./rte_kni.ko
If using KNI in multi-thread mode, use the following command line:
insmod ./rte_kni.ko kthread_mode=multiple

  1.  Running the KNI sample application:

  1.  ./kni -c -0xf0 -n 4 -- -p 0x3 -P -config="(0,4,6),(1,5,7)"
This command runs the kni sample application with two physical ports. Each port pins two forwarding cores (ingress/egress) in user space.


Regards,
Choi, Sy Jong
Platform Application Engineer

From: "Scott.Jhuang (莊清 翔) : 6309" [mailto:Scott.Jhuang@cas-well.com]
Sent: Wednesday, July 15, 2015 5:54 PM
To: Choi, Sy Jong; dev@dpdk.org<mailto:dev@dpdk.org>; "Sandy.Liu (劉軒 軒) : 6817"; "Alan Yu (俞亦 偉) : 6632"
Subject: Re: [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment?

Hi Sy Jong,

If I load "rte_kni.ko" driver, the net_device structs will be initialled by KNI, right?
If yes, how can I handle these net_device structs in other driver,
because I using "for_each_netdev()" kernel API can't find the net_device structs which KNI initialled.
Or these structs have not been exported to kernel?

Choi, Sy Jong 於 2015年07月01日 15:55 寫道:
Hi Scott,

Please refer to our KNI library at:-
dpdk-1.8.0\lib\librte_eal\linuxapp\kni\ethtool\igb\igb.h

Regards,
Choi, Sy Jong
Platform Application Engineer

From: "Scott.Jhuang (莊清 翔) : 6309" [mailto:Scott.Jhuang@cas-well.com]
Sent: Wednesday, July 01, 2015 2:44 PM
To: Choi, Sy Jong; dev@dpdk.org<mailto:dev@dpdk.org>
Subject: Re: [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment?

Hi Sy Jong,

Have any idea?

"Scott.Jhuang (莊 清翔) : 6309" 於 2015年06月23日 21:24 寫道:
Dear Sy Jong,

Yes, I have check out DPDK KNI, but I still can't find how to prepare net_device structure...
And I also doesn't find how to get "ethtool_cmd.phy_address"
Could you let me know the path of source code folder

Choi, Sy Jong 於 2015年06月19日 10:35 寫道:
Hi Scott,

DPDK PMD are interfacing using rte_ethdev.c which link to ixgbe_ethdev.c there’s no “net_device” in our code.

But if you search DPDk code based, we have KNI example to teach you how to prepare the net_device structure.
Have you check out our DPDK KNI codes?

Regards,
Choi, Sy Jong
Platform Application Engineer

From: "Scott.Jhuang (莊 清 翔) : 6309" [mailto:Scott.Jhuang@cas-well.com]
Sent: Thursday, June 18, 2015 12:25 PM
To: Choi, Sy Jong; dev@dpdk.org<mailto:dev@dpdk.org>
Subject: Re: [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment?

Dear Sy Jong,

I'm planning to program a driver to get all the ethport's net_device structure, because I need some information from these net_device structures.
And I also need to use net_device struct's ethtool_cmd to get some information e.g. ethtool_cmd.phy_address, net_device->ethtool_ops->get_settings.

In fact, I need some information from net_device struct to access and control PHY's link-up/down,
and I reference igb driver to design the link-up/down functions, since in DPDK envirenment doesn't have igb driver,
so In DPDK envirenment, I don't know how to get network deivce's net_device structs and more information which initial by igb driver(because doesn't have igb driver).

Choi, Sy Jong 於 2015年06月17日 11:15 寫道:
Hi Scott,

You are right, the KNI will be a good reference for you. It demonstrate how DPDK PMD interface with kernel.
May I know are you planning to build the interface to ethtool? You can try running KNI app.

Regards,
Choi, Sy Jong
Platform Application Engineer

From: "Scott.Jhuang (莊清 翔) : 6309" [mailto:Scott.Jhuang@cas-well.com]
Sent: Wednesday, June 17, 2015 11:12 AM
To: Choi, Sy Jong; dev@dpdk.org<mailto:dev@dpdk.org>
Subject: Re: [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment?

Hi Sy Jong,

But...I am programming a driver now, have any sample driver I can reference?

Choi, Sy Jong 於 2015年06月16日 14:48 寫道:

Hi Scott,



You can review DPDK KNI sample app, there's ethtool support using a vEth device interfacing to DPDK PMD.



Pure DPDK PMD require programming to display the information in ethtool. The interfacing is demonstrate on KNI sample app.



Regards,

Choi, Sy Jong

Platform Application Engineer



-----Original Message-----

From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of "Scott.Jhuang (???) : 6309"

Sent: Monday, June 15, 2015 6:35 PM

To: dev@dpdk.org<mailto:dev@dpdk.org>

Subject: [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment?



Hi,



I want to get etherport's net_device structs and using ethtool_cmd to get some information of etherports.

Are these capabilitys igb_uio driver also provided?



If not, how can I get net_devices and use ethtool_cmd capabilitys?



--



Best Regards,

Scott Jhuang



Software Engineering Dept.

Software Engineer

CASwell

238 新北市樹林區博愛街242號8樓

8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan

Tel:+886-2-7705-8888 # 6309

Fax:+886-2-7731-9988

E-mail:scott.jhuang@cas-well.com<mailto:scott.jhuang@cas-well.com><mailto:scott.jhuang@cas-well.com><mailto:scott.jhuang@cas-well.com>

CASWELL Inc. 瑞祺電通 http://www.cas-well.com





本信件可能包含瑞祺電通機密資訊,非指定之收件者,請勿使用或揭露本信件內容,並請銷毀此信件。 This email may contain confidential information. Please do not use or disclose it in any way and delete it if you are not the intended recipient.

--

Best Regards,

Scott Jhuang



Software Engineering Dept.

Software Engineer

CASwell

238 新北市樹林區博愛街242號8樓

8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan

Tel:+886-2-7705-8888 # 6309

Fax:+886-2-7731-9988

E-mail:scott.jhuang@cas-well.com<mailto:scott.jhuang@cas-well.com>

CASWELL Inc. 瑞祺電通 http://www.cas-well.com
本信件可能包含瑞祺電通機密資訊,非指定之收件者,請勿使用或揭露本信件內容,並請 銷毀 此信 件。 This email may contain confidential information. Please do not use or disclose it in any way and delete it if you are not the intended recipient.

--

Best Regards,

Scott Jhuang



Software Engineering Dept.

Software Engineer

CASwell

238 新北市樹林區博愛街242號8樓

8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan

Tel:+886-2-7705-8888 # 6309

Fax:+886-2-7731-9988

E-mail:scott.jhuang@cas-well.com<mailto:scott.jhuang@cas-well.com>

CASWELL Inc. 瑞祺電通 http://www.cas-well.com
本信件可能包含瑞祺電通機密資訊,非指定之收件者,請勿使用或揭露本信件內容,並請銷毀 此信 件。 This email may contain confidential information. Please do not use or disclose it in any way and delete it if you are not the intended recipient.

--

Best Regards,

Scott Jhuang



Software Engineering Dept.

Software Engineer

CASwell

238 新北市樹林區博愛街242號8樓

8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan

Tel:+886-2-7705-8888 # 6309

Fax:+886-2-7731-9988

E-mail:scott.jhuang@cas-well.com<mailto:scott.jhuang@cas-well.com>

CASWELL Inc. 瑞祺電通 http://www.cas-well.com

--

Best Regards,

Scott Jhuang



Software Engineering Dept.

Software Engineer

CASwell

238 新北市樹林區博愛街242號8樓

8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan

Tel:+886-2-7705-8888 # 6309

Fax:+886-2-7731-9988

E-mail:scott.jhuang@cas-well.com<mailto:scott.jhuang@cas-well.com>

CASWELL Inc. 瑞祺電通 http://www.cas-well.com
本信件可能包含瑞祺電通機密資訊,非指定之收件者,請勿使用或揭露本信件內容,並請銷毀此信件。 This email may contain confidential information. Please do not use or disclose it in any way and delete it if you are not the intended recipient.

--

Best Regards,

Scott Jhuang



Software Engineering Dept.

Software Engineer

CASwell

238 新北市樹林區博愛街242號8樓

8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan

Tel:+886-2-7705-8888 # 6309

Fax:+886-2-7731-9988

E-mail:scott.jhuang@cas-well.com<mailto:scott.jhuang@cas-well.com>

CASWELL Inc. 瑞祺電通 http://www.cas-well.com
本信件可能包含瑞祺電通機密資訊,非指定之收件者,請勿使用或揭露本信件內容,並請銷毀此信件。 This email may contain confidential information. Please do not use or disclose it in any way and delete it if you are not the intended recipient.

--

Best Regards,

Scott Jhuang



Software Engineering Dept.

Software Engineer

CASwell

238 新北市樹林區博愛街242號8樓

8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan

Tel:+886-2-7705-8888 # 6309

Fax:+886-2-7731-9988

E-mail:scott.jhuang@cas-well.com<mailto:scott.jhuang@cas-well.com>

CASWELL Inc. 瑞祺電通 http://www.cas-well.com
本信件可能包含瑞祺電通機密資訊,非指定之收件者,請勿使用或揭露本信件內容,並請銷毀此信件。 This email may contain confidential information. Please do not use or disclose it in any way and delete it if you are not the intended recipient.

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2015-07-17  8:16 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-15 10:35 [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment? Scott.Jhuang (莊清翔) : 6309
2015-06-16  6:48 ` Choi, Sy Jong
2015-06-17  3:11   ` Scott.Jhuang (莊清翔) : 6309
2015-06-17  3:15     ` Choi, Sy Jong
2015-06-18  4:24       ` Scott.Jhuang (莊清翔) : 6309
2015-06-19  2:35         ` Choi, Sy Jong
2015-06-23 13:24           ` Scott.Jhuang (莊清翔) : 6309
2015-07-01  6:44             ` Scott.Jhuang (莊清翔) : 6309
2015-07-01  7:55               ` Choi, Sy Jong
2015-07-15  9:54                 ` Scott.Jhuang (莊清翔) : 6309
2015-07-15 10:01                   ` Choi, Sy Jong
2015-07-17  7:53                     ` Scott.Jhuang (莊清翔) : 6309
2015-07-17  8:16                       ` Choi, Sy Jong

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).