Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Mar 2012 10:30:41 +0300
From:      Sergey Kandaurov <pluknet@freebsd.org>
To:        Andrew Thompson <thompsa@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r232640 - head/sys/net
Message-ID:  <CAE-mSO%2Brprf8XpqOzW5T%2BCq1p28izfZOsC2JKMa4A7noALbbbA@mail.gmail.com>
In-Reply-To: <201203070722.q277MrwJ080590@svn.freebsd.org>
References:  <201203070722.q277MrwJ080590@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 7 March 2012 11:22, Andrew Thompson <thompsa@freebsd.org> wrote:
> Author: thompsa
> Date: Wed Mar =A07 07:22:53 2012
> New Revision: 232640
> URL: http://svn.freebsd.org/changeset/base/232640
>
> Log:
> =A0Move the vlan buffer space into the union which also fixes an unused v=
ariable
> =A0warning with !INET & !INET6.
>
> =A0Spotted by: =A0 pluknet
>
> Modified:
> =A0head/sys/net/if_lagg.c

Thank you.
BTW, how do you like this change?

Index: Makefile
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- Makefile    (revision 232637)
+++ Makefile    (working copy)
@@ -7,8 +7,10 @@
 SRCS=3D  if_lagg.c ieee8023ad_lacp.c opt_inet.h opt_inet6.h

 .if !defined(KERNBUILDDIR)
+.if ${MK_INET_SUPPORT} !=3D "no"
 opt_inet.h:
        echo "#define INET 1" > ${.TARGET}
+.endif

 .if ${MK_INET6_SUPPORT} !=3D "no"
 opt_inet6.h:


>
> Modified: head/sys/net/if_lagg.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- head/sys/net/if_lagg.c =A0 =A0 =A0Wed Mar =A07 06:42:21 2012 =A0 =A0 =
=A0 =A0(r232639)
> +++ head/sys/net/if_lagg.c =A0 =A0 =A0Wed Mar =A07 07:22:53 2012 =A0 =A0 =
=A0 =A0(r232640)
> @@ -1438,7 +1438,6 @@ lagg_hashmbuf(struct lagg_softc *sc, str
> =A0 =A0 =A0 =A0uint32_t p =3D key;
> =A0 =A0 =A0 =A0int off;
> =A0 =A0 =A0 =A0struct ether_header *eh;
> - =A0 =A0 =A0 struct ether_vlan_header vlanbuf;
> =A0 =A0 =A0 =A0const struct ether_vlan_header *vlan;
> =A0#ifdef INET
> =A0 =A0 =A0 =A0const struct ip *ip;
> @@ -1456,6 +1455,7 @@ lagg_hashmbuf(struct lagg_softc *sc, str
> =A0#ifdef INET6
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0struct ip6_hdr ip6;
> =A0#endif
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 struct ether_vlan_header vlan;
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0uint32_t port;
> =A0 =A0 =A0 =A0} buf;
>
> @@ -1475,7 +1475,7 @@ lagg_hashmbuf(struct lagg_softc *sc, str
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0p =3D hash32_buf(&m->m_pkthdr.ether_vtag,
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0sizeof(m->m_pkthdr.ether_vtag), p)=
;
> =A0 =A0 =A0 =A0} else if (etype =3D=3D ETHERTYPE_VLAN) {
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 vlan =3D lagg_gethdr(m, off, =A0sizeof(*vla=
n), &vlanbuf);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 vlan =3D lagg_gethdr(m, off, =A0sizeof(*vla=
n), &buf);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (vlan =3D=3D NULL)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0goto out;
>

--=20
wbr,
pluknet



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAE-mSO%2Brprf8XpqOzW5T%2BCq1p28izfZOsC2JKMa4A7noALbbbA>