[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.02.1409260820470.2078@localhost6.localdomain6>
Date:	Fri, 26 Sep 2014 08:21:57 +0200 (CEST)
From:	Julia Lawall <julia.lawall@...6.fr>
To:	Joe Perches <joe@...ches.com>
cc:	Eric Dumazet <eric.dumazet@...il.com>,
	Eric Dumazet <edumazet@...gle.com>,
	"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
	Yuchung Cheng <ycheng@...gle.com>,
	Neal Cardwell <ncardwell@...gle.com>,
	Christoph Paasch <christoph.paasch@...ouvain.be>,
	Julia Lawall <julia.lawall@...6.fr>
Subject: Re: [PATCH v3 net-next 1/3] ipv4: rename ip_options_echo to
 __ip_options_echo()
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;
}
> 
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists
 
