Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Sep 2014 13:18:44 +0200
From:      Luigi Rizzo <rizzo@iet.unipi.it>
To:        Gleb Smirnoff <glebius@freebsd.org>
Cc:        "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "src-committers@freebsd.org" <src-committers@freebsd.org>
Subject:   Re: svn commit: r270874 - in head/sys: dev/netmap net
Message-ID:  <CA%2BhQ2%2BjEZxpDwPdpJkPTbOu1UDXZz6jesB189rACWWy3CceBCA@mail.gmail.com>
In-Reply-To: <201408311133.s7VBXJlv084881@svn.freebsd.org>
References:  <201408311133.s7VBXJlv084881@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Just noticed this.

I would appreciate if you and others could inform me _before_ touching
netmap-related stuff, and also, if you make changes make sure they are
visible to the preprocessor so i can use conditional compilations.

This is because this code is supposed to be the same on various FreeBSD
revisions
and Linux, and if each platform randomly changes its structures maintainance
becomes very hard

cheers
luigi


On Sun, Aug 31, 2014 at 1:33 PM, Gleb Smirnoff <glebius@freebsd.org> wrote:

> Author: glebius
> Date: Sun Aug 31 11:33:19 2014
> New Revision: 270874
> URL: http://svnweb.freebsd.org/changeset/base/270874
>
> Log:
>   Provide pointer from struct ifnet to struct netmap_adapter,
>   instead of abusing spare field.
>
> Modified:
>   head/sys/dev/netmap/netmap_kern.h
>   head/sys/net/if_var.h
>
> Modified: head/sys/dev/netmap/netmap_kern.h
>
> ==============================================================================
> --- head/sys/dev/netmap/netmap_kern.h   Sun Aug 31 10:42:52 2014
> (r270873)
> +++ head/sys/dev/netmap/netmap_kern.h   Sun Aug 31 11:33:19 2014
> (r270874)
> @@ -1187,7 +1187,7 @@ extern int netmap_generic_rings;
>   * WNA is used to write it.
>   */
>  #ifndef WNA
> -#define        WNA(_ifp)       (_ifp)->if_pspare[0]
> +#define        WNA(_ifp)       (_ifp)->if_netmap
>  #endif
>  #define        NA(_ifp)        ((struct netmap_adapter *)WNA(_ifp))
>
>
> Modified: head/sys/net/if_var.h
>
> ==============================================================================
> --- head/sys/net/if_var.h       Sun Aug 31 10:42:52 2014        (r270873)
> +++ head/sys/net/if_var.h       Sun Aug 31 11:33:19 2014        (r270874)
> @@ -67,6 +67,7 @@ struct  ifvlantrunk;
>  struct route;                  /* if_output */
>  struct vnet;
>  struct ifmedia;
> +struct netmap_adapter;
>
>  #ifdef _KERNEL
>  #include <sys/mbuf.h>          /* ifqueue only? */
> @@ -202,6 +203,7 @@ struct ifnet {
>         void    *if_pf_kif;             /* pf glue */
>         struct  carp_if *if_carp;       /* carp interface structure */
>         struct  label *if_label;        /* interface MAC label */
> +       struct  netmap_adapter *if_netmap; /* netmap(4) softc */
>
>         /* Various procedures of the layer2 encapsulation and drivers. */
>         int     (*if_output)            /* output routine (enqueue) */
>
>


-- 
-----------------------------------------+-------------------------------
 Prof. Luigi RIZZO, rizzo@iet.unipi.it  . Dip. di Ing. dell'Informazione
 http://www.iet.unipi.it/~luigi/        . Universita` di Pisa
 TEL      +39-050-2211611               . via Diotisalvi 2
 Mobile   +39-338-6809875               . 56122 PISA (Italy)
-----------------------------------------+-------------------------------



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2BhQ2%2BjEZxpDwPdpJkPTbOu1UDXZz6jesB189rACWWy3CceBCA>