Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Jan 2012 10:40:43 -0600
From:      Alan Cox <alc@rice.edu>
To:        Luigi Rizzo <luigi@FreeBSD.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r230572 - in head/sys/dev: ixgbe netmap
Message-ID:  <4F21820B.8040000@rice.edu>
In-Reply-To: <201201260955.q0Q9tG1m075353@svn.freebsd.org>
References:  <201201260955.q0Q9tG1m075353@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 01/26/2012 03:55, Luigi Rizzo wrote:
> Author: luigi
> Date: Thu Jan 26 09:55:16 2012
> New Revision: 230572
> URL: http://svn.freebsd.org/changeset/base/230572
>
> Log:
>    ixgbe changes:
>    - remove experimental code for disabling CRC
>    - use the correct constant for conversion between interrupt rate
>      and EITR values (the previous values were off by a factor of 2)
>    - make dev.ix.N.queueM.interrupt_rate a RW sysctl variable.
>      Changing individual values affects the queue immediately,
>      and propagates to all interfaces at the next reinit.
>    - add dev.ix.N.queueM.irqs rdonly sysctl, to export the actual
>      interrupt counts
>
>    Netmap-related changes for ixgbe:
>    - use the "new" format for TX descriptors in netmap mode.
>    - pass interrupt mitigation delays to the user process doing poll()
>      on a netmap file descriptor.
>      On the RX side this means we will not check the ring more than once
>      per interrupt. This gives the process a chance to sleep and process
>      packets in larger batches, thus reducing CPU usage.
>      On the TX side we take this even further: completed transmissions are
>      reclaimed every half ring even if the NIC interrupts more often.
>      This saves even more CPU without any additional tx delays.
>
>    Generic Netmap-related changes:
>    - align the netmap_kring to cache lines so that there is no false sharing
>      (possibly useful for multiqueue NICs and MSIX interrupts, which are
>      handled by different cores). It's a minor improvement but it does not
>      cost anything.
>
>    Reviewed by:	Jack Vogel
>    Approved by:	Jack Vogel
>
> Modified:
>    head/sys/dev/ixgbe/ixgbe.c
>    head/sys/dev/netmap/ixgbe_netmap.h
>    head/sys/dev/netmap/netmap.c
>    head/sys/dev/netmap/netmap_kern.h

*snip*

>
> Modified: head/sys/dev/netmap/netmap_kern.h
> ==============================================================================
> --- head/sys/dev/netmap/netmap_kern.h	Thu Jan 26 09:45:14 2012	(r230571)
> +++ head/sys/dev/netmap/netmap_kern.h	Thu Jan 26 09:55:16 2012	(r230572)
> @@ -65,13 +65,14 @@ struct netmap_kring {
>   	struct netmap_ring *ring;
>   	u_int nr_hwcur;
>   	int nr_hwavail;
> -	u_int nr_kflags;
> +	u_int nr_kflags;	/* private driver flags */
> +#define NKR_PENDINTR   0x1     // Pending interrupt.
>   	u_int nkr_num_slots;
>
>   	int	nkr_hwofs;	/* offset between NIC and netmap ring */
>   	struct netmap_adapter *na;	 // debugging
>   	struct selinfo si; /* poll/select wait queue */
> -};
> +} __attribute__((__aligned__(64)));

The machine-dependent param.h defines CACHE_LINE_SIZE for use in 
situations like this.

Alan




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4F21820B.8040000>