max_rx_pkt_len already includes ETHER_HDR_LEN and ETHER_CRC_LEN for the
mtu. But, the firmware also adds ETHER_HDR_LEN and ETHER_CRC_LEN to the
mtu specified. Fix by subtracting these values from the mtu before
passing it to firmware.
Fixes:
4b2eff452d2e ("cxgbe: enable jumbo frames")
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
table that gets overwritten by subsequent port 1's part of the RSS
table due to incorrect size allocated for each entry in the table.
table that gets overwritten by subsequent port 1's part of the RSS
table due to incorrect size allocated for each entry in the table.
+* **cxgbe: Fixed setting wrong device MTU.**
+
+ Fixed an incorrect device MTU being set due to ethernet header and
+ CRC lengths being added twice.
+
* **aesni_mb: Fixed wrong return value when creating a device.**
cryptodev_aesni_mb_init() was returning the device id of the device created,
* **aesni_mb: Fixed wrong return value when creating a device.**
cryptodev_aesni_mb_init() was returning the device id of the device created,
{
struct adapter *adapter = pi->adapter;
int ret;
{
struct adapter *adapter = pi->adapter;
int ret;
- unsigned int mtu = pi->eth_dev->data->dev_conf.rxmode.max_rx_pkt_len;
+ unsigned int mtu;
+
+ mtu = pi->eth_dev->data->dev_conf.rxmode.max_rx_pkt_len -
+ (ETHER_HDR_LEN + ETHER_CRC_LEN);
/*
* We do not set address filters and promiscuity here, the stack does
/*
* We do not set address filters and promiscuity here, the stack does