macvtap: fix the missing ret value of TUNSETQUEUE
Subsystems (2)
PATCH 1/2 macvtap: fix the missing ret value of TUNSETQUEUE
Commit 441ac0fcaadc76ad09771812382345001dd2b813
(macvtap: Convert to using rtnl lock) forget to return what macvtap_ioctl_set_queue() returns to its caller. This may break multiqueue API by always falling through to TUNGETFEATURES.
--- drivers/net/macvtap.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/net/macvtap.c +1 -0
@@ -1103,6 +1103,7 @@ static long macvtap_ioctl(struct file *file, unsigned int cmd,rtnl_lock (); ret =macvtap_ioctl_set_queue (file, u);rtnl_unlock (); +return ret;case TUNGETFEATURES : if (put_user(IFF_TAP | IFF_NO_PI | IFF_VNET_HDR |
Signature · 1 line
1.7.1
PATCH 2/2 macvtap: do not assume 802.1Q when send vlan packets
The hard-coded 8021.q proto will break 802.1ad traffic. So switch to use vlan->proto.
--- drivers/net/macvtap.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/macvtap.c +1 -1
@@ -869,7 +869,7 @@ static ssize_t macvtap_put_user(struct macvtap_queue *q,__be16 h_vlan_proto;__be16 h_vlan_TCI; } veth; - veth.h_vlan_proto =htons (ETH_P_8021Q ); + veth.h_vlan_proto = skb->vlan_proto; veth.h_vlan_TCI =htons (vlan_tx_tag_get (skb)); vlan_offset = offsetof(struct vlan_ethhdr , h_vlan_proto);
Signature · 1 line
1.7.1
From: Jason Wang <[email protected]>
Date: Tue, 16 Jul 2013 13:36:33 +0800
Quoted 7 lines
Commit
441ac0fcaadc76ad09771812382345001dd2b813
(macvtap: Convert to using rtnl lock) forget to return whatmacvtap_ioctl_set_queue()returns to its caller. This may break multiqueue API by always falling through to TUNGETFEATURES.Cc Vlad Yasevich <[email protected]>Signed-off-by Jason Wang <[email protected]>
Applied.
Re: [PATCH net 2/2] macvtap: do not assume 802.1Q when send vlan packets
In reply to Jason WangFrom: Jason Wang <[email protected]>
Date: Tue, 16 Jul 2013 13:36:34 +0800
Quoted 5 lines
The hard-coded 8021.q proto will break 802.1ad traffic. So switch to use
vlan->proto.Cc Basil Gor <[email protected]>Signed-off-by Jason Wang <[email protected]>
Applied.