Linux Netfilter development
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Cc: netfilter-devel@vger.kernel.org, kaber@trash.net, pablo@netfilter.org
Subject: Re: [iptables PATCH] list: fix prefetch dummy
Date: Wed, 8 Apr 2015 17:18:25 -0700	[thread overview]
Message-ID: <20150408171825.40368215@urahara> (raw)
In-Reply-To: <20150406180541.7031.97131.stgit@nfdev2.cica.es>

On Mon, 06 Apr 2015 20:05:41 +0200
Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com> wrote:

> linux_list.h:381:59: warning: right-hand operand of comma expression has no effect [-Wunused-value]
>   for (pos = list_entry((head)->next, typeof(*pos), member), \
>                                                            ^
> libiptc.c:552:2: note: in expansion of macro 'list_for_each_entry'
>   list_for_each_entry(c, &h->chains, list) {
>   ^
> 
> [ Patch copied from one similar of Patrick McHardy on libnftnl ]
> 
> Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
> ---
>  libiptc/linux_list.h |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libiptc/linux_list.h b/libiptc/linux_list.h
> index abdcf88..559e33c 100644
> --- a/libiptc/linux_list.h
> +++ b/libiptc/linux_list.h
> @@ -27,7 +27,7 @@
>  	1; \
>  })
>  
> -#define prefetch(x)		1
> +#define prefetch(x)		((void)0)
>  
>  /* empty define to make this work in userspace -HW */
>  #define smp_wmb()
> 
> --
> To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

The kernel dropped the prefetch() in the list macros a couple
of years ago. The prefetch() had no performance gain and hurt
in several cases.

  parent reply	other threads:[~2015-04-09  0:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-06 18:05 [iptables PATCH] list: fix prefetch dummy Arturo Borrero Gonzalez
2015-04-07  0:38 ` Alexander Duyck
2015-04-07  8:37   ` Jan Engelhardt
2015-04-07 17:45     ` Alexander Duyck
2015-04-07 18:17       ` Jan Engelhardt
2015-04-07 19:29         ` Alexander Duyck
2015-04-08 17:04 ` Pablo Neira Ayuso
2015-04-09  0:18 ` Stephen Hemminger [this message]
2015-04-09 10:45   ` Pablo Neira Ayuso

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=20150408171825.40368215@urahara \
    --to=stephen@networkplumber.org \
    --cc=arturo.borrero.glez@gmail.com \
    --cc=kaber@trash.net \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox