Messages in this thread Patch in this message | | | From | Andi Kleen <> | Subject | Re: High Number of arp Requests from NFS | Date | Thu, 6 May 1999 16:45:29 +0200 |
| |
In muc.lists.linux-kernel, you wrote: >In running 2.2.7, I've noticed that NFS seems to generate an extremely >high number of arp requests in comparison to other network services. Any >reason why the arp cache is having to be revalidated so often?
Does this (untested) patch fix it?
-Andi
--- linux/net/sunrpc/xprt.c-o Thu May 6 16:29:40 1999 +++ linux/net/sunrpc/xprt.c Thu May 6 16:38:58 1999 @@ -55,9 +55,14 @@ #include <linux/sunrpc/clnt.h> #include <linux/file.h> +#include <asm/uaccess.h> + +#define tcp_write_space XXX +#include <net/tcp.h> +#undef tcp_write_space /* sorry. someone clean that up. */ +#include <net/route.h> #include <net/sock.h> -#include <asm/uaccess.h> #define SOCK_HAS_USER_DATA @@ -560,6 +565,22 @@ return; } +/* + * This is inefficient and doesn't support SunRPCv6. + * It would be better to cache the dst_entry in the xprt cache. + */ +static inline void +udp_confirm(struct sk_buff *skb) +{ + struct rtable *rt; + if (ip_route_output(&rt, skb->nh.iph->saddr, + skb->nh.iph->daddr, + RT_TOS(skb->nh.iph->tos), /* hope that is ok */ + 0)) + return; + dst_confirm(&rt->u.dst); +} + /* * Input handler for RPC replies. Called from a bottom half and hence * atomic. @@ -593,8 +614,11 @@ goto dropit; task = rovr->rq_task; + udp_confirm(skb); + dprintk("RPC: %4d received reply\n", task->tk_pid); xprt_pktdump("packet data:", (u32 *) (skb->h.raw+8), repsize); + if ((copied = rovr->rq_rlen) > repsize) copied = repsize; - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |