net/ena: remove redundant MTU verification
Remove MTU verification from ena_mtu_set() and ena_start(). It is done by rte_ethdev already, so there is no reason to repeat it inside the ENA driver. Signed-off-by: Dawid Gorecki <dgr@semihalf.com> Reviewed-by: Michal Krawczyk <mk@semihalf.com> Reviewed-by: Shai Brandes <shaibran@amazon.com> Reviewed-by: Amit Bernstein <amitbern@amazon.com>
This commit is contained in:
parent
c339f53823
commit
c3d31352bf
@ -987,20 +987,6 @@ static int ena_queue_start_all(struct rte_eth_dev *dev,
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int ena_check_valid_conf(struct ena_adapter *adapter)
|
||||
{
|
||||
uint32_t mtu = adapter->edev_data->mtu;
|
||||
|
||||
if (mtu > adapter->max_mtu || mtu < ENA_MIN_MTU) {
|
||||
PMD_INIT_LOG(ERR,
|
||||
"Unsupported MTU of %d. Max MTU: %d, min MTU: %d\n",
|
||||
mtu, adapter->max_mtu, ENA_MIN_MTU);
|
||||
return ENA_COM_UNSUPPORTED;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
ena_calc_io_queue_size(struct ena_calc_queue_size_ctx *ctx,
|
||||
bool use_large_llq_hdr)
|
||||
@ -1165,13 +1151,6 @@ static int ena_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
|
||||
ena_dev = &adapter->ena_dev;
|
||||
ena_assert_msg(ena_dev != NULL, "Uninitialized device\n");
|
||||
|
||||
if (mtu > adapter->max_mtu || mtu < ENA_MIN_MTU) {
|
||||
PMD_DRV_LOG(ERR,
|
||||
"Invalid MTU setting. New MTU: %d, max MTU: %d, min MTU: %d\n",
|
||||
mtu, adapter->max_mtu, ENA_MIN_MTU);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
rc = ENA_PROXY(adapter, ena_com_set_dev_mtu, ena_dev, mtu);
|
||||
if (rc)
|
||||
PMD_DRV_LOG(ERR, "Could not set MTU: %d\n", mtu);
|
||||
@ -1193,10 +1172,6 @@ static int ena_start(struct rte_eth_dev *dev)
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
rc = ena_check_valid_conf(adapter);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
rc = ena_setup_rx_intr(dev);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
Loading…
Reference in New Issue
Block a user