Skip to contentSkip to conversation

net: nfs: don't fail when nfs_read_reply returns -NFS_RPC_DROP

PATCH In review Vasily Khoruzhick 2 participants 5 messages May 14, 2018 – Jun 13, 2018 Networking

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: nfs: don't fail when nfs_read_reply returns -NFS_RPC_DROP

That can happen if duplicate UDP packet arrived, and that's not uncommon. Anyway, we ignore packets with rpc_id lower than last we sent for other requests, so it makes sense to do that for read request as well.

---
 net/nfs.c | 2 ++
 1 file changed, 2 insertions(+)
net/nfs.c +2 -0
index 83ed0a7c37..9a16765ba1 100644
@@ -822,6 +822,8 @@ static void nfs_handler(uchar *pkt, unsigned dest, struct in_addr sip,
 
 	case STATE_READ_REQ:
 		rlen = nfs_read_reply(pkt, len);
+		if (rlen == -NFS_RPC_DROP)
+			break;
 		net_set_timeout_handler(nfs_timeout, nfs_timeout_handler);
 		if (rlen > 0) {
 			nfs_offset += rlen;
Signature · 1 line
2.17.0
#2 lore raw

PATCH 1/1 net: nfs: don't fail when nfs_read_reply returns -NFS_RPC_DROP

Quoted 9 lines · Joe Hershberger
Quoted 5 lines · Vasily Khoruzhick

That can happen if duplicate UDP packet arrived, and that's not uncommon. Anyway, we ignore packets with rpc_id lower than last we sent for other requests, so it makes sense to do that for read request as well.

Hey,

Can anyone pick this patch up?

Regards,
Vasily

#3 lore raw

PATCH 1/1 net: nfs: don't fail when nfs_read_reply returns -NFS_RPC_DROP

Quoted 7 lines · Vasily Khoruzhick
Quoted 6 lines · Joe Hershberger
Quoted 4 lines · Vasily Khoruzhick

That can happen if duplicate UDP packet arrived, and that's not uncommon. Anyway, we ignore packets with rpc_id lower than last we sent for other requests, so it makes sense to do that for read request as well.

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

Hey,

Can anyone pick this patch up?

Will do.

-Joe