From: "Denis V. Lunev" <den@sw.ru>
To: "Denis V. Lunev" <den@openvz.org>
Cc: davem@davemloft.net, devel@openvz.org, containers@lists.osdl.org,
netdev@vger.kernel.org
Subject: Re: [PATCH] No need to inc/dec packet_socks_nr if PACKET_REFCNT_DEBUG is not set
Date: Thu, 08 Nov 2007 13:51:30 +0300 [thread overview]
Message-ID: <4732EA32.6060105@sw.ru> (raw)
In-Reply-To: <20071108103731.GA22373@iris.sw.ru>
pls disregard this, Pavel have sent one similar already
Denis V. Lunev wrote:
> No need to inc/dec packet_socks_nr if PACKET_REFCNT_DEBUG is not set.
>
> Signed-off-by: Denis V. Lunev <den@openvz.org>
>
> --- ./net/packet/af_packet.c.packetrefcnt 2007-11-08 13:48:22.000000000 +0300
> +++ ./net/packet/af_packet.c 2007-11-08 13:54:29.000000000 +0300
> @@ -135,7 +135,9 @@ dev->hard_header == NULL (ll header is a
> packet classifier depends on it.
> */
>
> +#ifdef PACKET_REFCNT_DEBUG
> static atomic_t packet_socks_nr;
> +#endif
>
>
> /* Private packet socket structures. */
> @@ -232,8 +234,8 @@ static void packet_sock_destruct(struct
> return;
> }
>
> - atomic_dec(&packet_socks_nr);
> #ifdef PACKET_REFCNT_DEBUG
> + atomic_dec(&packet_socks_nr);
> printk(KERN_DEBUG "PACKET socket %p is free, %d are alive\n", sk, atomic_read(&packet_socks_nr));
> #endif
> }
> @@ -1005,7 +1007,9 @@ static int packet_create(struct net *net
> po->num = proto;
>
> sk->sk_destruct = packet_sock_destruct;
> +#ifdef PACKET_REFCNT_DEBUG
> atomic_inc(&packet_socks_nr);
> +#endif
>
> /*
> * Attach a protocol block
> -
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
prev parent reply other threads:[~2007-11-08 10:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-08 10:37 [PATCH] No need to inc/dec packet_socks_nr if PACKET_REFCNT_DEBUG is not set Denis V. Lunev
2007-11-08 10:51 ` Denis V. Lunev [this message]
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=4732EA32.6060105@sw.ru \
--to=den@sw.ru \
--cc=containers@lists.osdl.org \
--cc=davem@davemloft.net \
--cc=den@openvz.org \
--cc=devel@openvz.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.