netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Octavian Purdila <opurdila@ixiacom.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: netdev@vger.kernel.org,
	Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Subject: Re: [RFC PATCH] llc: convert the socket list to RCU locking (was Re: [PATCH 3/4] llc: use a device based hash table to speed up multicast delivery)
Date: Wed, 9 Dec 2009 23:49:26 +0200	[thread overview]
Message-ID: <200912092349.26264.opurdila@ixiacom.com> (raw)
In-Reply-To: <200912092236.06298.opurdila@ixiacom.com>

On Wednesday 09 December 2009 22:36:06 you wrote:
 
> I think I have everything  (in my head :) ) that I need now to come back
>  with a v2 llc patch set now. 

Hmm, not really :) I still can't see how we can do multicast delivery only with RCU when we need to restart the lookup.

I think you mentioned that it is actually possible to do this for UDP, but I didn't found out how :-?

Also, I think we need to restart the lookup even when only one list is used, when we found out that the object is either free or not the one we were looking for, since the current object might have been added to the end of the 
list, thus short circuiting our search. E.g.:

@@ -323,14 +323,16 @@ static struct sock *llc_lookup_dgram(struct llc_sap *sap,
        struct hlist_nulls_node *node;
 
        rcu_read_lock_bh();
+again:
        sk_nulls_for_each_rcu(rc, node, &sap->sk_list) {
+               if (llc_sk(rc)->sap != sap)
+                       goto again;
                if (llc_dgram_match(sap, laddr, rc)) {
                        /* Extra checks required by SLAB_DESTROY_BY_RCU */
                        if (unlikely(!atomic_inc_not_zero(&rc->sk_refcnt)))
-                               continue;
+                               goto again;
                        if (unlikely(!llc_dgram_match(sap, laddr, rc))) {
                                sock_put(rc);
-                               continue;
+                               goto again;
                        }
                        goto found;
                }

  reply	other threads:[~2009-12-09 21:52 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-03 22:31 [PATCH 0/4] llc enhancements Octavian Purdila
2009-12-03 22:31 ` [PATCH 1/4] llc: use dev_hard_header Octavian Purdila
2009-12-03 22:31 ` [PATCH 2/4] llc: add support for LLC_OPT_PKTINFO Octavian Purdila
2009-12-03 22:31 ` [PATCH 3/4] llc: use a device based hash table to speed up multicast delivery Octavian Purdila
2009-12-03 22:59   ` Eric Dumazet
2009-12-03 23:30     ` Octavian Purdila
2009-12-03 23:52       ` Eric Dumazet
2009-12-04  0:15         ` Octavian Purdila
2009-12-04  0:28           ` Eric Dumazet
2009-12-08 21:10         ` [RFC PATCH] llc: convert the socket list to RCU locking (was Re: [PATCH 3/4] llc: use a device based hash table to speed up multicast delivery) Octavian Purdila
2009-12-08 21:26           ` Eric Dumazet
2009-12-09 20:19           ` Eric Dumazet
2009-12-09 20:36             ` Octavian Purdila
2009-12-09 21:49               ` Octavian Purdila [this message]
2009-12-09 22:34                 ` Eric Dumazet
2009-12-09 20:52           ` Jarek Poplawski
2009-12-03 23:25   ` [PATCH 3/4] llc: use a device based hash table to speed up multicast delivery Stephen Hemminger
2009-12-03 23:53     ` Octavian Purdila
2009-12-04  0:37       ` Stephen Hemminger
2009-12-03 22:31 ` [PATCH 4/4] llc: replace the socket list with a local address based hash Octavian Purdila
2009-12-03 23:55 ` [PATCH 0/4] llc enhancements David Miller
2009-12-04  0:20   ` Octavian Purdila

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=200912092349.26264.opurdila@ixiacom.com \
    --to=opurdila@ixiacom.com \
    --cc=acme@ghostprotocols.net \
    --cc=eric.dumazet@gmail.com \
    --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).