From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ex1.cas-well.com (unknown [122.146.96.100]) by dpdk.org (Postfix) with ESMTP id 2B228CF9 for ; Fri, 17 Jul 2015 09:53:11 +0200 (CEST) Received: from [192.168.143.153] (192.168.143.153) by ex1.cas-well.com (192.168.200.10) with Microsoft SMTP Server id 14.3.195.1; Fri, 17 Jul 2015 15:53:07 +0800 Message-ID: <55A8B463.4050207@cas-well.com> Date: Fri, 17 Jul 2015 15:53:07 +0800 From: =?UTF-8?B?IlNjb3R0LkpodWFuZyAo6I6K5riF57+UKSA6IDYzMDki?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: "Choi, Sy Jong" , "dev@dpdk.org" , =?UTF-8?B?IlNhbmR5LkxpdSAo5YqJ6LuS6LuSKSA6IDY4MTci?= , =?UTF-8?B?IkFsYW4gWXUgKOS/nuS6puWBiSkgOiA2NjMy?= =?UTF-8?B?Ig==?= References: <557EAA67.6090702@cas-well.com> <697F8B1B48670548A5BAB03E8283550F354483D8@PGSMSX108.gar.corp.intel.com> <5580E567.3020204@cas-well.com> <697F8B1B48670548A5BAB03E8283550F35448689@PGSMSX108.gar.corp.intel.com> <55824809.9090804@cas-well.com> <697F8B1B48670548A5BAB03E8283550F35448F93@PGSMSX108.gar.corp.intel.com> <55895E0A.50107@cas-well.com> <55938C30.6040703@cas-well.com> <697F8B1B48670548A5BAB03E8283550F3544C9A4@PGSMSX108.gar.corp.intel.com> <55A62DCE.6090503@cas-well.com> <697F8B1B48670548A5BAB03E8283550F3545A94C@KMSMSX154.gar.corp.intel.com> In-Reply-To: <697F8B1B48670548A5BAB03E8283550F3545A94C@KMSMSX154.gar.corp.intel.com> X-Originating-IP: [192.168.143.153] Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] How to get net_device and use struct ethtool_cmd at DPDK enverinment? X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2015 07:53:13 -0000 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 =E6=96=BC 2015=E5=B9=B407=E6=9C=8815=E6=97=A5 18:01 =E5=AF=AB= =E9=81=93: Hi Scott, You will need to start KNI sample app, it will create the vEth interface. A= fter 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=3Dmultiple 1. Running the KNI sample application: 4. ./kni -c -0xf0 -n 4 -- -p 0x3 -P -config=3D"(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 (=E8=8E=8A=E6=B8=85 =E7=BF=94) : 6309" [mailto:Scott.Jh= uang@cas-well.com] Sent: Wednesday, July 15, 2015 5:54 PM To: Choi, Sy Jong; dev@dpdk.org; "Sandy.Liu (=E5=8A=89= =E8=BB=92 =E8=BB=92) : 6817"; "Alan Yu (=E4=BF=9E=E4=BA=A6 =E5=81=89) : 663= 2" 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 st= ructs which KNI initialled. Or these structs have not been exported to kernel? Choi, Sy Jong =E6=96=BC 2015=E5=B9=B407=E6=9C=8801=E6=97=A5 15:55 =E5=AF=AB= =E9=81=93: 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 (=E8=8E=8A=E6=B8=85 =E7=BF=94) : 6309" [mailto:Scott.Jh= uang@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 (=E8=8E=8A =E6=B8=85=E7=BF=94) : 6309" =E6=96=BC 2015=E5=B9= =B406=E6=9C=8823=E6=97=A5 21:24 =E5=AF=AB=E9=81=93: Dear Sy Jong, Yes, I have check out DPDK KNI, but I still can't find how to prepare net_d= evice 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 =E6=96=BC 2015=E5=B9=B406=E6=9C=8819=E6=97=A5 10:35 =E5=AF=AB= =E9=81=93: Hi Scott, DPDK PMD are interfacing using rte_ethdev.c which link to ixgbe_ethdev.c th= ere=E2=80=99s no =E2=80=9Cnet_device=E2=80=9D 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 (=E8=8E=8A =E6=B8=85 =E7=BF=94) : 6309" [mailto:Scott.J= huang@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 struct= ure, 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 informat= ion 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 contr= ol PHY's link-up/down, and I reference igb driver to design the link-up/down functions, since in D= PDK 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 h= ave igb driver). Choi, Sy Jong =E6=96=BC 2015=E5=B9=B406=E6=9C=8817=E6=97=A5 11:15 =E5=AF=AB= =E9=81=93: 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 (=E8=8E=8A=E6=B8=85 =E7=BF=94) : 6309" [mailto:Scott.Jh= uang@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 =E6=96=BC 2015=E5=B9=B406=E6=9C=8816=E6=97=A5 14:48 =E5=AF=AB= =E9=81=93: Hi Scott, You can review DPDK KNI sample app, there's ethtool support using a vEth de= vice interfacing to DPDK PMD. Pure DPDK PMD require programming to display the information in ethtool. Th= e 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 DPD= K enverinment? Hi, I want to get etherport's net_device structs and using ethtool_cmd to get s= ome 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 =E6=96=B0=E5=8C=97=E5=B8=82=E6=A8=B9=E6=9E=97=E5=8D=80=E5=8D=9A=E6=84= =9B=E8=A1=97242=E8=99=9F8=E6=A8=93 8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan Tel=EF=BC=9A+886-2-7705-8888 # 6309 Fax=EF=BC=9A+886-2-7731-9988 E-mail=EF=BC=9Ascott.jhuang@cas-well.com<= mailto:scott.jhuang@cas-well.com> CASWELL Inc. =E7=91=9E=E7=A5=BA=E9=9B=BB=E9=80=9A http://www.cas-well.com =E6=9C=AC=E4=BF=A1=E4=BB=B6=E5=8F=AF=E8=83=BD=E5=8C=85=E5=90=AB=E7=91=9E=E7= =A5=BA=E9=9B=BB=E9=80=9A=E6=A9=9F=E5=AF=86=E8=B3=87=E8=A8=8A=EF=BC=8C=E9=9D= =9E=E6=8C=87=E5=AE=9A=E4=B9=8B=E6=94=B6=E4=BB=B6=E8=80=85=EF=BC=8C=E8=AB=8B= =E5=8B=BF=E4=BD=BF=E7=94=A8=E6=88=96=E6=8F=AD=E9=9C=B2=E6=9C=AC=E4=BF=A1=E4= =BB=B6=E5=85=A7=E5=AE=B9=EF=BC=8C=E4=B8=A6=E8=AB=8B=E9=8A=B7=E6=AF=80=E6=AD= =A4=E4=BF=A1=E4=BB=B6=E3=80=82 This email may contain confidential informat= ion. Please do not use or disclose it in any way and delete it if you are n= ot the intended recipient. -- Best Regards, Scott Jhuang Software Engineering Dept. Software Engineer CASwell 238 =E6=96=B0=E5=8C=97=E5=B8=82=E6=A8=B9=E6=9E=97=E5=8D=80=E5=8D=9A=E6=84= =9B=E8=A1=97242=E8=99=9F8=E6=A8=93 8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan Tel=EF=BC=9A+886-2-7705-8888 # 6309 Fax=EF=BC=9A+886-2-7731-9988 E-mail=EF=BC=9Ascott.jhuang@cas-well.com CASWELL Inc. =E7=91=9E=E7=A5=BA=E9=9B=BB=E9=80=9A http://www.cas-well.com =E6=9C=AC=E4=BF=A1=E4=BB=B6=E5=8F=AF=E8=83=BD=E5=8C=85=E5=90=AB=E7=91=9E=E7= =A5=BA=E9=9B=BB=E9=80=9A=E6=A9=9F=E5=AF=86=E8=B3=87=E8=A8=8A=EF=BC=8C=E9=9D= =9E=E6=8C=87=E5=AE=9A=E4=B9=8B=E6=94=B6=E4=BB=B6=E8=80=85=EF=BC=8C=E8=AB=8B= =E5=8B=BF=E4=BD=BF=E7=94=A8=E6=88=96=E6=8F=AD=E9=9C=B2=E6=9C=AC=E4=BF=A1=E4= =BB=B6=E5=85=A7=E5=AE=B9=EF=BC=8C=E4=B8=A6=E8=AB=8B =E9=8A=B7=E6=AF=80 =E6= =AD=A4=E4=BF=A1 =E4=BB=B6=E3=80=82 This email may contain confidential info= rmation. Please do not use or disclose it in any way and delete it if you a= re not the intended recipient. -- Best Regards, Scott Jhuang Software Engineering Dept. Software Engineer CASwell 238 =E6=96=B0=E5=8C=97=E5=B8=82=E6=A8=B9=E6=9E=97=E5=8D=80=E5=8D=9A=E6=84= =9B=E8=A1=97242=E8=99=9F8=E6=A8=93 8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan Tel=EF=BC=9A+886-2-7705-8888 # 6309 Fax=EF=BC=9A+886-2-7731-9988 E-mail=EF=BC=9Ascott.jhuang@cas-well.com CASWELL Inc. =E7=91=9E=E7=A5=BA=E9=9B=BB=E9=80=9A http://www.cas-well.com =E6=9C=AC=E4=BF=A1=E4=BB=B6=E5=8F=AF=E8=83=BD=E5=8C=85=E5=90=AB=E7=91=9E=E7= =A5=BA=E9=9B=BB=E9=80=9A=E6=A9=9F=E5=AF=86=E8=B3=87=E8=A8=8A=EF=BC=8C=E9=9D= =9E=E6=8C=87=E5=AE=9A=E4=B9=8B=E6=94=B6=E4=BB=B6=E8=80=85=EF=BC=8C=E8=AB=8B= =E5=8B=BF=E4=BD=BF=E7=94=A8=E6=88=96=E6=8F=AD=E9=9C=B2=E6=9C=AC=E4=BF=A1=E4= =BB=B6=E5=85=A7=E5=AE=B9=EF=BC=8C=E4=B8=A6=E8=AB=8B=E9=8A=B7=E6=AF=80 =E6= =AD=A4=E4=BF=A1 =E4=BB=B6=E3=80=82 This email may contain confidential info= rmation. Please do not use or disclose it in any way and delete it if you a= re not the intended recipient. -- Best Regards, Scott Jhuang Software Engineering Dept. Software Engineer CASwell 238 =E6=96=B0=E5=8C=97=E5=B8=82=E6=A8=B9=E6=9E=97=E5=8D=80=E5=8D=9A=E6=84= =9B=E8=A1=97242=E8=99=9F8=E6=A8=93 8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan Tel=EF=BC=9A+886-2-7705-8888 # 6309 Fax=EF=BC=9A+886-2-7731-9988 E-mail=EF=BC=9Ascott.jhuang@cas-well.com CASWELL Inc. =E7=91=9E=E7=A5=BA=E9=9B=BB=E9=80=9A http://www.cas-well.com -- Best Regards, Scott Jhuang Software Engineering Dept. Software Engineer CASwell 238 =E6=96=B0=E5=8C=97=E5=B8=82=E6=A8=B9=E6=9E=97=E5=8D=80=E5=8D=9A=E6=84= =9B=E8=A1=97242=E8=99=9F8=E6=A8=93 8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan Tel=EF=BC=9A+886-2-7705-8888 # 6309 Fax=EF=BC=9A+886-2-7731-9988 E-mail=EF=BC=9Ascott.jhuang@cas-well.com CASWELL Inc. =E7=91=9E=E7=A5=BA=E9=9B=BB=E9=80=9A http://www.cas-well.com =E6=9C=AC=E4=BF=A1=E4=BB=B6=E5=8F=AF=E8=83=BD=E5=8C=85=E5=90=AB=E7=91=9E=E7= =A5=BA=E9=9B=BB=E9=80=9A=E6=A9=9F=E5=AF=86=E8=B3=87=E8=A8=8A=EF=BC=8C=E9=9D= =9E=E6=8C=87=E5=AE=9A=E4=B9=8B=E6=94=B6=E4=BB=B6=E8=80=85=EF=BC=8C=E8=AB=8B= =E5=8B=BF=E4=BD=BF=E7=94=A8=E6=88=96=E6=8F=AD=E9=9C=B2=E6=9C=AC=E4=BF=A1=E4= =BB=B6=E5=85=A7=E5=AE=B9=EF=BC=8C=E4=B8=A6=E8=AB=8B=E9=8A=B7=E6=AF=80=E6=AD= =A4=E4=BF=A1=E4=BB=B6=E3=80=82 This email may contain confidential informat= ion. Please do not use or disclose it in any way and delete it if you are n= ot the intended recipient. -- Best Regards, Scott Jhuang Software Engineering Dept. Software Engineer CASwell 238 =E6=96=B0=E5=8C=97=E5=B8=82=E6=A8=B9=E6=9E=97=E5=8D=80=E5=8D=9A=E6=84= =9B=E8=A1=97242=E8=99=9F8=E6=A8=93 8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan Tel=EF=BC=9A+886-2-7705-8888 # 6309 Fax=EF=BC=9A+886-2-7731-9988 E-mail=EF=BC=9Ascott.jhuang@cas-well.com CASWELL Inc. =E7=91=9E=E7=A5=BA=E9=9B=BB=E9=80=9A http://www.cas-well.com =E6=9C=AC=E4=BF=A1=E4=BB=B6=E5=8F=AF=E8=83=BD=E5=8C=85=E5=90=AB=E7=91=9E=E7= =A5=BA=E9=9B=BB=E9=80=9A=E6=A9=9F=E5=AF=86=E8=B3=87=E8=A8=8A=EF=BC=8C=E9=9D= =9E=E6=8C=87=E5=AE=9A=E4=B9=8B=E6=94=B6=E4=BB=B6=E8=80=85=EF=BC=8C=E8=AB=8B= =E5=8B=BF=E4=BD=BF=E7=94=A8=E6=88=96=E6=8F=AD=E9=9C=B2=E6=9C=AC=E4=BF=A1=E4= =BB=B6=E5=85=A7=E5=AE=B9=EF=BC=8C=E4=B8=A6=E8=AB=8B=E9=8A=B7=E6=AF=80=E6=AD= =A4=E4=BF=A1=E4=BB=B6=E3=80=82 This email may contain confidential informat= ion. Please do not use or disclose it in any way and delete it if you are n= ot the intended recipient. -- Best Regards, Scott Jhuang Software Engineering Dept. Software Engineer CASwell 238 =E6=96=B0=E5=8C=97=E5=B8=82=E6=A8=B9=E6=9E=97=E5=8D=80=E5=8D=9A=E6=84= =9B=E8=A1=97242=E8=99=9F8=E6=A8=93 8F, No.242, Bo-Ai St., Shu-Lin Dist, New Taipei City 238, Taiwan Tel=EF=BC=9A+886-2-7705-8888 # 6309 Fax=EF=BC=9A+886-2-7731-9988 E-mail=EF=BC=9Ascott.jhuang@cas-well.com CASWELL Inc. =E7=91=9E=E7=A5=BA=E9=9B=BB=E9=80=9A http://www.cas-well.com =E6=9C=AC=E4=BF=A1=E4=BB=B6=E5=8F=AF=E8=83=BD=E5=8C=85=E5=90=AB=E7=91=9E=E7= =A5=BA=E9=9B=BB=E9=80=9A=E6=A9=9F=E5=AF=86=E8=B3=87=E8=A8=8A=EF=BC=8C=E9=9D= =9E=E6=8C=87=E5=AE=9A=E4=B9=8B=E6=94=B6=E4=BB=B6=E8=80=85=EF=BC=8C=E8=AB=8B= =E5=8B=BF=E4=BD=BF=E7=94=A8=E6=88=96=E6=8F=AD=E9=9C=B2=E6=9C=AC=E4=BF=A1=E4= =BB=B6=E5=85=A7=E5=AE=B9=EF=BC=8C=E4=B8=A6=E8=AB=8B=E9=8A=B7=E6=AF=80=E6=AD= =A4=E4=BF=A1=E4=BB=B6=E3=80=82 This email may contain confidential informat= ion. Please do not use or disclose it in any way and delete it if you are n= ot the intended recipient.