Add support for updating MTU value.
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
Link status = Y
Link status event = Y
Queue start/stop = Y
Link status = Y
Link status event = Y
Queue start/stop = Y
Jumbo frame = Y
Promiscuous mode = Y
Allmulticast mode = Y
Jumbo frame = Y
Promiscuous mode = Y
Allmulticast mode = Y
static const uint32_t *atl_dev_supported_ptypes_get(struct rte_eth_dev *dev);
static const uint32_t *atl_dev_supported_ptypes_get(struct rte_eth_dev *dev);
+static int atl_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu);
+
/* Flow control */
static int atl_flow_ctrl_get(struct rte_eth_dev *dev,
struct rte_eth_fc_conf *fc_conf);
/* Flow control */
static int atl_flow_ctrl_get(struct rte_eth_dev *dev,
struct rte_eth_fc_conf *fc_conf);
.dev_infos_get = atl_dev_info_get,
.dev_supported_ptypes_get = atl_dev_supported_ptypes_get,
.dev_infos_get = atl_dev_info_get,
.dev_supported_ptypes_get = atl_dev_supported_ptypes_get,
+ .mtu_set = atl_dev_mtu_set,
+
/* Queue Control */
.rx_queue_start = atl_rx_queue_start,
.rx_queue_stop = atl_rx_queue_stop,
/* Queue Control */
.rx_queue_start = atl_rx_queue_start,
.rx_queue_stop = atl_rx_queue_stop,
+static int
+atl_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
+{
+ struct rte_eth_dev_info dev_info;
+ uint32_t frame_size = mtu + ETHER_HDR_LEN + ETHER_CRC_LEN;
+
+ atl_dev_info_get(dev, &dev_info);
+
+ if ((mtu < ETHER_MIN_MTU) || (frame_size > dev_info.max_rx_pktlen))
+ return -EINVAL;
+
+ /* update max frame size */
+ dev->data->dev_conf.rxmode.max_rx_pkt_len = frame_size;
+
+ return 0;
+}
+
static int
atl_dev_set_mc_addr_list(struct rte_eth_dev *dev,
struct ether_addr *mc_addr_set,
static int
atl_dev_set_mc_addr_list(struct rte_eth_dev *dev,
struct ether_addr *mc_addr_set,