Tue Oct 8 17:05:16 2019 UTC ()
Pull up following revision(s) (requested by msaitoh in ticket #293):

	sys/dev/pci/ixgbe/ixv.c: revision 1.139

Set MTU correctly if mtu > 1500.


(martin)
diff -r1.125.2.4 -r1.125.2.5 src/sys/dev/pci/ixgbe/ixv.c

cvs diff -r1.125.2.4 -r1.125.2.5 src/sys/dev/pci/ixgbe/ixv.c (expand / switch to context diff)
--- src/sys/dev/pci/ixgbe/ixv.c 2019/09/26 19:07:22 1.125.2.4
+++ src/sys/dev/pci/ixgbe/ixv.c 2019/10/08 17:05:16 1.125.2.5
@@ -1,4 +1,4 @@
-/*$NetBSD: ixv.c,v 1.125.2.4 2019/09/26 19:07:22 martin Exp $*/
+/*$NetBSD: ixv.c,v 1.125.2.5 2019/10/08 17:05:16 martin Exp $*/
 
 /******************************************************************************
 
@@ -716,6 +716,9 @@
 	for (i = 0, que = adapter->queues; i < adapter->num_queues; i++, que++)
 		que->disabled_count = 0;
 
+	adapter->max_frame_size =
+	    ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN;
+
 	/* reprogram the RAR[0] in case user changed it. */
 	hw->mac.ops.set_rar(hw, 0, hw->mac.addr, 0, IXGBE_RAH_AV);
 
@@ -748,10 +751,10 @@
 	 * Determine the correct mbuf pool
 	 * for doing jumbo/headersplit
 	 */
-	if (ifp->if_mtu > ETHERMTU)
-		adapter->rx_mbuf_sz = MJUMPAGESIZE;
-	else
+	if (adapter->max_frame_size <= MCLBYTES)
 		adapter->rx_mbuf_sz = MCLBYTES;
+	else
+		adapter->rx_mbuf_sz = MJUMPAGESIZE;
 
 	/* Prepare receive descriptors and buffers */
 	if (ixgbe_setup_receive_structures(adapter)) {