igc: Include the length/type field and VLAN tag in queueMaxSDU
authorTan Tee Min <tee.min.tan@linux.intel.com>
Fri, 9 Jun 2023 03:28:42 +0000 (11:28 +0800)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Wed, 5 Jul 2023 18:18:56 +0000 (11:18 -0700)
commit25102893e409bc02761ab82dbcfa092006404790
treeacbc5cfd37515ce44bd205124c4ab8c68bd39907
parent9ac3fc2f42e5ffa1e927dcbffb71b15fa81459e2
igc: Include the length/type field and VLAN tag in queueMaxSDU

IEEE 802.1Q does not have clear definitions of what constitutes an
SDU (Service Data Unit), but IEEE Std 802.3 clause 3.1.2 does define
the MAC service primitives and clause 3.2.7 does define the MAC Client
Data for Q-tagged frames.

It shows that the mac_service_data_unit (MSDU) does NOT contain the
preamble, destination and source address, or FCS. The MSDU does contain
the length/type field, MAC client data, VLAN tag and any padding
data (prior to the FCS).

Thus, the maximum 802.3 frame size that is allowed to be transmitted
should be QueueMaxSDU (MSDU) + 16 (6 byte SA + 6 byte DA + 4 byte FCS).

Fixes: 92a0dcb8427d ("igc: offload queue max SDU from tc-taprio")
Signed-off-by: Tan Tee Min <tee.min.tan@linux.intel.com>
Reviewed-by: Muhammad Husaini Zulkifli <muhammad.husaini.zulkifli@intel.com>
Tested-by: Naama Meir <naamax.meir@linux.intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/igc/igc_main.c