Configure initial application provided mtu on the KNI interface.
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
rte_eth_macaddr_get(port_id,
(struct ether_addr *)&conf.mac_addr);
+ rte_eth_dev_get_mtu(port_id, &conf.mtu);
+
memset(&ops, 0, sizeof(ops));
ops.port_id = port_id;
ops.change_mtu = kni_change_mtu;
/* mbuf size */
unsigned mbuf_size;
+ unsigned int mtu;
char mac_addr[6];
};
random_ether_addr(net_dev->dev_addr);
}
+ if (dev_info.mtu)
+ net_dev->mtu = dev_info.mtu;
+
ret = register_netdev(net_dev);
if (ret) {
pr_err("error %i registering device \"%s\"\n",
dev_info.force_bind = conf->force_bind;
dev_info.group_id = conf->group_id;
dev_info.mbuf_size = conf->mbuf_size;
+ dev_info.mtu = conf->mtu;
memcpy(dev_info.mac_addr, conf->mac_addr, ETHER_ADDR_LEN);
__extension__
uint8_t force_bind : 1; /* Flag to bind kernel thread */
char mac_addr[ETHER_ADDR_LEN]; /* MAC address assigned to KNI */
+ uint16_t mtu;
};
/**