From owner-freebsd-net@FreeBSD.ORG Thu May 28 13:50:22 2015 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3820A1DA for ; Thu, 28 May 2015 13:50:22 +0000 (UTC) (envelope-from stefanogarzarella@gmail.com) Received: from mail-wi0-x22e.google.com (mail-wi0-x22e.google.com [IPv6:2a00:1450:400c:c05::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B14FC852 for ; Thu, 28 May 2015 13:50:21 +0000 (UTC) (envelope-from stefanogarzarella@gmail.com) Received: by wicmc15 with SMTP id mc15so124454148wic.1 for ; Thu, 28 May 2015 06:50:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=jeTfpzOQiQVsQnUqs1YlJf1pzixAFVNB3b/zeF9Yn5o=; b=iqJrkmO3jm7BEMrWaEkj9+teQ4z9ZZo/mgvS0zzn0a6wcTjXf5HTD5x+zSQ7/JNvf+ 9yO/6PzRRnwNaSUDn8eYodjgK9br9kyF+/6fgubLrg9GH2JeEGWw1ilSw4oUAGSt8+SX mlY2lSRr8zZvEwsukRkOpxf0ImDazYH0fnt20l8A4zcDX9oU1+PCPods20XYDvRalRjg vG0TXlrk8ya/Bjj8wWkRhoSYaBoUayNjyojS1IdQR3f2fFzW/kLLdFi7fUKV8k0GGIqV /ekBCyUB/WqFGQd9Xc3sQYcTlOGz8RmnvxwmuiUygl6lFqqwJILcquGz2/dy2D5QRzkN SphQ== X-Received: by 10.194.7.97 with SMTP id i1mr5586504wja.107.1432821020182; Thu, 28 May 2015 06:50:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.27.9.76 with HTTP; Thu, 28 May 2015 06:49:59 -0700 (PDT) In-Reply-To: References: From: Stefano Garzarella Date: Thu, 28 May 2015 15:49:59 +0200 Message-ID: Subject: Re: Netmap problem with e1000e driver To: Oleg Prozorov Cc: "freebsd-net@freebsd.org" , Luigi Rizzo , Giuseppe Lettieri Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 May 2015 13:50:22 -0000 Thanks for your report! :) Cheers, Stefano 2015-05-28 15:43 GMT+02:00 Oleg Prozorov : > Hello Stefano, > > You make my day :) It works. Greate job. > > Ths a lot, > Oleg. > > 2015-05-28 16:26 GMT+03:00 Stefano Garzarella >: > >> Hi Oleg, >> can you try to apply this patch in this way: >> >> 1) untar netmap achive >> 2) dowonload linux source >> 3) in netmap-32e06f9d18bf/LINUX directory >> 3.1) ./configure --kernel-sources=3D/usr/src/linux-source-3.16/ >> --drivers=3De1000e >> 3.2) make clean all >> >> 3.3) patch -p2 < path/to/e1000e_fix.patch >> 3.4) make >> >> 4) rmmod e1000e >> 5) insmod ./netmap.ko >> 6) insmod ./e1000e/e1000e.ko >> >> You must do make in LINUX dir before apply the patch and after that, you >> need to do again make (without clean). >> >> Tell me if it works. >> >> Thanks, >> Stefano >> >> >> >> --- netmap/LINUX/e1000e/netdev.c 2015-05-28 15:31:31.136816911 +0200 >> +++ netmap/LINUX/e1000e/netdev-new.c 2015-05-28 15:33:38.503484647 +0200 >> @@ -4028,6 +4028,10 @@ int e1000e_up(struct e1000_adapter *adap >> >> netif_start_queue(adapter->netdev); >> >> +#ifdef DEV_NETMAP >> + netmap_enable_all_rings(adapter->netdev); >> +#endif /* DEV_NETMAP */ >> + >> /* fire a link change interrupt to start the watchdog */ >> if (adapter->msix_entries) >> ew32(ICS, E1000_ICS_LSC | E1000_ICR_OTHER); >> >> 2015-05-28 14:39 GMT+02:00 Oleg Prozorov : >> >>> >>> Hello Stefano, >>> I am working on Debian 8 jessy: >>> >>> kernel version: 3.16.0-4-amd64 >>> >>> i used netmap from link : >>> https://netmap.googlecode.com/archive/32e06f9d18bf82e40a7c5b6e769c0ca76= 07913fc.tar.gz >>> >>> >>> I did the next steps: >>> 1) untar netmap achive >>> 2) dowonload linux source >>> 3) in netmap-32e06f9d18bf/LINUX directory >>> 3.1) ./configure --kernel-sources=3D/usr/src/linux-source-3.16/ >>> --drivers=3De1000e >>> 3.2) make clean all >>> 4) rmmod e1000e >>> 5) insmod ./netmap.ko >>> 6) insmod ./e1000e/e1000e.ko >>> >>> >>> Ethernet adapter: >>> 02:00.0 Ethernet controller: Intel Corporation 82574L Gigabit Network >>> Connection >>> Subsystem: Intel Corporation Gigabit CT Desktop Adapter >>> Flags: bus master, fast devsel, latency 0, IRQ 16 >>> Memory at f7dc0000 (32-bit, non-prefetchable) [size=3D128K] >>> Memory at f7d00000 (32-bit, non-prefetchable) [size=3D512K] >>> I/O ports at e000 [size=3D32] >>> Memory at f7de0000 (32-bit, non-prefetchable) [size=3D16K] >>> Expansion ROM at f7d80000 [disabled] [size=3D256K] >>> Capabilities: [c8] Power Management version 2 >>> Capabilities: [d0] MSI: Enable- Count=3D1/1 Maskable- 64bit+ >>> Capabilities: [e0] Express Endpoint, MSI 00 >>> Capabilities: [a0] MSI-X: Enable+ Count=3D5 Masked- >>> Capabilities: [100] Advanced Error Reporting >>> Capabilities: [140] Device Serial Number 68-05-ca-ff-ff-28-36-f5 >>> Kernel driver in use: e1000e >>> >>> 03:00.0 Ethernet controller: Intel Corporation 82574L Gigabit Network >>> Connection >>> Subsystem: Intel Corporation Gigabit CT Desktop Adapter >>> Flags: bus master, fast devsel, latency 0, IRQ 17 >>> Memory at f7cc0000 (32-bit, non-prefetchable) [size=3D128K] >>> Memory at f7c00000 (32-bit, non-prefetchable) [size=3D512K] >>> I/O ports at d000 [size=3D32] >>> Memory at f7ce0000 (32-bit, non-prefetchable) [size=3D16K] >>> Expansion ROM at f7c80000 [disabled] [size=3D256K] >>> Capabilities: [c8] Power Management version 2 >>> Capabilities: [d0] MSI: Enable- Count=3D1/1 Maskable- 64bit+ >>> Capabilities: [e0] Express Endpoint, MSI 00 >>> Capabilities: [a0] MSI-X: Enable+ Count=3D5 Masked- >>> Capabilities: [100] Advanced Error Reporting >>> Capabilities: [140] Device Serial Number 68-05-ca-ff-ff-22-19-e7 >>> Kernel driver in use: e1000e >>> >>> >>> My application work as netmap bridge. >>> >>> rx -tx in one thread >>> 02:00.0 -> 03:00.0 >>> >>> rx-tx in one thread >>> 03:00.0 -> 02:00.0 >>> >>> I have attached my Netmap engine NetmapStream.cpp. >>> >>> On Intel I350 T2 having Network adapter link bringing down/up ethernet >>> adapter has recovered successfully approx in 3-5 sec without driver cra= sh. >>> >>> >>> Thx, >>> Oleg. >>> >>> >>> 2015-05-28 12:54 GMT+03:00 Stefano Garzarella < >>> stefanogarzarella@gmail.com>: >>> >>>> Hi Oleg, >>>> I'm working on netmap with Luigi and Giuseppe (in cc). >>>> >>>> I tried to do the same steps, but I can not produce the crash. >>>> >>>> Can you you send us your kernel and netmap version? >>>> When you put down and up the interface, are you in tx or rx? >>>> >>>> Cheers, >>>> Stefano >>>> >>>> 2015-05-27 17:26 GMT+02:00 Oleg Prozorov : >>>> >>>>> Hello All, >>>>> I am using Netmap technology in my program and have the problem : >>>>> when I put eth link down and then have it up netmap goes down with >>>>> kernel >>>>> messages: >>>>> >>>>> log from dmesg: >>>>> >>>>> [ 2457.286289] irq 44: nobody cared (try booting with the "irqpoll" >>>>> option) >>>>> [ 2457.286296] CPU: 2 PID: 0 Comm: swapper/2 Tainted: G O >>>>> 3.16.0-4-amd64 #1 Debian 3.16.7-ckt9-3~deb8u1 >>>>> [ 2457.286298] Hardware name: System manufacturer System Product >>>>> Name/P8H61-MX R2.0, BIOS 0803 10/26/2012 >>>>> [ 2457.286300] ffff880198b544c4 ffffffff8150ac96 ffff880198b54400 >>>>> ffffffff810bd10d >>>>> [ 2457.286304] ffff880198b54400 000000000000002c 0000000000000000 >>>>> ffffffff810bd631 >>>>> [ 2457.286307] 0000000000000000 0000000000000000 000000000000002c >>>>> 0000000000000000 >>>>> [ 2457.286310] Call Trace: >>>>> [ 2457.286312] [] ? dump_stack+0x41/0x51 >>>>> [ 2457.286324] [] ? __report_bad_irq+0x2d/0xc0 >>>>> [ 2457.286328] [] ? note_interrupt+0x241/0x290 >>>>> [ 2457.286332] [] ? >>>>> handle_irq_event_percpu+0xa1/0x190 >>>>> [ 2457.286336] [] ? handle_irq_event+0x38/0x60 >>>>> [ 2457.286341] [] ? handle_edge_irq+0x85/0x150 >>>>> [ 2457.286347] [] ? handle_irq+0x1d/0x30 >>>>> [ 2457.286350] [] ? do_IRQ+0x49/0xe0 >>>>> [ 2457.286355] [] ? common_interrupt+0x6d/0x6d >>>>> [ 2457.286356] [] ? >>>>> __hrtimer_start_range_ns+0x1cd/0x390 >>>>> [ 2457.286364] [] ? cpuidle_enter_state+0x52/0xc0 >>>>> [ 2457.286368] [] ? cpuidle_enter_state+0x48/0xc0 >>>>> [ 2457.286372] [] ? cpu_startup_entry+0x2f8/0x400 >>>>> [ 2457.286375] [] ? start_secondary+0x20f/0x2d0 >>>>> [ 2457.286377] handlers: >>>>> [ 2457.286384] [] e1000_msix_other [e1000e] >>>>> [ 2457.286386] Disabling IRQ #44 >>>>> >>>>> before i have the next steps: >>>>> >>>>> insmod ./netmap.ko >>>>> insmod ./e1000e/e1000e.ko >>>>> >>>>> log from dmesg: >>>>> >>>>> [ 1645.548786] e1000e: Intel(R) PRO/1000 Network Driver - 2.3.2-k >>>>> [ 1645.548791] e1000e: Copyright(c) 1999 - 2014 Intel Corporation. >>>>> [ 1645.549056] e1000e 0000:02:00.0: Interrupt Throttling Rate >>>>> (ints/sec) >>>>> set to dynamic conservative mode >>>>> [ 1645.549089] e1000e 0000:02:00.0: irq 42 for MSI/MSI-X >>>>> [ 1645.549094] e1000e 0000:02:00.0: irq 43 for MSI/MSI-X >>>>> [ 1645.549098] e1000e 0000:02:00.0: irq 44 for MSI/MSI-X >>>>> [ 1645.704831] 635.291734 [2720] netmap_attach success >>>>> for eth0 >>>>> tx 1/256 rx 1/256 queues/slots >>>>> [ 1645.705079] e1000e 0000:02:00.0 eth0: registered PHC clock >>>>> [ 1645.705083] e1000e 0000:02:00.0 eth0: (PCI Express:2.5GT/s:Width >>>>> x1) >>>>> 68:05:ca:28:36:f5 >>>>> [ 1645.705086] e1000e 0000:02:00.0 eth0: Intel(R) PRO/1000 Network >>>>> Connection >>>>> [ 1645.705100] e1000e 0000:02:00.0 eth0: MAC: 3, PHY: 8, PBA No: >>>>> E46981-008 >>>>> [ 1645.705349] e1000e 0000:03:00.0: Interrupt Throttling Rate >>>>> (ints/sec) >>>>> set to dynamic conservative mode >>>>> [ 1645.705381] e1000e 0000:03:00.0: irq 45 for MSI/MSI-X >>>>> [ 1645.705386] e1000e 0000:03:00.0: irq 46 for MSI/MSI-X >>>>> [ 1645.705390] e1000e 0000:03:00.0: irq 47 for MSI/MSI-X >>>>> [ 1645.739490] systemd-udevd[2715]: renamed network interface eth0 to >>>>> eth5 >>>>> [ 1645.824716] IPv6: ADDRCONF(NETDEV_UP): eth5: link is not ready >>>>> [ 1645.848756] 635.435799 [2720] netmap_attach success >>>>> for eth0 >>>>> tx 1/256 rx 1/256 queues/slots >>>>> [ 1645.848851] e1000e 0000:03:00.0 eth0: registered PHC clock >>>>> [ 1645.848856] e1000e 0000:03:00.0 eth0: (PCI Express:2.5GT/s:Width >>>>> x1) >>>>> 68:05:ca:22:19:e7 >>>>> [ 1645.848859] e1000e 0000:03:00.0 eth0: Intel(R) PRO/1000 Network >>>>> Connection >>>>> [ 1645.848875] e1000e 0000:03:00.0 eth0: MAC: 3, PHY: 8, PBA No: >>>>> E46981-008 >>>>> [ 1645.869528] systemd-udevd[2715]: renamed network interface eth0 to >>>>> eth6 >>>>> [ 1645.949935] IPv6: ADDRCONF(NETDEV_UP): eth6: link is not ready >>>>> [ 1648.795532] e1000e: eth5 NIC Link is Up 1000 Mbps Full Duplex, Flo= w >>>>> Control: Rx/Tx >>>>> [ 1648.795856] IPv6: ADDRCONF(NETDEV_CHANGE): eth5: link becomes read= y >>>>> [ 1648.843497] e1000e: eth6 NIC Link is Up 1000 Mbps Full Duplex, Flo= w >>>>> Control: Rx/Tx >>>>> [ 1648.843820] IPv6: ADDRCONF(NETDEV_CHANGE): eth6: link becomes read= y >>>>> [ 1668.060841] e1000e: eth5 NIC Link is Up 1000 Mbps Full Duplex, Flo= w >>>>> Control: Rx/Tx >>>>> [ 1668.212692] e1000e: eth6 NIC Link is Up 1000 Mbps Full Duplex, Flo= w >>>>> Control: Rx/Tx >>>>> >>>>> >>>>> My program used netmap desc: >>>>> root@debian:/home/debian/Projects/bin# lsmod | grep netmap >>>>> netmap 99228 5 e1000e >>>>> >>>>> >>>>> Then even if it shows that link is up net map stops to work and only >>>>> rmmod/insmod and restart of the netmap can bring it back to work. >>>>> >>>>> Could you please help me with it ? >>>>> >>>>> Thx a lot, >>>>> Oleg. >>>>> _______________________________________________ >>>>> freebsd-net@freebsd.org mailing list >>>>> http://lists.freebsd.org/mailman/listinfo/freebsd-net >>>>> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org= " >>>>> >>>> >>>> >>>> >>>> -- >>>> *Stefano Garzarella* >>>> Software Engineer >>>> >>>> e-mail: stefano.garzarella@gmail.com >>>> github: http://github.com/stefano-garzarella >>>> linkedin: http://it.linkedin.com/pub/stefano-garzarella >>>> >>> >>> >>> >>> -- >>> =D0=A1 =D1=83=D0=B2=D0=B0=D0=B6=D0=B5=D0=BD=D0=B8=D0=B5=D0=BC, >>> =D0=9E=D0=BB=D0=B5=D0=B3 =D0=9F=D1=80=D0=BE=D0=B7=D0=BE=D1=80=D0=BE=D0= =B2. >>> >> >> >> >> -- >> *Stefano Garzarella* >> Software Engineer >> >> e-mail: stefano.garzarella@gmail.com >> github: http://github.com/stefano-garzarella >> linkedin: http://it.linkedin.com/pub/stefano-garzarella >> > > > > -- > =D0=A1 =D1=83=D0=B2=D0=B0=D0=B6=D0=B5=D0=BD=D0=B8=D0=B5=D0=BC, > =D0=9E=D0=BB=D0=B5=D0=B3 =D0=9F=D1=80=D0=BE=D0=B7=D0=BE=D1=80=D0=BE=D0=B2= . > --=20 *Stefano Garzarella* Software Engineer e-mail: stefano.garzarella@gmail.com github: http://github.com/stefano-garzarella linkedin: http://it.linkedin.com/pub/stefano-garzarella