Skip to content

Commit

Permalink
DPDK: vhost jumbo frame support
Browse files Browse the repository at this point in the history
When we set MTU of vhost0, the same should be applied to the vif of PMD
But the existing check was not allowing the same. Removing it.

Change-Id: I1dc0bb529f9b6a84830d7ed8a73d7d8a286b3c2f
Closes-bug: 1491680
  • Loading branch information
kirankn80 committed Apr 26, 2016
1 parent a1b0753 commit c5cbb52
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions dpdk/vr_dpdk_knidev.c
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ dpdk_knidev_change_mtu(uint8_t port_id, unsigned new_mtu)
struct vrouter *router = vrouter_get(0);
struct vr_interface *vif;
int i, ret;
uint8_t ethdev_port_id, slave_port_id;
uint8_t slave_port_id;
struct vr_dpdk_ethdev *ethdev = NULL;

if (port_id >= rte_eth_dev_count()) {
Expand Down Expand Up @@ -505,19 +505,15 @@ dpdk_knidev_change_mtu(uint8_t port_id, unsigned new_mtu)
for (i = 0; i < router->vr_max_interfaces; i++) {
vif = __vrouter_get_interface(router, i);
if (vif && (vif->vif_type == VIF_TYPE_PHYSICAL)) {
ethdev_port_id = (((struct vr_dpdk_ethdev *)(vif->vif_os))->
ethdev_port_id);
if (ethdev_port_id == port_id) {
/* Ethernet header size */
new_mtu += sizeof(struct vr_eth);
if (vr_dpdk.vlan_tag != VLAN_ID_INVALID) {
/* 802.1q header size */
new_mtu += sizeof(uint32_t);
}
vif->vif_mtu = new_mtu;
if (vif->vif_bridge)
vif->vif_bridge->vif_mtu = new_mtu;
}
/* Ethernet header size */
new_mtu += sizeof(struct vr_eth);
if (vr_dpdk.vlan_tag != VLAN_ID_INVALID) {
/* 802.1q header size */
new_mtu += sizeof(uint32_t);
}
vif->vif_mtu = new_mtu;
if (vif->vif_bridge)
vif->vif_bridge->vif_mtu = new_mtu;
}
}

Expand Down

0 comments on commit c5cbb52

Please sign in to comment.