Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 266907
b: refs/heads/master
c: 047af9c
h: refs/heads/master
i:
  266905: 3701ea3
  266903: 38b4ddb
v: v3
  • Loading branch information
Eric W. Biederman authored and David S. Miller committed Oct 21, 2011
1 parent 76f2086 commit f0880fc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 99f34b38cdc8f75a4b9adb5a617b118253b3efe1
refs/heads/master: 047af9cfedfa357e1497e327eaa893253ca51971
11 changes: 5 additions & 6 deletions trunk/drivers/net/macvtap.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,6 @@ static int macvtap_open(struct inode *inode, struct file *file)
{
struct net *net = current->nsproxy->net_ns;
struct net_device *dev = dev_get_by_index(net, iminor(inode));
struct macvlan_dev *vlan = netdev_priv(dev);
struct macvtap_queue *q;
int err;

Expand Down Expand Up @@ -376,12 +375,12 @@ static int macvtap_open(struct inode *inode, struct file *file)
/*
* so far only KVM virtio_net uses macvtap, enable zero copy between
* guest kernel and host kernel when lower device supports zerocopy
*
* The macvlan supports zerocopy iff the lower device supports zero
* copy so we don't have to look at the lower device directly.
*/
if (vlan) {
if ((vlan->lowerdev->features & NETIF_F_HIGHDMA) &&
(vlan->lowerdev->features & NETIF_F_SG))
sock_set_flag(&q->sk, SOCK_ZEROCOPY);
}
if ((dev->features & NETIF_F_HIGHDMA) && (dev->features & NETIF_F_SG))
sock_set_flag(&q->sk, SOCK_ZEROCOPY);

err = macvtap_set_queue(dev, file, q);
if (err)
Expand Down

0 comments on commit f0880fc

Please sign in to comment.