Netdev List
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@lip6.fr>
To: Joe Perches <joe@perches.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>,
	Eric Dumazet <edumazet@google.com>,
	"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>,
	Julia Lawall <julia.lawall@lip6.fr>
Subject: Re: [PATCH v3 net-next 1/3] ipv4: rename ip_options_echo to __ip_options_echo()
Date: Fri, 26 Sep 2014 08:21:57 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.02.1409260820470.2078@localhost6.localdomain6> (raw)
In-Reply-To: <1411678163.3460.9.camel@joe-AO725>

On Thu, 25 Sep 2014, Joe Perches wrote:

> On Thu, 2014-09-25 at 13:38 -0700, Eric Dumazet wrote:
> > On Thu, 2014-09-25 at 13:30 -0700, Joe Perches wrote:
> > 
> > > 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.
> > 
> > Well, this seems something certainly doable, as a follow up ;)
> 
> It's doable, but it seems a non-trivial inspection task.
> 
> I believe coccinelle does not have the ability to automate this.

For example, can this function declare skb as const?  Or would one have to 
know that vde_user_write does not modify the contents of skb->data as 
well?

julia

static int vde_write(int fd, struct sk_buff *skb, struct uml_net_private 
*lp)
{
        struct vde_data *pri = (struct vde_data *) &lp->user;

        if (pri->conn != NULL)
                return vde_user_write((void *)pri->conn, skb->data,
                                      skb->len);

        printk(KERN_ERR "vde_write - we have no VDECONN to write to");
        return -EBADF;
}



> 
> 
> 

  parent reply	other threads:[~2014-09-26  6:22 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
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 [this message]
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=alpine.DEB.2.02.1409260820470.2078@localhost6.localdomain6 \
    --to=julia.lawall@lip6.fr \
    --cc=christoph.paasch@uclouvain.be \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=joe@perches.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