summaryrefslogtreecommitdiffstats
path: root/sys/net/if_llatbl.h
Commit message (Collapse)AuthorAgeFilesLines
* Remove include opt_ofed.h since OFED is unifdef'd.alfred2013-08-271-2/+0
| | | | Pointed out by: glebius
* Remove the #ifdef OFED from the 20 byte mac in struct llentry.alfred2013-08-251-2/+0
| | | | | With this change it is now possible to build the entire infiniband stack as modules and load it dynamically including IP over IB.
* Back out r249318, r249320 and r249327 due to a heisenbug mostandre2013-05-061-1/+1
| | | | | likely related to a race condition in the ipi_hash_lock with the exact cause currently unknown but under investigation.
* Fix build.glebius2013-04-101-1/+1
|
* Retire struct sockaddr_inarp.glebius2013-01-311-1/+0
| | | | | | | | | | | | | | | Since ARP and routing are separated, "proxy only" entries don't have any meaning, thus we don't need additional field in sockaddr to pass SIN_PROXY flag. New kernel is binary compatible with old tools, since sizes of sockaddr_inarp and sockaddr_in match, and sa_family are filled with same value. The structure declaration is left for compatibility with third party software, but in tree code no longer use it. Reviewed by: ru, andre, net@
* Move lle_event to if_llatbl.hnp2013-01-251-0/+10
| | | | | | | | | | | | lle_event replaced arp_update_event after the ARP rewrite and ended up in if_ether.h simply because arp_update_event used to be there too. IPv6 neighbor discovery is going to grow lle_event support and this is a good time to move it to if_llatbl.h. The two in-tree consumers of this event - OFED and toecore - are not affected. Reviewed by: bz@
* Fix races between in_lltable_prefix_free(), lla_lookup(),glebius2012-08-021-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | llentry_free() and arptimer(): o Use callout_init_rw() for lle timeout, this allows us safely disestablish them. - This allows us to simplify the arptimer() and make it race safe. o Consistently use ifp->if_afdata_lock to lock access to linked lists in the lle hashes. o Introduce new lle flag LLE_LINKED, which marks an entry that is attached to the hash. - Use LLE_LINKED to avoid double unlinking via consequent calls to llentry_free(). - Mark lle with LLE_DELETED via |= operation istead of =, so that other flags won't be lost. o Make LLE_ADDREF(), LLE_REMREF() and LLE_FREE_LOCKED() more consistent and provide more informative KASSERTs. The patch is a collaborative work of all submitters and myself. PR: kern/165863 Submitted by: Andrey Zonov <andrey zonov.org> Submitted by: Ryan Stone <rysto32 gmail.com> Submitted by: Eric van Gyzen <eric_van_gyzen dell.com>
* The llentry_update() is used only by flowtable and the latterglebius2012-08-021-2/+2
| | | | | always passes NULL pointer to it. Thus, code can be simplified and function renamed to llentry_alloc() to match rtalloc().
* Some style(9) and whitespace changes.glebius2012-07-311-9/+10
| | | | Together with: Andrey Zonov <andrey zonov.org>
* When using flowtable llentrys can outlive the interface with which they're ↵kmacy2012-02-231-3/+1
| | | | | | | | | | | associated at which the lle_tbl pointer points to freed memory and the llt_free pointer is no longer valid. Move the free pointer in to the llentry itself and update the initalization sites. MFC after: 2 weeks
* Make KBI changes required for future MFCing of inpcb rtentry / llentry caching.kmacy2011-09-201-0/+1
| | | | | Reviewed by: rwatson, bz Approved by: re (kib)
* Permit ARP to proceed for IPv4 host routes for which the gateway is thezec2011-07-081-3/+0
| | | | | | | | | same as the host address. This already works fine for INET6 and ND6. While here, remove two function pointers from struct lltable which are only initialized but never used. MFC after: 3 days
* The statically configured (permanent) ARP entries are removed when anqingli2011-05-201-2/+3
| | | | | | | | | | interface is brought down, even though the interface address is still valid. This patch maintains the permanent ARP entries as long as the interface address (having the same prefix as that of the ARP entries) is valid. Reviewed by: delphij MFC after: 5 days
* - Merge changes to the base system to support OFED. These includejeff2011-03-211-0/+5
| | | | | a wider arg2 for sysctl, updates to vlan code, IFT_INFINIBAND, and other miscellaneous small features.
* Use NULL rather than 0 to invalidate a pointer.bz2010-12-311-9/+2
| | | | | | | | | | | Rather than duplicating the LLE_FREE_LOCKED() macro code in LLE_FREE(), call it directly (like we do for the RT_* macros). Sponsored by: ISPsystem [1] Reviewed by: julian [1] MFC After: 1 week [1] Early 2010.
* Add a queue to hold packets while we await an ARP reply.gnn2010-11-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | When a fast machine first brings up some non TCP networking program it is quite possible that we will drop packets due to the fact that only one packet can be held per ARP entry. This leads to packets being missed when a program starts or restarts if the ARP data is not currently in the ARP cache. This code adds a new sysctl, net.link.ether.inet.maxhold, which defines a system wide maximum number of packets to be held in each ARP entry. Up to maxhold packets are queued until an ARP reply is received or the ARP times out. The default setting is the old value of 1 which has been part of the BSD networking code since time immemorial. Expose the time we hold an incomplete ARP entry by adding the sysctl net.link.ether.inet.wait, which defaults to 20 seconds, the value used when the new ARP code was added.. Reviewed by: bz, rpaulo MFC after: 3 weeks
* lltable_drain() has never been used so far, thus #if 0 it for now.bz2010-10-161-0/+2
| | | | | | | While touching it add the missing locking to the now disabled code for the time when we'll resurrect it. MFC after: 3 days
* - restructure flowtable to support ipv6kmacy2010-03-121-1/+1
| | | | | | | | | | | | | | - add a name argument to flowtable_alloc for printing with ddb commands - extend ddb commands to print destination address or 4-tuples - don't parse ports in ulp header if FL_HASH_ALL is not passed - add kern_flowtable_insert to enable more generic use of flowtable (e.g. system calls for adding entries) - don't hash loopback addresses - cleanup whitespace - keep statistics per-cpu for per-cpu flowtables to avoid cache line contention - add sysctls to accumulate stats and report aggregate MFC after: 7 days
* The proxy arp entries could not be added into the system over theqingli2009-12-301-1/+1
| | | | | | | | | | | | | | | | | | IFF_POINTOPOINT link types. The reason was due to the routing entry returned from the kernel covering the remote end is of an interface type that does not support ARP. This patch fixes this problem by providing a hint to the kernel routing code, which indicates the prefix route instead of the PPP host route should be returned to the caller. Since a host route to the local end point is also added into the routing table, and there could be multiple such instantiations due to multiple PPP links can be created with the same local end IP address, this patch also fixes the loopback route installation failure problem observed prior to this patch. The reference count of loopback route to local end would be either incremented or decremented. The first instantiation would create the entry and the last removal would delete the route entry. MFC after: 5 days
* Use locks specific to the lltable code, rather than borrow the ifnetrwatson2009-08-251-0/+7
| | | | | | | | | list/index locks, to protect link layer address tables. This avoids lock order issues during interface teardown, but maintains the bug that sysctl copy routines may be called while a non-sleepable lock is held. Reviewed by: bz, kmacy MFC after: 3 days
* When an interface address is removed and the last prefixqingli2009-05-201-0/+5
| | | | | | | | route is also being deleted, the link-layer address table (arp or nd6) will flush those L2 llinfo entries that match the removed prefix. Reviewed by: kmacy
* add utility routine for updating an struct llentry *kmacy2009-04-161-0/+2
|
* add macro for destroying an llentry's rwlockkmacy2008-12-161-1/+2
|
* Add arpv2 management codekmacy2008-12-151-0/+191
OpenPOWER on IntegriCloud