public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail•com>
To: Octavian Purdila <opurdila@ixiacom•com>
Cc: netdev@vger•kernel.org,
	Arnaldo Carvalho de Melo <acme@ghostprotocols•net>
Subject: Re: [net-next PATCH v2] llc enhancements
Date: Thu, 24 Dec 2009 09:35:31 +0100	[thread overview]
Message-ID: <4B3327D3.7080704@gmail.com> (raw)
In-Reply-To: <1261611934-24348-1-git-send-email-opurdila@ixiacom.com>

Le 24/12/2009 00:45, Octavian Purdila a écrit :
> This patch modifies the LLC code to scale the socket lookup code for a
> large number of interfaces and large number of sockets bound to the
> same SAP. We use it for STP traffic generation from a large number of
> virtual STP ports, via virtual network interfaces.
> 
> In the process we converted the socket lookup code and sap list to use
> RCU. It also contains some general cleanups (use dev_hard_header
> instead of handcrafting the headers) and enhancements (LLC_OPT_PKTINFO).
> 
> This is the 2nd version. Changes from the previous version:
> 
> - added SO_BINDTODEVICE support for faster bind operations
> - converted the socket lookup code and sap list to RCU
> - optimized multicast delivery ala Eric
> - remove some unused APIs (which should be private anyway)
> 
> Many thanks to Eric Dumazet for his continuous guidance and to Jarek
> Poplawski for spotting a locking bug in the previous version.
> 
> 

Pretty impressive work Octavian !

My only concerns (before drinking my coffee, I might be wrong...) are :

1) Patch 7/9 : __llc_lookup_established()
   Checking slot number is not enough I am afraid. A socket can be freed,
   re-allocated, inserted in another sap hash list on _same_ slot number.
   We dont have this problem with UDP/TCP since we have only
   one hash table on machine, but with llc, we might have many sap hash tables.

   So before if (llc_estab_match(sap, daddr, laddr, rc)) test, you probably
   need to check if we found a socket hashed on a different hash table and
   restart the lookup.

2) the WARN_ON() removal in patch 7/9 :

 void llc_sap_close(struct llc_sap *sap)
 {
-	WARN_ON(!hlist_nulls_empty(&sap->sk_list));
 	llc_del_sap(sap);
 	kfree(sap);
 }

I believe we should keep the sanity test some time, converted to sk_laddr_hash[] variant.

Thanks

  parent reply	other threads:[~2009-12-24  8:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-23 23:45 [net-next PATCH v2] llc enhancements Octavian Purdila
2009-12-23 23:45 ` [net-next PATCH v2 1/9] llc: use dev_hard_header Octavian Purdila
2009-12-23 23:45 ` [net-next PATCH v2 2/9] llc: add support for LLC_OPT_PKTINFO Octavian Purdila
2009-12-23 23:45 ` [net-next PATCH v2 3/9] llc: add support for SO_BINDTODEVICE Octavian Purdila
2009-12-23 23:45 ` [net-next PATCH v2 4/9] llc: convert the socket list to RCU locking Octavian Purdila
2009-12-23 23:45 ` [net-next PATCH v2 5/9] llc: optimize multicast delivery Octavian Purdila
2009-12-23 23:45 ` [net-next PATCH v2 6/9] llc: use a device based hash table to speed up " Octavian Purdila
2009-12-23 23:45 ` [net-next PATCH v2 7/9] llc: replace the socket list with a local address based hash Octavian Purdila
2009-12-23 23:45 ` [net-next PATCH v2 8/9] llc: convert llc_sap_list to RCU Octavian Purdila
2009-12-23 23:45 ` [net-next PATCH v2 9/9] llc: remove unused APIs (which should be private anyway) Octavian Purdila
2009-12-24  8:35 ` Eric Dumazet [this message]
2009-12-24 12:17   ` [net-next PATCH v2] llc enhancements Octavian Purdila
2009-12-26  1:11     ` David Miller

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=4B3327D3.7080704@gmail.com \
    --to=eric.dumazet@gmail$(echo .)com \
    --cc=acme@ghostprotocols$(echo .)net \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=opurdila@ixiacom$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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