If a VF request to set a invalid maximum packet length value,
The PF kernel driver may disable its reception.
This patch add codes to output information and return the error status.
Fixes:
12cd0cccc3db ("ixgbevf: allow to set MTU")
Cc: stable@dpdk.org
Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
* prior to 3.11.33 which contains the following change:
* "ixgbe: Enable jumbo frames support w/ SR-IOV"
*/
- ixgbevf_rlpml_set_vf(hw, max_frame);
+ if (ixgbevf_rlpml_set_vf(hw, max_frame))
+ return -EINVAL;
/* update max frame size */
dev->data->dev_conf.rxmode.max_rx_pkt_len = max_frame;
* ixgbevf_rlpml_set_vf even if jumbo frames are not used. This way,
* VF packets received can work in all cases.
*/
- ixgbevf_rlpml_set_vf(hw,
- (uint16_t)dev->data->dev_conf.rxmode.max_rx_pkt_len);
+ if (ixgbevf_rlpml_set_vf(hw,
+ (uint16_t)dev->data->dev_conf.rxmode.max_rx_pkt_len)) {
+ PMD_INIT_LOG(ERR, "Set max packet length to %d failed.",
+ dev->data->dev_conf.rxmode.max_rx_pkt_len);
+ return -EINVAL;
+ }
/*
* Assume no header split and no VLAN strip support