From owner-freebsd-net@FreeBSD.ORG Tue Aug 18 21:34:12 2009 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 938511065691; Tue, 18 Aug 2009 21:34:12 +0000 (UTC) (envelope-from jfvogel@gmail.com) Received: from mail-yw0-f199.google.com (mail-yw0-f199.google.com [209.85.211.199]) by mx1.freebsd.org (Postfix) with ESMTP id 081688FC68; Tue, 18 Aug 2009 21:34:11 +0000 (UTC) Received: by ywh37 with SMTP id 37so5692572ywh.28 for ; Tue, 18 Aug 2009 14:34:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=ccIYJ1kICc4J4mYNOnxYwZzLwdV/Va2xkWRJjQA7yTk=; b=foayCMngJV0E6dbGQEeMVgawyqVYa7Zwp7F6jQKhZzogxePBzA9YiVQC6Txjo9WxCA oML12CJIPFTp0qR32p9yfTGFe4zYQq+uIR4s3mdVpvThpw6h3n5ZcPuIv2KmlDuaSgvr JNlMkf9A9SdVl2y7y7x2WTl9lZODjb2MKTyWU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=CRHRJY0IojbSmDfC5wFzaF1kl1n0rZu2EatZH8okuSEwu9fD0mIwiS+cid/Z838F4y 0RDd2kkhJnxUwWJitwBHruMjcMUsgVnDGSATtFEX7nuTnoybsfvuF3QQiCyPx4OHFGUd rf6yXSsXil5kbOz+aguVZkeywXjQ0u+Qzp+zQ= MIME-Version: 1.0 Received: by 10.101.80.14 with SMTP id h14mr6096028anl.129.1250631249560; Tue, 18 Aug 2009 14:34:09 -0700 (PDT) In-Reply-To: <4A8B1729.8070503@delphij.net> References: <5D267A3F22FD854F8F48B3D2B523819339EC3813D2@IRVEXCHCCR01.corp.ad.broadcom.com> <692150.91493.qm@web63906.mail.re1.yahoo.com> <2a41acea0908060905n69edf1dfkbf993d9f8a4edf37@mail.gmail.com> <4A8B1729.8070503@delphij.net> Date: Tue, 18 Aug 2009 14:34:09 -0700 Message-ID: <2a41acea0908181434l7a8119ffxbe03a5d312947757@mail.gmail.com> From: Jack Vogel To: d@delphij.net, Sam Leffler Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Barney Cordoba , David Christensen , "freebsd-net@freebsd.org" , Julian Elischer , Jack F Vogel , yongari@freebsd.org Subject: Re: [PATCH] Fix for e1000 (em/igb) NOARP issue [Was Re: em(4): sending ARP regardless of NOARP flag] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Aug 2009 21:34:12 -0000 Yes, this would work, although talking to Sam about this, he said the whole reason for this hack in the driver was some other brokenness in the if code, and he said he was going to fix that, just not before 8 RELEASE. So, I would rather fix it upstream as it where, and then take this hack out of the code altogether instead of refining the hack :) Just my .02 Jack On Tue, Aug 18, 2009 at 2:03 PM, Xin LI wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi, Jack, > > I have looked into the code history and found that sys/dev/em/if_em.c,v > 1.119 has introduced the arp_ifinit() call in order to fix the problem > that if_em won't send ARP when IP address is changed. > > I think we can further improve it as attached, say, only do it when > IFF_NOARP is not set. This should have no effect for usual > configuration but fix the problem when NOARP is the desired behavior. > > Cheers, > - -- > Xin LI http://www.delphij.net/ > FreeBSD - The Power to Serve! > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0.12 (FreeBSD) > > iEYEARECAAYFAkqLFykACgkQi+vbBBjt66CMFQCeOkESwsgDAbqe5PCtiMulaU1E > lIAAoIm0LDJ6qHuR8jyo7dXFi/9iYA22 > =9E54 > -----END PGP SIGNATURE----- > > Index: if_igb.c > =================================================================== > --- if_igb.c (revision 196363) > +++ if_igb.c (working copy) > @@ -952,7 +952,8 @@ igb_ioctl(struct ifnet *ifp, u_long command, caddr > igb_init_locked(adapter); > IGB_CORE_UNLOCK(adapter); > } > - arp_ifinit(ifp, ifa); > + if (!(ifp->if_flags & IFF_NOARP)) > + arp_ifinit(ifp, ifa); > } else > #endif > error = ether_ioctl(ifp, command, data); > Index: if_em.c > =================================================================== > --- if_em.c (revision 196363) > +++ if_em.c (working copy) > @@ -1204,7 +1204,8 @@ em_ioctl(struct ifnet *ifp, u_long command, caddr_ > em_init_locked(adapter); > EM_CORE_UNLOCK(adapter); > } > - arp_ifinit(ifp, ifa); > + if (!(ifp->if_flags & IFF_NOARP)) > + arp_ifinit(ifp, ifa); > } else > #endif > error = ether_ioctl(ifp, command, data); > >