aboutsummaryrefslogtreecommitdiffstats
path: root/net/openvswitch/vport-internal_dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/openvswitch/vport-internal_dev.c')
-rw-r--r--net/openvswitch/vport-internal_dev.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/net/openvswitch/vport-internal_dev.c b/net/openvswitch/vport-internal_dev.c
index 4061b9ee07f7..5d460c37df07 100644
--- a/net/openvswitch/vport-internal_dev.c
+++ b/net/openvswitch/vport-internal_dev.c
@@ -144,7 +144,7 @@ static void do_setup(struct net_device *netdev)
144 netdev->tx_queue_len = 0; 144 netdev->tx_queue_len = 0;
145 145
146 netdev->features = NETIF_F_LLTX | NETIF_F_SG | NETIF_F_FRAGLIST | 146 netdev->features = NETIF_F_LLTX | NETIF_F_SG | NETIF_F_FRAGLIST |
147 NETIF_F_HIGHDMA | NETIF_F_HW_CSUM | NETIF_F_TSO; 147 NETIF_F_HIGHDMA | NETIF_F_HW_CSUM | NETIF_F_TSO;
148 148
149 netdev->vlan_features = netdev->features; 149 netdev->vlan_features = netdev->features;
150 netdev->features |= NETIF_F_HW_VLAN_TX; 150 netdev->features |= NETIF_F_HW_VLAN_TX;
@@ -175,9 +175,14 @@ static struct vport *internal_dev_create(const struct vport_parms *parms)
175 goto error_free_vport; 175 goto error_free_vport;
176 } 176 }
177 177
178 dev_net_set(netdev_vport->dev, ovs_dp_get_net(vport->dp));
178 internal_dev = internal_dev_priv(netdev_vport->dev); 179 internal_dev = internal_dev_priv(netdev_vport->dev);
179 internal_dev->vport = vport; 180 internal_dev->vport = vport;
180 181
182 /* Restrict bridge port to current netns. */
183 if (vport->port_no == OVSP_LOCAL)
184 netdev_vport->dev->features |= NETIF_F_NETNS_LOCAL;
185
181 err = register_netdevice(netdev_vport->dev); 186 err = register_netdevice(netdev_vport->dev);
182 if (err) 187 if (err)
183 goto error_free_netdev; 188 goto error_free_netdev;