All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: David Miller <davem@davemloft.net>,
	Patrick McHardy <kaber@trash.net>,
	netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH] macvlan: lockless tx path
Date: Wed, 10 Nov 2010 09:39:20 -0800	[thread overview]
Message-ID: <4CDAD8C8.20807@candelatech.com> (raw)
In-Reply-To: <1289403709.2860.216.camel@edumazet-laptop>

On 11/10/2010 07:41 AM, Eric Dumazet wrote:
> macvlan is a stacked device, like tunnels. We should use the lockless
> mechanism we are using in tunnels and loopback.
>
> This patch completely removes locking in TX path.
>
> tx stat counters are added into existing percpu stat structure, renamed
> from rx_stats to pcpu_stats.
>
> Note : this reverts commit 2c11455321f37 (macvlan: add multiqueue
> capability)
>
> Signed-off-by: Eric Dumazet<eric.dumazet@gmail.com>
> ---
>   drivers/net/macvlan.c      |   72 +++++++++++++----------------------
>   include/linux/if_macvlan.h |   26 +++++++-----
>   2 files changed, 43 insertions(+), 55 deletions(-)
>

> diff --git a/include/linux/if_macvlan.h b/include/linux/if_macvlan.h
> index 8a2fd66..3779b5f 100644
> --- a/include/linux/if_macvlan.h
> +++ b/include/linux/if_macvlan.h
> @@ -25,19 +25,23 @@ struct macvlan_port;
>   struct macvtap_queue;
>
>   /**
> - *	struct macvlan_rx_stats - MACVLAN percpu rx stats
> + *	struct macvlan_pcpu_stats - MACVLAN percpu stats
>    *	@rx_packets: number of received packets
>    *	@rx_bytes: number of received bytes
>    *	@rx_multicast: number of received multicast packets
> + *	@tx_

Minor nit..seems you missed a few there?

>    *	@syncp: synchronization point for 64bit counters
>    *	@rx_errors: number of errors
>    */
> -struct macvlan_rx_stats {
> +struct macvlan_pcpu_stats {
>   	u64			rx_packets;
>   	u64			rx_bytes;
>   	u64			rx_multicast;
> +	u64			tx_packets;
> +	u64			tx_bytes;
>   	struct u64_stats_sync	syncp;
>   	unsigned long		rx_errors;
> +	unsigned long		tx_dropped;

Any reason to not also make those u64?


Thanks,
Ben

-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


  reply	other threads:[~2010-11-10 17:39 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-10 15:41 [PATCH] macvlan: lockless tx path Eric Dumazet
2010-11-10 17:39 ` Ben Greear [this message]
2010-11-10 17:43   ` Eric Dumazet
2010-11-10 17:53     ` Ben Greear
2010-11-10 18:18       ` Eric Dumazet
2010-11-10 18:40         ` Ben Greear
2010-11-10 20:33           ` Eric Dumazet
2010-11-10 21:04             ` Ben Hutchings
2010-11-10 21:12               ` Eric Dumazet
2010-11-10 21:53                 ` Ben Hutchings
2010-11-10 21:35             ` Ben Greear
2010-11-10 22:21               ` Eric Dumazet
2010-11-10 22:53                 ` Ben Greear
2010-11-10 23:24                   ` Eric Dumazet
2010-11-10 23:36                   ` Eric Dumazet
2010-11-10 23:46                     ` Ben Greear
2010-11-11  7:03                       ` Eric Dumazet
2010-11-11 16:40                         ` Ben Greear
2010-11-11 16:56                           ` Eric Dumazet
2010-11-11 17:20                             ` Ben Greear
2010-11-11 18:02                               ` Eric Dumazet
2010-11-11 18:13                                 ` Ben Greear
2010-11-11 18:46                                   ` Eric Dumazet
2010-11-11  7:14     ` [PATCH net-next-2.6 v2] " Eric Dumazet
2010-11-12  8:20       ` Patrick McHardy
2010-11-16 18:59         ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CDAD8C8.20807@candelatech.com \
    --to=greearb@candelatech.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=kaber@trash.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.