Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Mar 2012 10:01:37 +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: r232629 - in head: sbin/ifconfig sys/net
Message-ID:  <CAE-mSOL9OpFqbx14=oW8dRocrKLC6kuwiiFF_%2BdCFU4XFRC3MQ@mail.gmail.com>
In-Reply-To: <201203062258.q26MwDI6061226@svn.freebsd.org>
References:  <201203062258.q26MwDI6061226@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 7 March 2012 02:58, Andrew Thompson <thompsa@freebsd.org> wrote:
> Author: thompsa
> Date: Tue Mar =A06 22:58:13 2012
> New Revision: 232629
> URL: http://svn.freebsd.org/changeset/base/232629
>
> Log:
> =A0Add the ability to set which packet layers are used for the load balan=
ce hash
> =A0calculation.
>
> Modified:
> =A0head/sbin/ifconfig/ifconfig.8
> =A0head/sbin/ifconfig/iflagg.c
> =A0head/sys/net/ieee8023ad_lacp.c
> =A0head/sys/net/if_lagg.c
> =A0head/sys/net/if_lagg.h

HI.

This change breaks LINT-NOIP.
Something like this shoud fix it:

Index: 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
--- sys/net/if_lagg.c  (revision 232637)
+++ sys/net/if_lagg.c  (working copy)
@@ -1449,6 +1449,7 @@
        const struct ip6_hdr *ip6;
        uint32_t flow;
 #endif
+#if defined(INET) || defined(INET6)
        union {
 #ifdef INET
                struct ip ip;
@@ -1458,8 +1459,8 @@
 #endif
                uint32_t port;
        } buf;
+#endif

-
        off =3D sizeof(*eh);
        if (m->m_len < off)
                goto out;


> 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 =A0Tue Mar =A06 22:45:54 2012 =A0 =A0 =
=A0 =A0(r232628)
> +++ head/sys/net/if_lagg.c =A0 =A0 =A0Tue Mar =A06 22:58:13 2012 =A0 =A0 =
=A0 =A0(r232629)
[..]
> @@ -1413,34 +1432,46 @@ lagg_gethdr(struct mbuf *m, u_int off, u
> =A0}
>
> =A0uint32_t
> -lagg_hashmbuf(struct mbuf *m, uint32_t key)
> +lagg_hashmbuf(struct lagg_softc *sc, struct mbuf *m, uint32_t key)
> =A0{
> =A0 =A0 =A0 =A0uint16_t etype;
> - =A0 =A0 =A0 uint32_t p =3D 0;
> + =A0 =A0 =A0 uint32_t p =3D key;
> =A0 =A0 =A0 =A0int off;
> =A0 =A0 =A0 =A0struct ether_header *eh;
> =A0 =A0 =A0 =A0struct ether_vlan_header vlanbuf;
> =A0 =A0 =A0 =A0const struct ether_vlan_header *vlan;
> =A0#ifdef INET
> =A0 =A0 =A0 =A0const struct ip *ip;
> - =A0 =A0 =A0 struct ip ipbuf;
> + =A0 =A0 =A0 const uint32_t *ports;
> + =A0 =A0 =A0 int iphlen;
> =A0#endif
> =A0#ifdef INET6
> =A0 =A0 =A0 =A0const struct ip6_hdr *ip6;
> - =A0 =A0 =A0 struct ip6_hdr ip6buf;
> =A0 =A0 =A0 =A0uint32_t flow;
> =A0#endif
> + =A0 =A0 =A0 union {
> +#ifdef INET
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 struct ip ip;
> +#endif
> +#ifdef INET6
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 struct ip6_hdr ip6;
> +#endif
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 uint32_t port;
> + =A0 =A0 =A0 } buf;
> +
>
[..]

--=20
wbr,
pluknet



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAE-mSOL9OpFqbx14=oW8dRocrKLC6kuwiiFF_%2BdCFU4XFRC3MQ>