diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2021-10-09 18:26:16 +0000 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2021-10-09 18:26:16 +0000 |
commit | 1a6324970d4cb0f0508caa3a685355d500709f1a (patch) | |
tree | 4c67be2a637f667f3c603feedf3b2b722a3a5306 /sys/src/9/ip/netdevmedium.c | |
parent | d280f411f68cebc5aac71ce8b7cbcfb5b22f1a7c (diff) |
devip: cache arp entry in Routehint
Instead of having to do an arp hash table lookup for each
outgoing ip packet, forward the Routehint pointer to the
medium's bwrite() function and let it cache the arp entry
pointer.
This avoids route and arp hash table lookups for tcp, il
and connection oriented udp.
It also allows us to avoid multiple route and arp table
lookups for the retransmits once an arp/neighbour solicitation
response arrives.
Diffstat (limited to 'sys/src/9/ip/netdevmedium.c')
-rw-r--r-- | sys/src/9/ip/netdevmedium.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/src/9/ip/netdevmedium.c b/sys/src/9/ip/netdevmedium.c index 6d56420fd..9e265d19b 100644 --- a/sys/src/9/ip/netdevmedium.c +++ b/sys/src/9/ip/netdevmedium.c @@ -9,7 +9,7 @@ static void netdevbind(Ipifc *ifc, int argc, char **argv); static void netdevunbind(Ipifc *ifc); -static void netdevbwrite(Ipifc *ifc, Block *bp, int version, uchar *ip); +static void netdevbwrite(Ipifc *ifc, Block *bp, int version, uchar *ip, Routehint*); static void netdevread(void *a); typedef struct Netdevrock Netdevrock; @@ -99,7 +99,7 @@ netdevunbind(Ipifc *ifc) * called by ipoput with a single block to write */ static void -netdevbwrite(Ipifc *ifc, Block *bp, int, uchar*) +netdevbwrite(Ipifc *ifc, Block *bp, int, uchar*, Routehint*) { Netdevrock *er = ifc->arg; |