netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Denis V. Lunev" <den@openvz.org>
To: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org, containers@lists.osdl.org
Subject: Re: [PATCH 2/11 net-2.6.26] [DCCP]: Replace socket with sock for reset sending.
Date: Fri, 28 Mar 2008 18:08:42 +0300	[thread overview]
Message-ID: <1206716922.4294.0.camel@iris.sw.ru> (raw)
In-Reply-To: <20080328143959.GT14945@ghostprotocols.net>

On Fri, 2008-03-28 at 11:39 -0300, Arnaldo Carvalho de Melo wrote:
> Em Fri, Mar 28, 2008 at 12:08:49PM +0300, Denis V. Lunev escreveu:
> > Replace dccp_v(4|6)_ctl_socket with sock to unify a code with TCP/ICMP.
> > 
> > Signed-off-by: Denis V. Lunev <den@openvz.org>
> > ---
> >  net/dccp/ipv4.c |   16 +++++++++-------
> >  net/dccp/ipv6.c |   10 ++++++----
> >  2 files changed, 15 insertions(+), 11 deletions(-)
> > 
> > diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c
> > index 4ca8b0c..79a9a4a 100644
> > --- a/net/dccp/ipv4.c
> > +++ b/net/dccp/ipv4.c
> > @@ -36,7 +36,7 @@
> >   * the Out-of-the-blue (OOTB) packets. A control sock will be created
> >   * for this socket at the initialization time.
> >   */
> > -static struct socket *dccp_v4_ctl_socket;
> > +static struct sock *dccp_v4_ctl_sk;
> >  
> >  int dccp_v4_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len)
> >  {
> > @@ -514,11 +514,11 @@ static void dccp_v4_ctl_send_reset(struct sock *sk, struct sk_buff *rxskb)
> >  	if (rxskb->rtable->rt_type != RTN_LOCAL)
> >  		return;
> >  
> > -	dst = dccp_v4_route_skb(dccp_v4_ctl_socket->sk, rxskb);
> > +	dst = dccp_v4_route_skb(dccp_v4_ctl_sk, rxskb);
> >  	if (dst == NULL)
> >  		return;
> >  
> > -	skb = dccp_ctl_make_reset(dccp_v4_ctl_socket, rxskb);
> > +	skb = dccp_ctl_make_reset(dccp_v4_ctl_sk->sk_socket, rxskb);
> 
> Why not make dccp_ctl_make_reset receive a struct sock too? It only uses
> ctl->sk anyway. But I guess that can be on a follow-up patch, could you
> that?

sure!

Thank you for pointing this out :)

Regards,
	Den


  reply	other threads:[~2008-03-28 15:08 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-28  9:04 [PATCH 0/11 net-2.6.16] unify control socket usage for protocols Denis V. Lunev
2008-03-28  9:08 ` [PATCH 1/11 net-2.6.26] [TCP]: Replace socket with sock for reset sending Denis V. Lunev
2008-03-28  9:08 ` [PATCH 2/11 net-2.6.26] [DCCP]: " Denis V. Lunev
     [not found]   ` <1206695338-5947-2-git-send-email-den-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
2008-03-28 14:39     ` Arnaldo Carvalho de Melo
2008-03-28 15:08       ` Denis V. Lunev [this message]
2008-03-28  9:08 ` [PATCH 3/11 net-2.6.26] [DCCP]: dccp_v(4|6)_ctl_socket is leaked Denis V. Lunev
     [not found]   ` <1206695338-5947-3-git-send-email-den-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
2008-03-28 14:44     ` Arnaldo Carvalho de Melo
2008-03-28 15:22       ` Denis V. Lunev
2008-03-28 16:47         ` Arnaldo Carvalho de Melo
     [not found]           ` <20080328164752.GX14945-f8uhVLnGfZaxAyOMLChx1axOck334EZe@public.gmane.org>
2008-03-28 17:09             ` Denis V. Lunev
2008-03-28 23:34               ` David Miller
2008-03-28  9:08 ` [PATCH 4/11 net-2.6.26] [SCTP]: Use inet_csk_ctl_sock_create for control socket creation Denis V. Lunev
2008-03-28  9:08 ` [PATCH 5/11 net-2.6.26] [SCTP]: Replace socket with sock for sctp_ctl_sock Denis V. Lunev
2008-03-28  9:08 ` [PATCH 6/11 net-2.6.26] [INET]: Let inet_csk_ctl_sock_create return sock rather than socket Denis V. Lunev
2008-03-28  9:08 ` [PATCH 7/11 net-2.6.26] [ICMP]: Simplify ICMP control socket creation Denis V. Lunev
     [not found]   ` <1206695338-5947-7-git-send-email-den-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
2008-03-28 14:47     ` Arnaldo Carvalho de Melo
2008-03-28  9:08 ` [PATCH 8/11 net-2.6.26] [INET]: uc_ttl assignment in inet_csk_ctl_sock_create is extra Denis V. Lunev
2008-03-28  9:08 ` [PATCH 9/11 net-2.6.26] [IPV6]: Simplify IPv6 control socket creation Denis V. Lunev
2008-03-28  9:08 ` [PATCH 10/11] [NETNS]: Create tcp control socket in the each namespace Denis V. Lunev
2008-03-28  9:08 ` [PATCH 11/11 net-2.6.26] [NETNS]: Use TCP control socket from a correct namespace Denis V. Lunev

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=1206716922.4294.0.camel@iris.sw.ru \
    --to=den@openvz.org \
    --cc=acme@redhat.com \
    --cc=containers@lists.osdl.org \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).