summaryrefslogtreecommitdiffstats
path: root/sys/net/if_llatbl.h
diff options
context:
space:
mode:
authorgnn <gnn@FreeBSD.org>2010-11-12 22:03:02 +0000
committergnn <gnn@FreeBSD.org>2010-11-12 22:03:02 +0000
commitc3225b5eaae133c81e5029596d87998c2005051d (patch)
treef52ab575cd1d1ee7966a7b191d553abe09ed23f5 /sys/net/if_llatbl.h
parent7319cd0aa4b9390836eb5807dd29cbc9d1a4563e (diff)
downloadFreeBSD-src-c3225b5eaae133c81e5029596d87998c2005051d.zip
FreeBSD-src-c3225b5eaae133c81e5029596d87998c2005051d.tar.gz
Add a queue to hold packets while we await an ARP reply.
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
Diffstat (limited to 'sys/net/if_llatbl.h')
-rw-r--r--sys/net/if_llatbl.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/net/if_llatbl.h b/sys/net/if_llatbl.h
index a4d02ab..6c5ad18 100644
--- a/sys/net/if_llatbl.h
+++ b/sys/net/if_llatbl.h
@@ -58,6 +58,7 @@ struct llentry {
struct lltable *lle_tbl;
struct llentries *lle_head;
struct mbuf *la_hold;
+ int la_numheld; /* # of packets currently held */
time_t la_expire;
uint16_t la_flags;
uint16_t la_asked;
@@ -191,7 +192,7 @@ void lltable_drain(int);
#endif
int lltable_sysctl_dumparp(int, struct sysctl_req *);
-void llentry_free(struct llentry *);
+size_t llentry_free(struct llentry *);
int llentry_update(struct llentry **, struct lltable *,
struct sockaddr_storage *, struct ifnet *);
OpenPOWER on IntegriCloud