On 2014-11-11 19:35, Ciprian Barbu wrote:
> Signed-off-by: Ciprian Barbu <[email protected]>
> ---
>  platform/linux-netmap/README                      | 23 ++++++++++-------
>  platform/linux-netmap/include/odp_packet_netmap.h | 20 +++++++--------
>  platform/linux-netmap/odp_packet_netmap.c         | 30 
> +++++++++++------------
>  3 files changed, 39 insertions(+), 34 deletions(-)
> 
> diff --git a/platform/linux-netmap/README b/platform/linux-netmap/README
> index abcb187..3718072 100644
> --- a/platform/linux-netmap/README
> +++ b/platform/linux-netmap/README
> @@ -25,20 +25,18 @@ at runtime.
>  2.1 Building netmap
>  --------------------
>  
> -Netmap is currently hosted on https://code.google.com/p/netmap/ but
> -ODP only works at this point with netmap API version 10 so you will need
> -a specific revision of netmap.
> +Netmap is currently hosted on https://code.google.com/p/netmap/
>  
>      git clone https://code.google.com/p/netmap/
>      cd netmap
> -    git reset --hard 1f462ef
> +    git co v11.1
>  
>  Netmap consists of a core kernel module (netmap_lin.ko) and optional modified
>  device drivers.
>  
>  Netmap builds as an out-of-tree kernel module, you need matching kernel 
> sources
>  to compile it. General build instructions can be found in the packet README:
> -http://code.google.com/p/netmap/source/browse/README
> +https://code.google.com/p/netmap/source/browse/LINUX/README
>  
>  2.1.1 Building netmap on Ubuntu with stock kernel

Building netmap kernel modules on Ubuntu...

We build the kernel module and not the netmap...

>  
> @@ -56,12 +54,14 @@ You will need to locate it and extract it to a convenient 
> place.
>  Now compile netmap:

Its not manatory to build netmap kernel module before we build ODP.

>  
>      cd LINUX
> -    make SRC=<path_to_kernel_source>
> +    ./configure --kernel-sources=<path_to_kernel_src>
> +    make
>  
>  2.1.2 Building netmap for kernel built from sources
>  
>      cd LINUX
> -    make KSRC=<path_to_kernel_source>
> +    ./configure --kernel-dir=<path_to_kernel_tree>
> +    make
>  
>  2.2 Building ODP
>  ----------------
> @@ -69,13 +69,18 @@ Now compile netmap:
>  The default platform is linux-netmap, if you want linux-generic you need to
>  specify it to configure --with-platform.
>  
> +ODP works with the latest release version of netmap, which is currently at 
> API
> +version 11.1. There is one problem though, the default CFLAGS that ODP is 
> built
> +with contains -Werror=cast-qual. A temporary workaround is be to disable this
> +flag using -Wno-cast-qual.
> +
>  The --with-sdk-install-path can be used to point to the netmap sources.
>  
>      ./bootstrap
>  
> -    ./configure
> +    ./configure CFLAGS='-Wno-cast-qual'

The CFLAG should not be here, it should go into
platform/linux-netmap/Makefile.am

>  or
> -    ./configure --with-sdk-install-path=<netmap>
> +    ./configure --with-sdk-install-path=<netmap> CFLAGS='-Wno-cast-qual'
>  
>  To configure ODP for linux-generic:
>      ./configure --with-platform=linux-generic
> diff --git a/platform/linux-netmap/include/odp_packet_netmap.h 
> b/platform/linux-netmap/include/odp_packet_netmap.h
> index b4c523f..78b2379 100644
> --- a/platform/linux-netmap/include/odp_packet_netmap.h
> +++ b/platform/linux-netmap/include/odp_packet_netmap.h
> @@ -26,17 +26,17 @@
>  /** Packet socket using netmap mmaped rings for both Rx and Tx */
>  typedef struct {
>       odp_buffer_pool_t pool;
> -     size_t max_frame_len; /**< max frame len = buf_size - sizeof(pkt_hdr) */
> -     size_t frame_offset; /**< frame start offset from start of pkt buf */
> -     size_t buf_size; /**< size of buffer payload in 'pool' */
> -     struct nm_desc_t *nm_desc;
> -     uint32_t begin;
> -     uint32_t end;
> -     struct netmap_ring *rxring;
> -     struct netmap_ring *txring;
> -     odp_queue_t tx_access; /* Used for exclusive access to send packets */
> +     size_t max_frame_len;   /**< buf_size - sizeof(pkt_hdr) */
> +     size_t frame_offset;    /**< Frame start offset from start of pkt buf */
> +     size_t buf_size;        /**< Size of buffer payload in 'pool' */
> +     struct nm_desc *desc;   /**< Netmap meta-data for the device */
> +     uint32_t begin;         /**< First ring to poll */
> +     uint32_t end;           /**< Last ring to poll */
> +     struct netmap_ring *rxring; /**< First rx ring */
> +     struct netmap_ring *txring; /**< First tx ring */
> +     odp_queue_t tx_access;  /** Used for exclusive access to send packets */

Please be consistent you've used spaces and tabs between the variables
and comments.


Cheers,
Anders

_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to