Message ID | 5320298F.2010101@huawei.com |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
On Wed, Mar 12, 2014 at 05:31:59PM +0800, Ding Tianhong wrote: >The commit d3ab3ffd1d728d7ee77340e7e7e2c7cfe6a4013e >(bonding: use rlb_client_info->vlan_id instead of ->tag) >remove the rlb_client_info->tag, but occur some issues, >The vlan_get_tag() will return 0 for success and -EINVAL for >error, so the client_info->vlan_id always be set to 0 if the >vlan_get_tag return 0 for success, so the client_info would >never get a correct vlan id. > >We should only set the vlan id to 0 when the vlan_get_tag return error. > >Fixes: d3ab3ffd1d7 (bonding: use rlb_client_info->vlan_id instead of ->tag) > >CC: Ding Tianhong <dingtianhong@huawei.com> >CC: Jay Vosburgh <fubar@us.ibm.com> >CC: Andy Gospodarek <andy@greyhouse.net> >Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Acked-by: Veaceslav Falico <vfalico@redhat.com> >--- > drivers/net/bonding/bond_alb.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c >index a2c4747..e8f133e 100644 >--- a/drivers/net/bonding/bond_alb.c >+++ b/drivers/net/bonding/bond_alb.c >@@ -730,7 +730,7 @@ static struct slave *rlb_choose_channel(struct sk_buff *skb, struct bonding *bon > client_info->ntt = 0; > } > >- if (!vlan_get_tag(skb, &client_info->vlan_id)) >+ if (vlan_get_tag(skb, &client_info->vlan_id)) > client_info->vlan_id = 0; > > if (!client_info->assigned) { >-- >1.8.0 > > > -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Ding Tianhong <dingtianhong@huawei.com> Date: Wed, 12 Mar 2014 17:31:59 +0800 > The commit d3ab3ffd1d728d7ee77340e7e7e2c7cfe6a4013e > (bonding: use rlb_client_info->vlan_id instead of ->tag) > remove the rlb_client_info->tag, but occur some issues, > The vlan_get_tag() will return 0 for success and -EINVAL for > error, so the client_info->vlan_id always be set to 0 if the > vlan_get_tag return 0 for success, so the client_info would > never get a correct vlan id. > > We should only set the vlan id to 0 when the vlan_get_tag return error. > > Fixes: d3ab3ffd1d7 (bonding: use rlb_client_info->vlan_id instead of ->tag) > > CC: Ding Tianhong <dingtianhong@huawei.com> > CC: Jay Vosburgh <fubar@us.ibm.com> > CC: Andy Gospodarek <andy@greyhouse.net> > Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Applied, thanks. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c index a2c4747..e8f133e 100644 --- a/drivers/net/bonding/bond_alb.c +++ b/drivers/net/bonding/bond_alb.c @@ -730,7 +730,7 @@ static struct slave *rlb_choose_channel(struct sk_buff *skb, struct bonding *bon client_info->ntt = 0; } - if (!vlan_get_tag(skb, &client_info->vlan_id)) + if (vlan_get_tag(skb, &client_info->vlan_id)) client_info->vlan_id = 0; if (!client_info->assigned) {
The commit d3ab3ffd1d728d7ee77340e7e7e2c7cfe6a4013e (bonding: use rlb_client_info->vlan_id instead of ->tag) remove the rlb_client_info->tag, but occur some issues, The vlan_get_tag() will return 0 for success and -EINVAL for error, so the client_info->vlan_id always be set to 0 if the vlan_get_tag return 0 for success, so the client_info would never get a correct vlan id. We should only set the vlan id to 0 when the vlan_get_tag return error. Fixes: d3ab3ffd1d7 (bonding: use rlb_client_info->vlan_id instead of ->tag) CC: Ding Tianhong <dingtianhong@huawei.com> CC: Jay Vosburgh <fubar@us.ibm.com> CC: Andy Gospodarek <andy@greyhouse.net> Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> --- drivers/net/bonding/bond_alb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)