svn commit: r232629 - in head: sbin/ifconfig sys/net

Sergey Kandaurov pluknet at freebsd.org
Wed Mar 7 07:01:42 UTC 2012


On 7 March 2012 02:58, Andrew Thompson <thompsa at freebsd.org> wrote:
> Author: thompsa
> Date: Tue Mar  6 22:58:13 2012
> New Revision: 232629
> URL: http://svn.freebsd.org/changeset/base/232629
>
> Log:
>  Add the ability to set which packet layers are used for the load balance hash
>  calculation.
>
> Modified:
>  head/sbin/ifconfig/ifconfig.8
>  head/sbin/ifconfig/iflagg.c
>  head/sys/net/ieee8023ad_lacp.c
>  head/sys/net/if_lagg.c
>  head/sys/net/if_lagg.h

HI.

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

Index: sys/net/if_lagg.c
===================================================================
--- 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 = sizeof(*eh);
        if (m->m_len < off)
                goto out;


> Modified: head/sys/net/if_lagg.c
> ==============================================================================
> --- head/sys/net/if_lagg.c      Tue Mar  6 22:45:54 2012        (r232628)
> +++ head/sys/net/if_lagg.c      Tue Mar  6 22:58:13 2012        (r232629)
[..]
> @@ -1413,34 +1432,46 @@ lagg_gethdr(struct mbuf *m, u_int off, u
>  }
>
>  uint32_t
> -lagg_hashmbuf(struct mbuf *m, uint32_t key)
> +lagg_hashmbuf(struct lagg_softc *sc, struct mbuf *m, uint32_t key)
>  {
>        uint16_t etype;
> -       uint32_t p = 0;
> +       uint32_t p = key;
>        int off;
>        struct ether_header *eh;
>        struct ether_vlan_header vlanbuf;
>        const struct ether_vlan_header *vlan;
>  #ifdef INET
>        const struct ip *ip;
> -       struct ip ipbuf;
> +       const uint32_t *ports;
> +       int iphlen;
>  #endif
>  #ifdef INET6
>        const struct ip6_hdr *ip6;
> -       struct ip6_hdr ip6buf;
>        uint32_t flow;
>  #endif
> +       union {
> +#ifdef INET
> +               struct ip ip;
> +#endif
> +#ifdef INET6
> +               struct ip6_hdr ip6;
> +#endif
> +               uint32_t port;
> +       } buf;
> +
>
[..]

-- 
wbr,
pluknet


More information about the svn-src-all mailing list