Bug 1252755: increase maximum UDP packet size to 9216 bytes for jumbo frames. r=jesup draft
authorNils Ohlmeier [:drno] <drno@ohlmeier.org>
Tue, 01 Mar 2016 22:13:14 -0800
changeset 336052 55ebde8cd317058169e93f68d982a1c5fc8abb9e
parent 335982 eb25b90a05c194bfd4f498ff3ffee7440f85f1cd
child 515284 5a809f3c03fb2bf21066cbb4ec85cd7d9b1c3f2f
push id11952
push userdrno@ohlmeier.org
push dateWed, 02 Mar 2016 06:13:30 +0000
reviewersjesup
bugs1252755
milestone47.0a1
Bug 1252755: increase maximum UDP packet size to 9216 bytes for jumbo frames. r=jesup MozReview-Commit-ID: 9aNARxTIdyr
netwerk/base/nsUDPSocket.cpp
--- a/netwerk/base/nsUDPSocket.cpp
+++ b/netwerk/base/nsUDPSocket.cpp
@@ -455,19 +455,19 @@ nsUDPSocket::OnSocketReady(PRFileDesc *f
   {
     NS_WARNING("error polling on listening socket");
     mCondition = NS_ERROR_UNEXPECTED;
     return;
   }
 
   PRNetAddr prClientAddr;
   uint32_t count;
-  // Bug 1165423 - using 8k here because the packet could be larger
-  // than the MTU with fragmentation
-  char buff[8 * 1024];
+  // Bug 1252755 - use 9216 bytes to allign with nICEr and transportlayer to
+  // support the maximum size of jumbo frames
+  char buff[9216];
   count = PR_RecvFrom(mFD, buff, sizeof(buff), 0, &prClientAddr, PR_INTERVAL_NO_WAIT);
 
   if (count < 1) {
     NS_WARNING("error of recvfrom on UDP socket");
     mCondition = NS_ERROR_UNEXPECTED;
     return;
   }
   mByteReadCount += count;