linux/include/net/inet_hashtables.h
<<
6.393.4/spa > 3.4/form> 3.4a 6.393. href="../linux+v3.7.7/include/net/inet_hashtables.h">6.393.4img src="../.static/gfx/right.png" alt=">>">6.4/spa > 6.4spa class="lxr_search">6.396.393.4input typ> hidden" nam> navtarget" tion> ">6.393.4input typ> text" nam> search" id search">6.393.4butt/optyp> submit">Search 3.4/form> 4/spa > 6.4spa class="lxr_prefs"> 3.4a href="+prefs?return=include/net/inet_hashtables.h"6.393. onclick="return ajax_prefs();">6.393.Prefs 3.4/a>6.4/spa > 393. .4/div> 393. .4form ac ="ajax+*" method="post" onsubmit="return false;">6.4input typ> hidden" nam> ajax_lookup" id ajax_lookup" tion> ">6393. .4/form> 6393. .4div class="headingbott/m">
393.
393. 3. .4div id search_results" class="search_results" 3> 393. .4/div> 4div id content"> 4div id file_contents">

 L1">. .14/a>4spa  class="comment">/*4/spa >

 L2">. .24/a>4spa  class="comment"> * INET         An implementa5

 L3">. .34/a>4spa  class="comment"> *              opera5

 L4">. .44/a>4spa  class="comment"> *              interface as the meanspof communica5

 L5">. .54/a>4spa  class="comment"> *4/spa >

 L6">. .64/a>4spa  class="comment"> * Authors:     Lotsa people, from code originally in tcp4/spa >

 L7">. .74/a>4spa  class="comment"> *4/spa >

 L8">. .84/a>4spa  class="comment"> *      This program is free software; you ca  redistribute it and/or4/spa >

 L9">. .94/a>4spa  class="comment"> *      modify it under the termspof the GNU General Public License4/spa >

 L10">. .8.1a>4spa  class="comment"> *      as published by the Free Software Founda5

 L11">. 114/a>4spa  class="comment"> *      2pof the License, or (at your 5"
	  ) any later vers

 L12">. 124/a>4spa  class="comment"> */4/spa >

 L13">. 134/a>

 L14">. 144/a>#ifndef.4a href="+code=_INET_HASHTABLES_H" class="sref">_INET_HASHTABLES_H4/a>

 L15">. 154/a>#define.4a href="+code=_INET_HASHTABLES_H" class="sref">_INET_HASHTABLES_H4/a>

 L16">. 164/a>

 L17">. 174/a>

 L18">. 184/a>#include <linux/interrupt.h4/a>>

 L19">. 194/a>#include <linux/ip.h4/a>>

 L20">. 204/a>#include <linux/ipv6.h4/a>>

 L21">. 214/a>#include <linux/list.h4/a>>

 L22">. 224/a>#include <linux/slab.h4/a>>

 L23">. 234/a>#include <linux/socket.h4/a>>

 L24">. 244/a>#include <linux/spinlock.h4/a>>

 L25">. 254/a>#include <linux/typ>s.h4/a>>

 L26">. 264/a>#include <linux/wait.h4/a>>

 L27">. 274/a>#include <linux/vmalloc.h4/a>>

 L28">. 284/a>

 L29">. 294/a>#include <net/inet_connec
	  _sock.h4/a>>

 L30">. 304/a>#include <net/inet_sock.h4/a>>

 L31">. 314/a>#include <net/sock.h4/a>>

 L32">. 324/a>#include <net/route.h4/a>>

 L33">. 334/a>#include <net/tcp_stat>s.h4/a>>

 L34">. 344/a>#include <net/netns/hash.h4/a>>

 L35">. 354/a>

 L36">. 364/a>#include <linux/atomic.h4/a>>

 L37">. 374/a>#include <asm/byteorder.h4/a>>

 L38">. 384/a>

 L39">. 394/a>4spa  class="comment">/* This is for all connec
	  spwith a full identity, nopwildcards.4/spa >

 L40">. 48.1a>4spa  class="comment"> * One chain is dedica5ed to TIME_WAIT sockets.4/spa >

 L41">. 414/a>4spa  class="comment"> * I'll experimentpwith dynamic table growth later.4/spa >

 L42">. 424/a>4spa  class="comment"> */4/spa >

 L43">. 434/a>struct.4a href="+code=inet_ehash_bucket" class="sref">inet_ehash_bucket4/a> {

 L44">. 444/a>        struct.4a href="+code=hlist_nulls_head" class="sref">hlist_nulls_head4/a> 4a href="+code=chain" class="sref">chain4/a>;

 L45">. 454/a>        struct.4a href="+code=hlist_nulls_head" class="sref">hlist_nulls_head4/a> 4a href="+code=twchain" class="sref">twchain4/a>;

 L46">. 464/a>};

 L47">. 474/a>

 L48">. 484/a>4spa  class="comment">/* There are a few simple rules, which allow for local port reuse by4/spa >

 L49">. 494/a>4spa  class="comment"> * a  applica5

 L50">. 58.1a>4spa  class="comment"> *4/spa >

 L51">. 514/a>4spa  class="comment"> *      1) Sockets bound to differentpinterfaces may share a local port.4/spa >

 L52">. 524/a>4spa  class="comment"> *         Failst 2.4/spa >

 L53">. 534/a>4spa  class="comment"> *      2) If all sockets have sk->sk_reuse set, and none of them are io4/spa >

 L54">. 544/a>4spa  class="comment"> *         TCP_LISTEN stat>, the port may be shared.4/spa >

 L55">. 554/a>4spa  class="comment"> *         Failst 3.4/spa >

 L56">. 564/a>4spa  class="comment"> *      3) If all sockets are bound to a specific inet_sk(sk)->rcv_saddr local4/spa >

 L57">. 574/a>4spa  class="comment"> *         address, and none of them are the sam>, the port may be4/spa >

 L58">. 584/a>4spa  class="comment"> *         shared.4/spa >

 L59">. 594/a>4spa  class="comment"> *         Fail

 L60">. 68.1a>4spa  class="comment"> *4/spa >

 L61">. 614/a>4spa  class="comment"> * Thepinter>stst #2.  This is what a  FTP server does4/spa >

 L62">. 624/a>4spa  class="comment"> * all day.  To 5"
	mize this case we use a specific flag bit defined4/spa >

 L63">. 634/a>4spa  class="comment"> * below.  As we add sockets to a bind bucket list, we perform a4/spa >

 L64">. 644/a>4spa  class="comment"> * check of: (newsk->sk_reuse && (newsk->sk_stat> != TCP_LISTEN))4/spa >

 L65">. 654/a>4spa  class="comment"> * As long as all sockets added to a bind bucket pass this t>st,4/spa >

 L66">. 664/a>4spa  class="comment"> * the flag bit will be set.4/spa >

 L67">. 674/a>4spa  class="comment"> * Thepresult

 L68">. 684/a>4spa  class="comment"> * for this flag bit, if it is set and the socket try

 L69">. 694/a>4spa  class="comment"> * sk->sk_reuse set, we don't even have to walk the owners list at all,4/spa >

 L70">. 78.1a>4spa  class="comment"> * wepreturn that it is ok to bind this socket to the requ>sted local port.4/spa >

 L71">. 714/a>4spa  class="comment"> *4/spa >

 L72">. 724/a>4spa  class="comment"> * Sounds like a lot of work, but it is worth it.  In a more naive4/spa >

 L73">. 734/a>4spa  class="comment"> * implementa5

 L74">. 744/a>4spa  class="comment"> * must be walked for each data port opened by a  ftp server.  Needless4/spa >

 L75">. 754/a>4spa  class="comment"> * to say, this does not scale at all.  With a couple thousand FTP4/spa >

 L76">. 764/a>4spa  class="comment"> * users logged onto your box, isn't it nice to know that new data4/spa >

 L77">. 774/a>4spa  class="comment"> * ports are crea5ed in O(1) time?  I thought so. ;-)   -DaveM4/spa >

 L78">. 784/a>4spa  class="comment"> */4/spa >

 L79">. 794/a>struct.4a href="+code=inet_bind_bucket" class="sref">inet_bind_bucket4/a> {

 L80">. 804/a>#ifdef.4a href="+code=CONFIG_NET_NS" class="sref">CONFIG_NET_NS4/a>

 L81">. 814/a>        struct.4a href="+code=net" class="sref">net4/a>              *4a href="+code=ib_net" class="sref">ib_net4/a>;

 L82">. 824/a>#endif

 L83">. 834/a>        unsigned short          4a href="+code=port" class="sref">port4/a>;

 L84">. 844/a>        signed short            4a href="+code=fastreuse" class="sref">fastreuse4/a>;

 L85">. 854/a>        int                     4a href="+code=num_owners" class="sref">num_owners4/a>;

 L86">. 864/a>        struct.4a href="+code=hlist_node" class="sref">hlist_node4/a>       4a href="+code=node" class="sref">node4/a>;

 L87">. 874/a>        struct.4a href="+code=hlist_head" class="sref">hlist_head4/a>       4a href="+code=owners" class="sref">owners4/a>;

 L88">. 884/a>};

 L89">. 894/a>

 L90">. 904/a>static.4a href="+code=inline" class="sref">inline4/a> struct.4a href="+code=net" class="sref">net4/a> *4a href="+code=ib_net" class="sref">ib_net4/a>(struct.4a href="+code=inet_bind_bucket" class="sref">inet_bind_bucket4/a> *4a href="+code=ib" class="sref">ib4/a>)

 L91">. 914/a>{

 L92">. 924/a>        return 4a href="+code=read_pnet" class="sref">read_pnet4/a>(&4a href="+code=ib" class="sref">ib4/a>->4a href="+code=ib_net" class="sref">ib_net4/a>);

 L93">. 934/a>}

 L94">. 944/a>

 L95">. 954/a>#define.4a href="+code=inet_bind_bucket_for_each" class="sref">inet_bind_bucket_for_each4/a>(4a href="+code=tb" class="sref">tb4/a>, 4a href="+code=pos" class="sref">pos4/a>, 4a href="+code=head" class="sref">head4/a>) \

 L96">. 964/a>        4a href="+code=hlist_for_each_entry" class="sref">hlist_for_each_entry4/a>(4a href="+code=tb" class="sref">tb4/a>, 4a href="+code=pos" class="sref">pos4/a>, 4a href="+code=head" class="sref">head4/a>, 4a href="+code=node" class="sref">node4/a>)

 L97">. 974/a>

 L98">. 984/a>struct.4a href="+code=inet_bind_hashbucket" class="sref">inet_bind_hashbucket4/a> {

 L99">. 994/a>        4a href="+code=spinlock_t" class="sref">spinlock_t4/a>              4a href="+code=lock" class="sref">lock4/a>;

 L100">.1004/a>        struct.4a href="+code=hlist_head" class="sref">hlist_head4/a>       4a href="+code=chain" class="sref">chain4/a>;

 L101">.1014/a>};

 L102">.1024/a>

 L103">.1034/a>4spa  class="comment">/*4/spa >

 L104">.1044/a>4spa  class="comment"> * Sockets ca  be hashed in established or listen

 L105">.1054/a>4spa  class="comment"> * We must use differentp'nulls' end-of-chain tion> for listen

 L106">.1064/a>4spa  class="comment"> * hash table, or we might find a socket that was closed and4/spa >

 L107">.1074/a>4spa  class="comment"> * realloca5ed/inser5ed into established hash table4/spa >

 L108">.1084/a>4spa  class="comment"> */4/spa >

 L109">.1094/a>#define.4a href="+code=LISTENING_NULLS_BASE" class="sref">LISTENING_NULLS_BASE4/a> (1U << 29)

 L110">.1104/a>struct.4a href="+code=inet_listen_hashbucket" class="sref">inet_listen_hashbucket4/a> {

 L111">.1114/a>        4a href="+code=spinlock_t" class="sref">spinlock_t4/a>              4a href="+code=lock" class="sref">lock4/a>;

 L112">.1124/a>        struct.4a href="+code=hlist_nulls_head" class="sref">hlist_nulls_head4/a> 4a href="+code=head" class="sref">head4/a>;

 L113">.1134/a>};

 L114">.1144/a>

 L115">.1154/a>4spa  class="comment">/* This is for listen

 L116">.1164/a>#define.4a href="+code=INET_LHTABLE_SIZE" class="sref">INET_LHTABLE_SIZE4/a>       32      4spa  class="comment">/* Yes, really, this is all you need. */4/spa >

 L117">.1174/a>

 L118">.1184/a>struct.4a href="+code=inet_hashinfo" class="sref">inet_hashinfo4/a> {

 L119">.1194/a>        4spa  class="comment">/* This is for sockets with full identity only.  Sockets here will4/spa >

 L120">.128.1a>4spa  class="comment">         * always be withoutpwildcards and will have the follow

 L121">.1214/a>4spa  class="comment">         *4/spa >

 L122">.1224/a>4spa  class="comment">         *          TCP_ESTABLISHED <= sk->sk_stat> < TCP_CLOSE4/spa >

 L123">.1234/a>4spa  class="comment">         *4/spa >

 L124">.1244/a>4spa  class="comment">         * TIME_WAIT sockets use a separat> chain (twchain).4/spa >

 L125">.1254/a>4spa  class="comment">         */4/spa >

 L126">.1264/a>        struct.4a href="+code=inet_ehash_bucket" class="sref">inet_ehash_bucket4/a>        *4a href="+code=ehash" class="sref">ehash4/a>;

 L127">.1274/a>        4a href="+code=spinlock_t" class="sref">spinlock_t4/a>                      *4a href="+code=ehash_locks" class="sref">ehash_locks4/a>;

 L128">.1284/a>        unsigned int                    4a href="+code=ehash_mask" class="sref">ehash_mask4/a>;

 L129">.1294/a>        unsigned int                    4a href="+code=ehash_locks_mask" class="sref">ehash_locks_mask4/a>;

 L130">.1304/a>

 L131">.1314/a>        4spa  class="comment">/* Ok, let's try this, I give up, we do need a local bind

 L132">.1324/a>4spa  class="comment">         * TCP hash as well as the others for fast bind/connec
.4/spa >

 L133">.1334/a>4spa  class="comment">         */4/spa >

 L134">.1344/a>        struct.4a href="+code=inet_bind_hashbucket" class="sref">inet_bind_hashbucket4/a>     *4a href="+code=bhash" class="sref">bhash4/a>;

 L135">.1354/a>

 L136">.1364/a>        unsigned int                    4a href="+code=bhash_size" class="sref">bhash_size4/a>;

 L137">.1374/a>        4spa  class="comment">/* 4 bytes hole on 64 bit */4/spa >

 L138">.1384/a>

 L139">.1394/a>        struct.4a href="+code=kmem_cache" class="sref">kmem_cache4/a>               *4a href="+code=bind_bucket_cachep" class="sref">bind_bucket_cachep4/a>;

 L140">.1404/a>

 L141">.1414/a>        4spa  class="comment">/* All the above members are written once at bootup and4/spa >

 L142">.1424/a>4spa  class="comment">         * never written again _or_ are predominantly read-access.4/spa >

 L143">.1434/a>4spa  class="comment">         *4/spa >

 L144">.1444/a>4spa  class="comment">         * Now align to a new cache line as all the follow

 L145">.1454/a>4spa  class="comment">         * might be often dirty.4/spa >

 L146">.1464/a>4spa  class="comment">         */4/spa >

 L147">.1474/a>        4spa  class="comment">/* All sockets in TCP_LISTEN stat> will be in here.  This is the only4/spa >

 L148">.1484/a>4spa  class="comment">         * table where wildcard'd TCP sockets ca  exist.  Hash func
	   here4/spa >

 L149">.1494/a>4spa  class="comment">         * is just local port number.4/spa >

 L150">.158.1a>4spa  class="comment">         */4/spa >

 L151">.1514/a>        struct.4a href="+code=inet_listen_hashbucket" class="sref">inet_listen_hashbucket4/a>   4a href="+code=listenlisten[4a href="+code=INET_LHTABLE_SIZE" class="sref">INET_LHTABLE_SIZE4/a>]

 L152">.1524/a>                                        4a href="+code=____cacheline_aligned_in_smp" class="sref">____cacheline_aligned_in_smp4/a>;

 L153">.1534/a>

 L154">.1544/a>        4a href="+code=atomic_t" class="sref">atomic_t4/a>                        4a href="+code=bsockets" class="sref">bsockets4/a>;

 L155">.1554/a>};

 L156">.1564/a>

 L157">.1574/a>static.4a href="+code=inline" class="sref">inline4/a> struct.4a href="+code=inet_ehash_bucket" class="sref">inet_ehash_bucket4/a> *4a href="+code=inet_ehash_bucket" class="sref">inet_ehash_bucket4/a>(

 L158">.1584/a>        struct.4a href="+code=inet_hashinfo" class="sref">inet_hashinfo4/a> *4a href="+code=hashinfo" class="sref">hashinfo4/a>,

 L159">.1594/a>        unsigned int 4a href="+code=hash" class="sref">hash4/a>)

 L160">.168.1a>{

 L161">.1614/a>        return &4a href="+code=hashinfo" class="sref">hashinfo4/a>->4a href="+code=ehash" class="sref">ehash4/a>[4a href="+code=hash" class="sref">hash4/a> & 4a href="+code=hashinfo" class="sref">hashinfo4/a>->4a href="+code=ehash_mask" class="sref">ehash_mask4/a>];

 L162">.1624/a>}

 L163">.1634/a>

 L164">.1644/a>static.4a href="+code=inline" class="sref">inline4/a> 4a href="+code=spinlock_t" class="sref">spinlock_t4/a> *4a href="+code=inet_ehash_lockp" class="sref">inet_ehash_lockp4/a>(

 L165">.1654/a>        struct.4a href="+code=inet_hashinfo" class="sref">inet_hashinfo4/a> *4a href="+code=hashinfo" class="sref">hashinfo4/a>,

 L166">.1664/a>        unsigned int 4a href="+code=hash" class="sref">hash4/a>)

 L167">.1674/a>{

 L168">.1684/a>        return &4a href="+code=hashinfo" class="sref">hashinfo4/a>->4a href="+code=ehash_locks" class="sref">ehash_locks4/a>[4a href="+code=hash" class="sref">hash4/a> & 4a href="+code=hashinfo" class="sref">hashinfo4/a>->4a href="+code=ehash_locks_mask" class="sref">ehash_locks_mask4/a>];

 L169">.1694/a>}

 L170">.1704/a>

 L171">.1714/a>static.4a href="+code=inline" class="sref">inline4/a> int 4a href="+code=inet_ehash_locks_alloc" class="sref">inet_ehash_locks_alloc4/a>(struct.4a href="+code=inet_hashinfo" class="sref">inet_hashinfo4/a> *4a href="+code=hashinfo" class="sref">hashinfo4/a>)

 L172">.1724/a>{

 L173">.1734/a>        unsigned int 4a href="+code=i" class="sref">i4/a>, 4a href="+code=size" class="sref">size4/a> = 256;

 L174">.1744/a>#if 4a href="+code=defined" class="sref">defined4/a>(4a href="+code=CONFIG_PROVE_LOCKING" class="sref">CONFIG_PROVE_LOCKING4/a>)

 L175">.1754/a>        unsigned int 4a href="+code=nr_pcpus" class="sref">nr_pcpus4/a> = 2;

 L176">.1764/a>#else

 L177">.1774/a>        unsigned int 4a href="+code=nr_pcpus" class="sref">nr_pcpus4/a> = 4a href="+code=num_possible_cpus" class="sref">num_possible_cpus4/a>();

 L178">.1784/a>#endif

 L179">.1794/a>        if (4a href="+code=nr_pcpus" class="sref">nr_pcpus4/a> >= 4)

 L180">.1804/a>                4a href="+code=size" class="sref">size4/a> = 512;

 L181">.1814/a>        if (4a href="+code=nr_pcpus" class="sref">nr_pcpus4/a> >= 8)

 L182">.1824/a>                4a href="+code=size" class="sref">size4/a> = 1024;

 L183">.1834/a>        if (4a href="+code=nr_pcpus" class="sref">nr_pcpus4/a> >= 16)

 L184">.1844/a>                4a href="+code=size" class="sref">size4/a> = 2048;

 L185">.1854/a>        if (4a href="+code=nr_pcpus" class="sref">nr_pcpus4/a> >= 32)

 L186">.1864/a>                4a href="+code=size" class="sref">size4/a> = 4096;

 L187">.1874/a>        if (sizeof(4a href="+code=spinlock_t" class="sref">spinlock_t4/a>) != 0) {

 L188">.1884/a>#ifdef.4a href="+code=CONFIG_NUMA" class="sref">CONFIG_NUMA4/a>

 L189">.1894/a>                if (4a href="+code=size" class="sref">size4/a> * sizeof(4a href="+code=spinlock_t" class="sref">spinlock_t4/a>) >.4a href="+code=PAGE_SIZE" class="sref">PAGE_SIZE4/a>)

 L190">.1904/a>                        4a href="+code=hashinfo" class="sref">hashinfo4/a>->4a href="+code=ehash_locks" class="sref">ehash_locks4/a> = 4a href="+code=vmalloc" class="sref">vmalloc4/a>(4a href="+code=size" class="sref">size4/a> * sizeof(4a href="+code=spinlock_t" class="sref">spinlock_t4/a>));

 L191">.1914/a>                else

 L192">.1924/a>#endif

 L193">.1934/a>                4a href="+code=hashinfo" class="sref">hashinfo4/a>->4a href="+code=ehash_locks" class="sref">ehash_locks4/a> = 4a href="+code=kmalloc" class="sref">kmalloc4/a>(4a href="+code=size" class="sref">size4/a> * sizeof(4a href="+code=spinlock_t" class="sref">spinlock_t4/a>),

 L194">.1944/a>                                                4a href="+code=GFP_KERNEL" class="sref">GFP_KERNEL4/a>);

 L195">.1954/a>                if (!4a href="+code=hashinfo" class="sref">hashinfo4/a>->4a href="+code=ehash_locks" class="sref">ehash_locks4/a>)

 L196">.1964/a>                        return 4a href="+code=ENOMEM" class="sref">ENOMEM4/a>;

 L197">.1974/a>                for (4a href="+code=i" class="sref">i4/a> = 0;.4a href="+code=i" class="sref">i4/a> < 4a href="+code=size" class="sref">size4/a>;.4a href="+code=i" class="sref">i4/a>++)

 L198">.1984/a>                        4a href="+code=spin_lock_init" class="sref">spin_lock_init4/a>(&4a href="+code=hashinfo" class="sref">hashinfo4/a>->4a href="+code=ehash_locks" class="sref">ehash_locks4/a>[4a href="+code=i" class="sref">i4/a>]);

 L199">.1994/a>        }

 L200">.2004/a>        4a href="+code=hashinfo" class="sref">hashinfo4/a>->4a href="+code=ehash_locks_mask" class="sref">ehash_locks_mask4/a> = 4a href="+code=size" class="sref">size4/a> - 1;

 L201">.2014/a>        return 0;

 L202">.2024/a>}

 L203">.2034/a>

 L204">.2044/a>static.4a href="+code=inline" class="sref">inline4/a> void 4a href="+code=inet_ehash_locks_free" class="sref">inet_ehash_locks_free4/a>(struct.4a href="+code=inet_hashinfo" class="sref">inet_hashinfo4/a> *4a href="+code=hashinfo" class="sref">hashinfo4/a>)

 L205">.2054/a>{

 L206">.2064/a>        if (4a href="+code=hashinfo" class="sref">hashinfo4/a>->4a href="+code=ehash_locks" class="sref">ehash_locks4/a>) {

 L207">.2074/a>#ifdef.4a href="+code=CONFIG_NUMA" class="sref">CONFIG_NUMA4/a>

 L208">.2084/a>                unsigned int 4a href="+code=size" class="sref">size4/a> = (4a href="+code=hashinfo" class="sref">hashinfo4/a>->4a href="+code=ehash_locks_mask" class="sref">ehash_locks_mask4/a> + 1) *

 L209">.2094/a>                                                        sizeof(4a href="+code=spinlock_t" class="sref">spinlock_t4/a>);

 L210">.2104/a>                if (4a href="+code=size" class="sref">size4/a> >.4a href="+code=PAGE_SIZE" class="sref">PAGE_SIZE4/a>)

 L211">.2114/a>                        4a href="+code=vfree" class="sref">vfree4/a>(4a href="+code=hashinfo" class="sref">hashinfo4/a>->4a href="+code=ehash_locks" class="sref">ehash_locks4/a>);

 L212">.2124/a>                else

 L213">.2134/a>#endif

 L214">.2144/a>                4a href="+code=kfree" class="sref">kfree4/a>(4a href="+code=hashinfo" class="sref">hashinfo4/a>->4a href="+code=ehash_locks" class="sref">ehash_locks4/a>);

 L215">.2154/a>                4a href="+code=hashinfo" class="sref">hashinfo4/a>->4a href="+code=ehash_locks" class="sref">ehash_locks4/a> = 4a href="+code=NULL" class="sref">NULL4/a>;

 L216">.2164/a>        }

 L217">.2174/a>}

 L218">.2184/a>

 L219">.2194/a>extern struct.4a href="+code=inet_bind_bucket" class="sref">inet_bind_bucket4/a> *

 L220">.2204/a>                    4a href="+code=inet_bind_bucket_crea5e" class="sref">inet_bind_bucket_crea5e4/a>(struct.4a href="+code=kmem_cache" class="sref">kmem_cache4/a> *4a href="+code=cachep" class="sref">cachep4/a>,

 L221">.2214/a>                                            struct.4a href="+code=net" class="sref">net4/a> *4a href="+code=net" class="sref">net4/a>,

 L222">.2224/a>                                            struct.4a href="+code=inet_bind_hashbucket" class="sref">inet_bind_hashbucket4/a> *4a href="+code=head" class="sref">head4/a>,

 L223">.2234/a>                                            const unsigned short 4a href="+code=snum" class="sref">snum4/a>);

 L224">.2244/a>extern void 4a href="+code=inet_bind_bucket_destroy" class="sref">inet_bind_bucket_destroy4/a>(struct.4a href="+code=kmem_cache" class="sref">kmem_cache4/a> *4a href="+code=cachep" class="sref">cachep4/a>,

 L225">.2254/a>                                     struct.4a href="+code=inet_bind_bucket" class="sref">inet_bind_bucket4/a> *4a href="+code=tb" class="sref">tb4/a>);

 L226">.2264/a>

 L227">.2274/a>static.4a href="+code=inline" class="sref">inline4/a> int 4a href="+code=inet_bhashfn" class="sref">inet_bhashfn4/a>(struct.4a href="+code=net" class="sref">net4/a> *4a href="+code=net" class="sref">net4/a>,

 L228">.2284/a>                const 4a href="+code=__u16" class="sref">__u164/a> 4a href="+code=lport" class="sref">lport4/a>, const int 4a href="+code=bhash_size" class="sref">bhash_size4/a>)

 L229">.2294/a>{

 L230">.2304/a>        return (4a href="+code=lport" class="sref">lport4/a> +.4a href="+code=net_hash_mix" class="sref">net_hash_mix4/a>(4a href="+code=net" class="sref">net4/a>)) & (4a href="+code=bhash_size" class="sref">bhash_size4/a> - 1);

 L231">.2314/a>}

 L232">.2324/a>

 L233">.2334/a>extern void 4a href="+code=inet_bind_hash" class="sref">inet_bind_hash4/a>(struct.4a href="+code=sock" class="sref">sock4/a> *4a href="+code=sk" class="sref">sk4/a>, struct.4a href="+code=inet_bind_bucket" class="sref">inet_bind_bucket4/a> *4a href="+code=tb" class="sref">tb4/a>,

 L234">.2344/a>                           const unsigned short 4a href="+code=snum" class="sref">snum4/a>);

 L235">.2354/a>

 L236">.2364/a>4spa  class="comment">/* These ca  have wildcards, don't try too hard. */4/spa >

 L237">.2374/a>static.4a href="+code=inline" class="sref">inline4/a> int 4a href="+code=inet_lhashfn" class="sref">inet_lhashfn4/a>(struct.4a href="+code=net" class="sref">net4/a> *4a href="+code=net" class="sref">net4/a>, const unsigned short 4a href="+code=num" class="sref">num4/a>)

 L238">.2384/a>{

 L239">.2394/a>        return (4a href="+code=num" class="sref">num4/a> +.4a href="+code=net_hash_mix" class="sref">net_hash_mix4/a>(4a href="+code=net" class="sref">net4/a>)) & (4a href="+code=INET_LHTABLE_SIZE" class="sref">INET_LHTABLE_SIZE4/a> - 1);

 L240">.2404/a>}

 L241">.2414/a>

 L242">.2424/a>static.4a href="+code=inline" class="sref">inline4/a> int 4a href="+code=inet_sk_listen_hashfn" class="sref">inet_sk_listen_hashfn4/a>(const struct.4a href="+code=sock" class="sref">sock4/a> *4a href="+code=sk" class="sref">sk4/a>)

 L243">.2434/a>{

 L244">.2444/a>        return 4a href="+code=inet_lhashfn" class="sref">inet_lhashfn4/a>(4a href="+code=sock_net" class="sref">sock_net4/a>(4a href="+code=sk" class="sref">sk4/a>), 4a href="+code=inet_sk" class="sref">inet_sk4/a>(4a href="+code=sk" class="sref">sk4/a>)->4a href="+code=inet_num" class="sref">inet_num4/a>);

 L245">.2454/a>}

 L246">.2464/a>

 L247">.2474/a>4spa  class="comment">/* Caller must disable local BH processing. */4/spa >

 L248">.2484/a>extern int 4a href="+code=__inet_inherit_port" class="sref">__inet_inherit_port4/a>(struct.4a href="+code=sock" class="sref">sock4/a> *4a href="+code=sk" class="sref">sk4/a>, struct.4a href="+code=sock" class="sref">sock4/a> *4a href="+code=child" class="sref">child4/a>);

 L249">.2494/a>

 L250">.258.1a>extern void 4a href="+code=inet_put_port" class="sref">inet_put_port4/a>(struct.4a href="+code=sock" class="sref">sock4/a> *4a href="+code=sk" class="sref">sk4/a>);

 L251">.2514/a>

 L252">.2524/a>void 4a href="+code=inet_hashinfo_init" class="sref">inet_hashinfo_init4/a>(struct.4a href="+code=inet_hashinfo" class="sref">inet_hashinfo4/a> *4a href="+code=h" class="sref">h4/a>);

 L253">.2534/a>

 L254">.2544/a>extern int 4a href="+code=__inet_hash_nolisten" class="sref">__inet_hash_nolisten4/a>(struct.4a href="+code=sock" class="sref">sock4/a> *4a href="+code=sk" class="sref">sk4/a>, struct.4a href="+code=inet_timewait_sock" class="sref">inet_timewait_sock4/a> *4a href="+code=tw" class="sref">tw4/a>);

 L255">.2554/a>extern void 4a href="+code=inet_hash" class="sref">inet_hash4/a>(struct.4a href="+code=sock" class="sref">sock4/a> *4a href="+code=sk" class="sref">sk4/a>);

 L256">.2564/a>extern void 4a href="+code=inet_unhash" class="sref">inet_unhash4/a>(struct.4a href="+code=sock" class="sref">sock4/a> *4a href="+code=sk" class="sref">sk4/a>);

 L257">.2574/a>

 L258">.2584/a>extern struct.4a href="+code=sock" class="sref">sock4/a> *4a href="+code=__inet_lookup_listener" class="sref">__inet_lookup_listener4/a>(struct.4a href="+code=net" class="sref">net4/a> *4a href="+code=net" class="sref">net4/a>,

 L259">.2594/a>                                           struct.4a href="+code=inet_hashinfo" class="sref">inet_hashinfo4/a> *4a href="+code=hashinfo" class="sref">hashinfo4/a>,

 L260">.2604/a>                                           const 4a href="+code=__be32" class="sref">__be324/a> 4a href="+code=daddr" class="sref">daddr4/a>,

 L261">.2614/a>                                           const unsigned short 4a href="+code=hnum" class="sref">hnum4/a>,

 L262">.2624/a>                                           const int 4a href="+code=dif" class="sref">dif4/a>);

 L263">.2634/a>

 L264">.2644/a>static.4a href="+code=inline" class="sref">inline4/a> struct.4a href="+code=sock" class="sref">sock4/a> *4a href="+code=inet_lookup_listener" class="sref">inet_lookup_listener4/a>(struct.4a href="+code=net" class="sref">net4/a> *4a href="+code=net" class="sref">net4/a>,

 L265">.2654/a>                struct.4a href="+code=inet_hashinfo" class="sref">inet_hashinfo4/a> *4a href="+code=hashinfo" class="sref">hashinfo4/a>,

 L266">.2664/a>                4a href="+code=__be32" class="sref">__be324/a> 4a href="+code=daddr" class="sref">daddr4/a>, 4a href="+code=__be16" class="sref">__be164/a> 4a href="+code=dport" class="sref">dport4/a>, int 4a href="+code=dif" class="sref">dif4/a>)

 L267">.2674/a>{

 L268">.2684/a>        return 4a href="+code=__inet_lookup_listener" class="sref">__inet_lookup_listener4/a>(4a href="+code=net" class="sref">net4/a>, 4a href="+code=hashinfo" class="sref">hashinfo4/a>, 4a href="+code=daddr" class="sref">daddr4/a>, 4a href="+code=ntohs" class="sref">ntohs4/a>(4a href="+code=dport" class="sref">dport4/a>), 4a href="+code=dif" class="sref">dif4/a>);

 L269">.2694/a>}

 L270">.2704/a>

 L271">.2714/a>4spa  class="comment">/* Socket demux engine toys. */4/spa >

 L272">.2724/a>4spa  class="comment">/* What happens here is ugly; there's a pair of adjacentpfields in4/spa >

 L273">.2734/a>4spa  class="comment">   struct.inet_sock; __be16 dport followed by __u16 num.  We wantpto4/spa >

 L274">.2744/a>4spa  class="comment">   search by pair, so we combine the keys into a single 32bit tion>4/spa >

 L275">.2754/a>4spa  class="comment">   and compare with 32bit tion> read from &...->dport.  Let's at least4/spa >

 L276">.2764/a>4spa  class="comment">   make sure that it's not mixed with anyth

 L277">.2774/a>4spa  class="comment">   On 64bit targets we combine comparisons with pair of adjacentp__be324/spa >

 L278">.2784/a>4spa  class="comment">   fields in the sam> way.4/spa >

 L279">.2794/a>4spa  class="comment">*/4/spa >

 L280">.2804/a>typedef.4a href="+code=__u32" class="sref">__u324/a> 4a href="+code=__bitwise" class="sref">__bitwise4/a> 4a href="+code=__portpair" class="sref">__portpair4/a>;

 L281">.2814/a>#ifdef.4a href="+code=__BIG_ENDIAN" class="sref">__BIG_ENDIAN4/a>

 L282">.2824/a>#define.4a href="+code=INET_COMBINED_PORTS" class="sref">INET_COMBINED_PORTS4/a>(4a href="+code=__sport" class="sref">__sport4/a>, 4a href="+code=__dport" class="sref">__dport4/a>) \

 L283">.2834/a>        ((4a href="+code=__force" class="sref">__force4/a> 4a href="+code=__portpair" class="sref">__portpair4/a>)(((4a href="+code=__force" class="sref">__force4/a> 4a href="+code=__u32" class="sref">__u324/a>)(4a href="+code=__be16" class="sref">__be164/a>)(4a href="+code=__sport" class="sref">__sport4/a>) << 16) | (4a href="+code=__u32" class="sref">__u324/a>)(4a href="+code=__dport" class="sref">__dport4/a>)))

 L284">.2844/a>#else 4spa  class="comment">/* __LITTLE_ENDIAN */4/spa >

 L285">.2854/a>#define.4a href="+code=INET_COMBINED_PORTS" class="sref">INET_COMBINED_PORTS4/a>(4a href="+code=__sport" class="sref">__sport4/a>, 4a href="+code=__dport" class="sref">__dport4/a>) \

 L286">.2864/a>        ((4a href="+code=__force" class="sref">__force4/a> 4a href="+code=__portpair" class="sref">__portpair4/a>)(((4a href="+code=__u32" class="sref">__u324/a>)(4a href="+code=__dport" class="sref">__dport4/a>) << 16) | (4a href="+code=__force" class="sref">__force4/a> 4a href="+code=__u32" class="sref">__u324/a>)(4a href="+code=__be16" class="sref">__be164/a>)(4a href="+code=__sport" class="sref">__sport4/a>)))

 L287">.2874/a>#endif

 L288">.2884/a>

 L289">.2894/a>#if (4a href="+code=BITS_PER_LONG" class="sref">BITS_PER_LONG4/a> == 64)

 L290">.2904/a>typedef.4a href="+code=__u64" class="sref">__u644/a> 4a href="+code=__bitwise" class="sref">__bitwise4/a> 4a href="+code=__addrpair" class="sref">__addrpair4/a>;

 L291">.2914/a>#ifdef.4a href="+code=__BIG_ENDIAN" class="sref">__BIG_ENDIAN4/a>

 L292">.2924/a>#define.4a href="+code=INET_ADDR_COOKIE" class="sref">INET_ADDR_COOKIE4/a>(4a href="+code=__nam>" class="sref">__nam>4/a>, 4a href="+code=__saddr" class="sref">__saddr4/a>, 4a href="+code=__daddr" class="sref">__daddr4/a>) \

 L293">.2934/a>        const 4a href="+code=__addrpair" class="sref">__addrpair4/a> 4a href="+code=__nam>" class="sref">__nam>4/a> = (4a href="+code=__force" class="sref">__force4/a> 4a href="+code=__addrpair" class="sref">__addrpair4/a>) ( \

 L294">.2944/a>                                   (((4a href="+code=__force" class="sref">__force4/a> 4a href="+code=__u64" class="sref">__u644/a>)(4a href="+code=__be32" class="sref">__be324/a>)(4a href="+code=__saddr" class="sref">__saddr4/a>)) << 32) | \

 L295">.2954/a>                                   ((4a href="+code=__force" class="sref">__force4/a> 4a href="+code=__u64" class="sref">__u644/a>)(4a href="+code=__be32" class="sref">__be324/a>)(4a href="+code=__daddr" class="sref">__daddr4/a>)));

 L296">.2964/a>#else 4spa  class="comment">/* __LITTLE_ENDIAN */4/spa >

 L297">.2974/a>#define.4a href="+code=INET_ADDR_COOKIE" class="sref">INET_ADDR_COOKIE4/a>(4a href="+code=__nam>" class="sref">__nam>4/a>, 4a href="+code=__saddr" class="sref">__saddr4/a>, 4a href="+code=__daddr" class="sref">__daddr4/a>) \

 L298">.2984/a>        const 4a href="+code=__addrpair" class="sref">__addrpair4/a> 4a href="+code=__nam>" class="sref">__nam>4/a> = (4a href="+code=__force" class="sref">__force4/a> 4a href="+code=__addrpair" class="sref">__addrpair4/a>) ( \

 L299">.2994/a>                                   (((4a href="+code=__force" class="sref">__force4/a> 4a href="+code=__u64" class="sref">__u644/a>)(4a href="+code=__be32" class="sref">__be324/a>)(4a href="+code=__daddr" class="sref">__daddr4/a>)) << 32) | \

 L300">.3004/a>                                   ((4a href="+code=__force" class="sref">__force4/a> 4a href="+code=__u64" class="sref">__u644/a>)(4a href="+code=__be32" class="sref">__be324/a>)(4a href="+code=__saddr" class="sref">__saddr4/a>)));

 L301">.3014/a>#endif 4spa  class="comment">/* __BIG_ENDIAN */4/spa >

 L302">.3024/a>#define.4a href="+code=INET_MATCH" class="sref">INET_MATCH4/a>(4a href="+code=__sk" class="sref">__sk4/a>, 4a href="+code=__net" class="sref">__net4/a>, 4a href="+code=__hash" class="sref">__hash4/a>, 4a href="+code=__cookie" class="sref">__cookie4/a>, 4a href="+code=__saddr" class="sref">__saddr4/a>, 4a href="+code=__daddr" class="sref">__daddr4/a>, 4a href="+code=__ports" class="sref">__ports4/a>, 4a href="+code=__dif" class="sref">__dif4/a>)\

 L303">.3034/a>        (((4a href="+code=__sk" class="sref">__sk4/a>)->4a href="+code=sk_hash" class="sref">sk_hash4/a> == (4a href="+code=__hash" class="sref">__hash4/a>)) && 4a href="+code=net_eq" class="sref">net_eq4/a>(4a href="+code=sock_net" class="sref">sock_net4/a>(4a href="+code=__sk" class="sref">__sk4/a>), (4a href="+code=__net" class="sref">__net4/a>)) &&    \

 L304">.3044/a>         ((*((4a href="+code=__addrpair" class="sref">__addrpair4/a> *)&(4a href="+code=inet_sk" class="sref">inet_sk4/a>(4a href="+code=__sk" class="sref">__sk4/a>)->4a href="+code=inet_daddr" class="sref">inet_daddr4/a>))) == (4a href="+code=__cookie" class="sref">__cookie4/a>))  &&    \

 L305">.3054/a>         ((*((4a href="+code=__portpair" class="sref">__portpair4/a> *)&(4a href="+code=inet_sk" class="sref">inet_sk4/a>(4a href="+code=__sk" class="sref">__sk4/a>)->4a href="+code=inet_dport" class="sref">inet_dport4/a>))) == (4a href="+code=__ports" class="sref">__ports4/a>))   &&    \

 L306">.3064/a>         (!((4a href="+code=__sk" class="sref">__sk4/a>)->4a href="+code=sk_bound_dev_if" class="sref">sk_bound_dev_if4/a>) || ((4a href="+code=__sk" class="sref">__sk4/a>)->4a href="+code=sk_bound_dev_if" class="sref">sk_bound_dev_if4/a> == (4a href="+code=__dif" class="sref">__dif4/a>))))

 L307">.3074/a>#define.4a href="+code=INET_TW_MATCH" class="sref">INET_TW_MATCH4/a>(4a href="+code=__sk" class="sref">__sk4/a>, 4a href="+code=__net" class="sref">__net4/a>, 4a href="+code=__hash" class="sref">__hash4/a>, 4a href="+code=__cookie" class="sref">__cookie4/a>, 4a href="+code=__saddr" class="sref">__saddr4/a>, 4a href="+code=__daddr" class="sref">__daddr4/a>, 4a href="+code=__ports" class="sref">__ports4/a>, 4a href="+code=__dif" class="sref">__dif4/a>)\

 L308">.3084/a>        (((4a href="+code=__sk" class="sref">__sk4/a>)->4a href="+code=sk_hash" class="sref">sk_hash4/a> == (4a href="+code=__hash" class="sref">__hash4/a>)) && 4a href="+code=net_eq" class="sref">net_eq4/a>(4a href="+code=sock_net" class="sref">sock_net4/a>(4a href="+code=__sk" class="sref">__sk4/a>), (4a href="+code=__net" class="sref">__net4/a>)) &&    \

 L309">.3094/a>         ((*((4a href="+code=__addrpair" class="sref">__addrpair4/a> *)&(4a href="+code=inet_twsk" class="sref">inet_twsk4/a>(4a href="+code=__sk" class="sref">__sk4/a>)->4a href="+code=tw_daddr" class="sref">tw_daddr4/a>))) == (4a href="+code=__cookie" class="sref">__cookie4/a>)) &&     \

 L310">.3104/a>         ((*((4a href="+code=__portpair" class="sref">__portpair4/a> *)&(4a href="+code=inet_twsk" class="sref">inet_twsk4/a>(4a href="+code=__sk" class="sref">__sk4/a>)->4a href="+code=tw_dport" class="sref">tw_dport4/a>))) == (4a href="+code=__ports" class="sref">__ports4/a>)) &&      \

 L311">.3114/a>         (!((4a href="+code=__sk" class="sref">__sk4/a>)->4a href="+code=sk_bound_dev_if" class="sref">sk_bound_dev_if4/a>) || ((4a href="+code=__sk" class="sref">__sk4/a>)->4a href="+code=sk_bound_dev_if" class="sref">sk_bound_dev_if4/a> == (4a href="+code=__dif" class="sref">__dif4/a>))))

 L312">.3124/a>#else 4spa  class="comment">/* 32-bit arch */4/spa >

 L313">.3134/a>#define.4a href="+code=INET_ADDR_COOKIE" class="sref">INET_ADDR_COOKIE4/a>(4a href="+code=__nam>" class="sref">__nam>4/a>, 4a href="+code=__saddr" class="sref">__saddr4/a>, 4a href="+code=__daddr" class="sref">__daddr4/a>)

 L314">.3144/a>#define.4a href="+code=INET_MATCH" class="sref">INET_MATCH4/a>(4a href="+code=__sk" class="sref">__sk4/a>, 4a href="+code=__net" class="sref">__net4/a>, 4a href="+code=__hash" class="sref">__hash4/a>, 4a href="+code=__cookie" class="sref">__cookie4/a>, 4a href="+code=__saddr" class="sref">__saddr4/a>, 4a href="+code=__daddr" class="sref">__daddr4/a>, 4a href="+code=__ports" class="sref">__ports4/a>, 4a href="+code=__dif" class="sref">__dif4/a>)     \

 L315">.3154/a>        (((4a href="+code=__sk" class="sref">__sk4/a>)->4a href="+code=sk_hash" class="sref">sk_hash4/a> == (4a href="+code=__hash" class="sref">__hash4/a>)) && 4a href="+code=net_eq" class="sref">net_eq4/a>(4a href="+code=sock_net" class="sref">sock_net4/a>(4a href="+code=__sk" class="sref">__sk4/a>), (4a href="+code=__net" class="sref">__net4/a>))       &&      \

 L316">.3164/a>         (4a href="+code=inet_sk" class="sref">inet_sk4/a>(4a href="+code=__sk" class="sref">__sk4/a>)->4a href="+code=inet_daddr" class="sref">inet_daddr4/a>     == (4a href="+code=__saddr" class="sref">__saddr4/a>))           &&      \

 L317">.3174/a>         (4a href="+code=inet_sk" class="sref">inet_sk4/a>(4a href="+code=__sk" class="sref">__sk4/a>)->4a href="+code=inet_rcv_saddr" class="sref">inet_rcv_saddr4/a> == (4a href="+code=__daddr" class="sref">__daddr4/a>))           &&      \

 L318">.3184/a>         ((*((4a href="+code=__portpair" class="sref">__portpair4/a> *)&(4a href="+code=inet_sk" class="sref">inet_sk4/a>(4a href="+code=__sk" class="sref">__sk4/a>)->4a href="+code=inet_dport" class="sref">inet_dport4/a>))) == (4a href="+code=__ports" class="sref">__ports4/a>)) &&      \

 L319">.3194/a>         (!((4a href="+code=__sk" class="sref">__sk4/a>)->4a href="+code=sk_bound_dev_if" class="sref">sk_bound_dev_if4/a>) || ((4a href="+code=__sk" class="sref">__sk4/a>)->4a href="+code=sk_bound_dev_if" class="sref">sk_bound_dev_if4/a> == (4a href="+code=__dif" class="sref">__dif4/a>))))

 L320">.3204/a>#define.4a href="+code=INET_TW_MATCH" class="sref">INET_TW_MATCH4/a>(4a href="+code=__sk" class="sref">__sk4/a>, 4a href="+code=__net" class="sref">__net4/a>, 4a href="+code=__hash" class="sref">__hash4/a>,4a href="+code=__cookie" class="sref">__cookie4/a>, 4a href="+code=__saddr" class="sref">__saddr4/a>, 4a href="+code=__daddr" class="sref">__daddr4/a>, 4a href="+code=__ports" class="sref">__ports4/a>, 4a href="+code=__dif" class="sref">__dif4/a>)   \

 L321">.3214/a>        (((4a href="+code=__sk" class="sref">__sk4/a>)->4a href="+code=sk_hash" class="sref">sk_hash4/a> == (4a href="+code=__hash" class="sref">__hash4/a>)) && 4a href="+code=net_eq" class="sref">net_eq4/a>(4a href="+code=sock_net" class="sref">sock_net4/a>(4a href="+code=__sk" class="sref">__sk4/a>), (4a href="+code=__net" class="sref">__net4/a>))       &&      \

 L322">.3224/a>         (4a href="+code=inet_twsk" class="sref">inet_twsk4/a>(4a href="+code=__sk" class="sref">__sk4/a>)->4a href="+code=tw_daddr" class="sref">tw_daddr4/a>     == (4a href="+code=__saddr" class="sref">__saddr4/a>))           &&      \

 L323">.3234/a>         (4a href="+code=inet_twsk" class="sref">inet_twsk4/a>(4a href="+code=__sk" class="sref">__sk4/a>)->4a href="+code=tw_rcv_saddr" class="sref">tw_rcv_saddr4/a> == (4a href="+code=__daddr" class="sref">__daddr4/a>))           &&      \

 L324">.3244/a>         ((*((4a href="+code=__portpair" class="sref">__portpair4/a> *)&(4a href="+code=inet_twsk" class="sref">inet_twsk4/a>(4a href="+code=__sk" class="sref">__sk4/a>)->4a href="+code=tw_dport" class="sref">tw_dport4/a>))) == (4a href="+code=__ports" class="sref">__ports4/a>)) &&      \

 L325">.3254/a>         (!((4a href="+code=__sk" class="sref">__sk4/a>)->4a href="+code=sk_bound_dev_if" class="sref">sk_bound_dev_if4/a>) || ((4a href="+code=__sk" class="sref">__sk4/a>)->4a href="+code=sk_bound_dev_if" class="sref">sk_bound_dev_if4/a> == (4a href="+code=__dif" class="sref">__dif4/a>))))

 L326">.3264/a>#endif 4spa  class="comment">/* 64-bit arch */4/spa >

 L327">.3274/a>

 L328">.3284/a>4spa  class="comment">/*4/spa >

 L329">.3294/a>4spa  class="comment"> * Sockets in TCP_CLOSE state are _always_ taken out of the hash, so we need4/spa >

 L330">.3304/a>4spa  class="comment"> * not check it for lookups anymore, thanks Alexey. -DaveM4/spa >

 L331">.3314/a>4spa  class="comment"> *4/spa >

 L332">.3324/a>4spa  class="comment"> * Local BH must be disabled here.4/spa >

 L333">.3334/a>4spa  class="comment"> */4/spa >

 L334">.3344/a>extern struct.4a href="+code=sock" class="sref">sock4/a> * 4a href="+code=__inet_lookup_established" class="sref">__inet_lookup_established4/a>(struct.4a href="+code=net" class="sref">net4/a> *4a href="+code=net" class="sref">net4/a>,

 L335">.3354/a>                struct.4a href="+code=inet_hashinfo" class="sref">inet_hashinfo4/a> *4a href="+code=hashinfo" class="sref">hashinfo4/a>,

 L336">.3364/a>                const 4a href="+code=__be32" class="sref">__be324/a> 4a href="+code=saddr" class="sref">saddr4/a>, const 4a href="+code=__be16" class="sref">__be164/a> 4a href="+code=sport" class="sref">sport4/a>,

 L337">.3374/a>                const 4a href="+code=__be32" class="sref">__be324/a> 4a href="+code=daddr" class="sref">daddr4/a>, const 4a href="+code=u16" class="sref">u164/a> 4a href="+code=hnum" class="sref">hnum4/a>, const int 4a href="+code=dif" class="sref">dif4/a>);

 L338">.3384/a>

 L339">.3394/a>static.4a href="+code=inline" class="sref">inline4/a> struct.4a href="+code=sock" class="sref">sock4/a> *

 L340">.3404/a>        4a href="+code=inet_lookup_established" class="sref">inet_lookup_established4/a>(struct.4a href="+code=net" class="sref">net4/a> *4a href="+code=net" class="sref">net4/a>, struct.4a href="+code=inet_hashinfo" class="sref">inet_hashinfo4/a> *4a href="+code=hashinfo" class="sref">hashinfo4/a>,

 L341">.3414/a>                                const 4a href="+code=__be32" class="sref">__be324/a> 4a href="+code=saddr" class="sref">saddr4/a>, const 4a href="+code=__be16" class="sref">__be164/a> 4a href="+code=sport" class="sref">sport4/a>,

 L342">.3424/a>                                const 4a href="+code=__be32" class="sref">__be324/a> 4a href="+code=daddr" class="sref">daddr4/a>, const 4a href="+code=__be16" class="sref">__be164/a> 4a href="+code=dport" class="sref">dport4/a>,

 L343">.3434/a>                                const int 4a href="+code=dif" class="sref">dif4/a>)

 L344">.3444/a>{

 L345">.3454/a>        return 4a href="+code=__inet_lookup_established" class="sref">__inet_lookup_established4/a>(4a href="+code=net" class="sref">net4/a>, 4a href="+code=hashinfo" class="sref">hashinfo4/a>, 4a href="+code=saddr" class="sref">saddr4/a>, 4a href="+code=sport" class="sref">sport4/a>, 4a href="+code=daddr" class="sref">daddr4/a>,

 L346">.3464/a>                                         4a href="+code=ntohs" class="sref">ntohs4/a>(4a href="+code=dport" class="sref">dport4/a>), 4a href="+code=dif" class="sref">dif4/a>);

 L347">.3474/a>}

 L348">.3484/a>

 L349">.3494/a>static.4a href="+code=inline" class="sref">inline4/a> struct.4a href="+code=sock" class="sref">sock4/a> *4a href="+code=__inet_lookup" class="sref">__inet_lookup4/a>(struct.4a href="+code=net" class="sref">net4/a> *4a href="+code=net" class="sref">net4/a>,

 L350">.3504/a>                                         struct.4a href="+code=inet_hashinfo" class="sref">inet_hashinfo4/a> *4a href="+code=hashinfo" class="sref">hashinfo4/a>,

 L351">.3514/a>                                         const 4a href="+code=__be32" class="sref">__be324/a> 4a href="+code=saddr" class="sref">saddr4/a>, const 4a href="+code=__be16" class="sref">__be164/a> 4a href="+code=sport" class="sref">sport4/a>,

 L352">.3524/a>                                         const 4a href="+code=__be32" class="sref">__be324/a> 4a href="+code=daddr" class="sref">daddr4/a>, const 4a href="+code=__be16" class="sref">__be164/a> 4a href="+code=dport" class="sref">dport4/a>,

 L353">.3534/a>                                         const int 4a href="+code=dif" class="sref">dif4/a>)

 L354">.3544/a>{

 L355">.3554/a>        4a href="+code=u16" class="sref">u164/a> 4a href="+code=hnum" class="sref">hnum4/a> = 4a href="+code=ntohs" class="sref">ntohs4/a>(4a href="+code=dport" class="sref">dport4/a>);

 L356">.3564/a>        struct.4a href="+code=sock" class="sref">sock4/a> *4a href="+code=sk" class="sref">sk4/a> = 4a href="+code=__inet_lookup_established" class="sref">__inet_lookup_established4/a>(4a href="+code=net" class="sref">net4/a>, 4a href="+code=hashinfo" class="sref">hashinfo4/a>,

 L357">.3574/a>                                4a href="+code=saddr" class="sref">saddr4/a>, 4a href="+code=sport" class="sref">sport4/a>, 4a href="+code=daddr" class="sref">daddr4/a>, 4a href="+code=hnum" class="sref">hnum4/a>, 4a href="+code=dif" class="sref">dif4/a>);

 L358">.3584/a>

 L359">.3594/a>        return 4a href="+code=sk" class="sref">sk4/a> ? : 4a href="+code=__inet_lookup_listener" class="sref">__inet_lookup_listener4/a>(4a href="+code=net" class="sref">net4/a>, 4a href="+code=hashinfo" class="sref">hashinfo4/a>, 4a href="+code=daddr" class="sref">daddr4/a>, 4a href="+code=hnum" class="sref">hnum4/a>, 4a href="+code=dif" class="sref">dif4/a>);

 L360">.3604/a>}

 L361">.3614/a>

 L362">.3624/a>static.4a href="+code=inline" class="sref">inline4/a> struct.4a href="+code=sock" class="sref">sock4/a> *4a href="+code=inet_lookup" class="sref">inet_lookup4/a>(struct.4a href="+code=net" class="sref">net4/a> *4a href="+code=net" class="sref">net4/a>,

 L363">.3634/a>                                       struct.4a href="+code=inet_hashinfo" class="sref">inet_hashinfo4/a> *4a href="+code=hashinfo" class="sref">hashinfo4/a>,

 L364">.3644/a>                                       const 4a href="+code=__be32" class="sref">__be324/a> 4a href="+code=saddr" class="sref">saddr4/a>, const 4a href="+code=__be16" class="sref">__be164/a> 4a href="+code=sport" class="sref">sport4/a>,

 L365">.3654/a>                                       const 4a href="+code=__be32" class="sref">__be324/a> 4a href="+code=daddr" class="sref">daddr4/a>, const 4a href="+code=__be16" class="sref">__be164/a> 4a href="+code=dport" class="sref">dport4/a>,

 L366">.3664/a>                                       const int 4a href="+code=dif" class="sref">dif4/a>)

 L367">.3674/a>{

 L368">.3684/a>        struct.4a href="+code=sock" class="sref">sock4/a> *4a href="+code=sk" class="sref">sk4/a>;

 L369">.3694/a>

 L370">.3704/a>        4a href="+code=local_bh_disable" class="sref">local_bh_disable4/a>();

 L371">.3714/a>        4a href="+code=sk" class="sref">sk4/a> = 4a href="+code=__inet_lookup" class="sref">__inet_lookup4/a>(4a href="+code=net" class="sref">net4/a>, 4a href="+code=hashinfo" class="sref">hashinfo4/a>, 4a href="+code=saddr" class="sref">saddr4/a>, 4a href="+code=sport" class="sref">sport4/a>, 4a href="+code=daddr" class="sref">daddr4/a>, 4a href="+code=dport" class="sref">dport4/a>, 4a href="+code=dif" class="sref">dif4/a>);

 L372">.3724/a>        4a href="+code=local_bh_enable" class="sref">local_bh_enable4/a>();

 L373">.3734/a>

 L374">.3744/a>        return 4a href="+code=sk" class="sref">sk4/a>;

 L375">.3754/a>}

 L376">.3764/a>

 L377">.3774/a>static.4a href="+code=inline" class="sref">inline4/a> struct.4a href="+code=sock" class="sref">sock4/a> *4a href="+code=__inet_lookup_skb" class="sref">__inet_lookup_skb4/a>(struct.4a href="+code=inet_hashinfo" class="sref">inet_hashinfo4/a> *4a href="+code=hashinfo" class="sref">hashinfo4/a>,

 L378">.3784/a>                                             struct.4a href="+code=sk_buff" class="sref">sk_buff4/a> *4a href="+code=skb" class="sref">skb4/a>,

 L379">.3794/a>                                             const 4a href="+code=__be16" class="sref">__be164/a> 4a href="+code=sport" class="sref">sport4/a>,

 L380">.3804/a>                                             const 4a href="+code=__be16" class="sref">__be164/a> 4a href="+code=dport" class="sref">dport4/a>)

 L381">.3814/a>{

 L382">.3824/a>        struct.4a href="+code=sock" class="sref">sock4/a> *4a href="+code=sk" class="sref">sk4/a> = 4a href="+code=skb_steal_sock" class="sref">skb_steal_sock4/a>(4a href="+code=skb" class="sref">skb4/a>);

 L383">.3834/a>        const struct.4a href="+code=iphdr" class="sref">iphdr4/a> *4a href="+code=iph" class="sref">iph4/a> = 4a href="+code=ip_hdr" class="sref">ip_hdr4/a>(4a href="+code=skb" class="sref">skb4/a>);

 L384">.3844/a>

 L385">.3854/a>        if (4a href="+code=sk" class="sref">sk4/a>)

 L386">.3864/a>                return 4a href="+code=sk" class="sref">sk4/a>;

 L387">.3874/a>        else

 L388">.3884/a>                return 4a href="+code=__inet_lookup" class="sref">__inet_lookup4/a>(4a href="+code=dev_net" class="sref">dev_net4/a>(4a href="+code=skb_dst" class="sref">skb_dst4/a>(4a href="+code=skb" class="sref">skb4/a>)->4a href="+code=dev" class="sref">dev4/a>), 4a href="+code=hashinfo" class="sref">hashinfo4/a>,

 L389">.3894/a>                                     4a href="+code=iph" class="sref">iph4/a>->4a href="+code=saddr" class="sref">saddr4/a>, 4a href="+code=sport" class="sref">sport4/a>,

 L390">.3904/a>                                     4a href="+code=iph" class="sref">iph4/a>->4a href="+code=daddr" class="sref">daddr4/a>, 4a href="+code=dport" class="sref">dport4/a>, 4a href="+code=inet_iif" class="sref">inet_iif4/a>(4a href="+code=skb" class="sref">skb4/a>));

 L391">.3914/a>}

 L392">.3924/a>

 L393">.3934/a>extern int 4a href="+code=__inet_hash_connect" class="sref">__inet_hash_connect4/a>(struct.4a href="+code=inet_timewait_death_row" class="sref">inet_timewait_death_row4/a> *4a href="+code=death_row" class="sref">death_row4/a>,

 L394">.3944/a>                struct.4a href="+code=sock" class="sref">sock4/a> *4a href="+code=sk" class="sref">sk4/a>,

 L395">.3954/a>                4a href="+code=u32" class="sref">u324/a> 4a href="+code=port_offset" class="sref">port_offset4/a>,

 L396">.3964/a>                int (*4a href="+code=check_established" class="sref">check_established4/a>)(struct.4a href="+code=inet_timewait_death_row" class="sref">inet_timewait_death_row4/a> *,

 L397">.3974/a>                        struct.4a href="+code=sock" class="sref">sock4/a> *, 4a href="+code=__u16" class="sref">__u164/a>, struct.4a href="+code=inet_timewait_sock" class="sref">inet_timewait_sock4/a> **),

 L398">.3984/a>                int (*4a href="+code=hash" class="sref">hash4/a>)(struct.4a href="+code=sock" class="sref">sock4/a> *4a href="+code=sk" class="sref">sk4/a>, struct.4a href="+code=inet_timewait_sock" class="sref">inet_timewait_sock4/a> *4a href="+code=twp" class="sref">twp4/a>));

 L399">.3994/a>

 L400">.4004/a>extern int 4a href="+code=inet_hash_connect" class="sref">inet_hash_connect4/a>(struct.4a href="+code=inet_timewait_death_row" class="sref">inet_timewait_death_row4/a> *4a href="+code=death_row" class="sref">death_row4/a>,

 L401">.4014/a>                             struct.4a href="+code=sock" class="sref">sock4/a> *4a href="+code=sk" class="sref">sk4/a>);

 L402">.4024/a>#endif 4spa  class="comment">/* _INET_HASHTABLES_H */4/spa >

 L403">.4034/a>
lxr.linux.no kindly hosted by Redpill Linpro AS4/a>, provider of Linux consulting and operations services since 1995.