[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1304721894.11874.28.camel@Joe-Laptop>
Date: Fri, 06 May 2011 15:44:54 -0700
From: Joe Perches <joe@...ches.com>
To: David Miller <davem@...emloft.net>
Cc: netdev@...r.kernel.org, herbert@...dor.apana.org.au,
eric.dumazet@...il.com
Subject: Re: [PATCH 2/2] ipv4: Initialize on-stack cork more efficiently.
On Fri, 2011-05-06 at 15:26 -0700, David Miller wrote:
> ip_setup_cork() explicitly initializes every member of
> inet_cork except flags, addr, and opt. So we can simply
> set those three members to zero instead of using a
> memset() via an empty struct assignment.
> Signed-off-by: David S. Miller <davem@...emloft.net>
> diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
[]
> @@ -1417,6 +1417,9 @@ struct sk_buff *ip_make_skb(struct sock *sk,
>
> __skb_queue_head_init(&queue);
>
> + cork.flags = 0;
> + cork.addr = 0;
> + cork.opt = 0;
cork.opt = NULL;
> err = ip_setup_cork(sk, &cork, ipc, rtp);
> if (err)
> return ERR_PTR(err);
Perhaps it'd be better to move the initialization
of all cork fields to ip_setup_cork.
--
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