mcusim / freebsd-src

sys/dev/dpaa2 drivers work-in-progress
https://www.FreeBSD.org/
Other
4 stars 3 forks source link

VLAN_MTU #22

Closed bzfbd closed 8 months ago

bzfbd commented 11 months ago

dpni0 announces vlan_mtu but creating a vlan interface on top of it create mtu issues; doing ifconfig vlan0 mtu 1480 as a check makes things work. So something is not correct.

bzfbd commented 11 months ago

From a qquick look (but not checked yet) it seems this needs to be:

--- sys/dev/dpaa2/dpaa2_ni.c
+++ sys/dev/dpaa2/dpaa2_ni.c
@@ -2556,7 +2556,7 @@ dpaa2_ni_ioctl(if_t ifp, u_long c, caddr_t data)

                /* Update maximum frame length. */
                error = DPAA2_CMD_NI_SET_MFL(dev, child, &cmd,
-                   mtu + ETHER_HDR_LEN);
+                   mtu + ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN);
                if (error) {
                        device_printf(dev, "%s: failed to update maximum frame "
                            "length: error=%d\n", __func__, error);
bzfbd commented 8 months ago

Posted here now https://reviews.freebsd.org/D42645 so it can go into FreeBSD.

bzfbd commented 8 months ago

Committed as https://cgit.freebsd.org/src/commit/?id=0480dccd3f347da0dbccf5917633435d5ce6cb86