Netdev List
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Eric Dumazet <edumazet@google.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org, Yuchung Cheng <ycheng@google.com>,
	Neal Cardwell <ncardwell@google.com>,
	Christoph Paasch <christoph.paasch@uclouvain.be>
Subject: Re: [PATCH v3 net-next 1/3] ipv4: rename ip_options_echo to __ip_options_echo()
Date: Thu, 25 Sep 2014 13:30:08 -0700	[thread overview]
Message-ID: <1411677008.3460.7.camel@joe-AO725> (raw)
In-Reply-To: <1411676092-16196-2-git-send-email-edumazet@google.com>

On Thu, 2014-09-25 at 13:14 -0700, Eric Dumazet wrote:
> ip_options_echo() assumes struct ip_options is provided in &IPCB(skb)->opt
> Lets break this assumption, but provide a helper to not change all call points.
[]
> diff --git a/include/net/ip.h b/include/net/ip.h
[]
> @@ -511,7 +513,14 @@ int ip_forward(struct sk_buff *skb);
>   
>  void ip_options_build(struct sk_buff *skb, struct ip_options *opt,
>  		      __be32 daddr, struct rtable *rt, int is_frag);
> -int ip_options_echo(struct ip_options *dopt, struct sk_buff *skb);
> +
> +int __ip_options_echo(struct ip_options *dopt, struct sk_buff *skb,
> +		      const struct ip_options *sopt);

Thanks Eric.

Unrelated:

I wonder how much effort, if any, should be made to convert
struct sk_buff * to const struct sk_buff * where appropriate.

For instance:

This __ip_options_echo could use const struct sk_buff *skb
if fib_compute_spec_dst was changed to const struct sk_buff *skb.

  reply	other threads:[~2014-09-25 20:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-25 20:14 [PATCH v3 net-next 0/3] tcp: better TCP_SKB_CB layout Eric Dumazet
2014-09-25 20:14 ` [PATCH v3 net-next 1/3] ipv4: rename ip_options_echo to __ip_options_echo() Eric Dumazet
2014-09-25 20:30   ` Joe Perches [this message]
2014-09-25 20:38     ` Eric Dumazet
2014-09-25 20:49       ` Joe Perches
2014-09-26  5:29         ` Julia Lawall
2014-09-26  8:08           ` Joe Perches
2014-09-26  6:21         ` Julia Lawall
2014-09-25 20:14 ` [PATCH v3 net-next 2/3] ipv6: add a struct inet6_skb_parm param to ipv6_opt_accepted() Eric Dumazet
2014-09-25 20:14 ` [PATCH v3 net-next 3/3] tcp: better TCP_SKB_CB layout to reduce cache line misses Eric Dumazet
2014-09-27 16:46   ` Eric Dumazet

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=1411677008.3460.7.camel@joe-AO725 \
    --to=joe@perches.com \
    --cc=christoph.paasch@uclouvain.be \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=ncardwell@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=ycheng@google.com \
    /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