@@ -794,7 +794,7 @@ struct tc_to_netdev {
union {
u8 tc;
struct tc_cls_u32_offload *cls_u32;
- };
+ } tc_u;
};
But then all the users of this structure would need to be changed,
which results in this patch below. Should I submit this to net-next,
or is it addressed elsewhere?
@@ -4277,7 +4277,7 @@ int __bnx2x_setup_tc(struct net_device *dev, u32 handle, __be16 proto,
{
if (handle != TC_H_ROOT || tc->type != TC_SETUP_MQPRIO)
return -EINVAL;
- return bnx2x_setup_tc(dev, tc->tc);
+ return bnx2x_setup_tc(dev, tc->tc_u.tc);
}
/* called with rtnl_lock */
@@ -8403,20 +8403,20 @@ int __ixgbe_setup_tc(struct net_device *dev, u32 handle, __be16 proto,
if (!(dev->features & NETIF_F_HW_TC))
return -EINVAL;
- switch (tc->cls_u32->command) {
+ switch (tc->tc_u.cls_u32->command) {
case TC_CLSU32_NEW_KNODE:
case TC_CLSU32_REPLACE_KNODE:
return ixgbe_configure_clsu32(adapter,
- proto, tc->cls_u32);
+ proto, tc->tc_u.cls_u32);
case TC_CLSU32_DELETE_KNODE:
- return ixgbe_delete_clsu32(adapter, tc->cls_u32);
+ return ixgbe_delete_clsu32(adapter, tc->tc_u.cls_u32);
case TC_CLSU32_NEW_HNODE:
case TC_CLSU32_REPLACE_HNODE:
return ixgbe_configure_clsu32_add_hnode(adapter, proto,
- tc->cls_u32);
+ tc->tc_u.cls_u32);
case TC_CLSU32_DELETE_HNODE:
return ixgbe_configure_clsu32_del_hnode(adapter,
- tc->cls_u32);
+ tc->tc_u.cls_u32);
default:
return -EINVAL;
}
@@ -8425,7 +8425,7 @@ int __ixgbe_setup_tc(struct net_device *dev, u32 handle, __be16 proto,
if (handle != TC_H_ROOT || tc->type != TC_SETUP_MQPRIO)
return -EINVAL;
- return ixgbe_setup_tc(dev, tc->tc);
+ return ixgbe_setup_tc(dev, tc->tc_u.tc);
}
#ifdef CONFIG_PCI_IOV
@@ -75,7 +75,7 @@ static int __mlx4_en_setup_tc(struct net_device *dev, u32 handle, __be16 proto,
if (handle != TC_H_ROOT || tc->type != TC_SETUP_MQPRIO)
return -EINVAL;
- return mlx4_en_setup_tc(dev, tc->tc);
+ return mlx4_en_setup_tc(dev, tc->tc_u.tc);
}
#ifdef CONFIG_RFS_ACCEL
@@ -574,7 +574,7 @@ int efx_setup_tc(struct net_device *net_dev, u32 handle, __be16 proto,
if (handle != TC_H_ROOT || ntc->type != TC_SETUP_MQPRIO)
return -EINVAL;
- num_tc = ntc->tc;
+ num_tc = ntc->tc_u.tc;
if (efx_nic_rev(efx) < EFX_REV_FALCON_B0 || num_tc > EFX_MAX_TX_TC)
return -EINVAL;
@@ -794,7 +794,7 @@ struct tc_to_netdev {
union {
u8 tc;
struct tc_cls_u32_offload *cls_u32;
- };
+ } tc_u;
};
@@ -432,11 +432,11 @@ static void u32_remove_hw_knode(struct tcf_proto *tp, u32 handle)
struct tc_to_netdev offload;
offload.type = TC_SETUP_CLSU32;
- offload.cls_u32 = &u32_offload;
+ offload.tc_u.cls_u32 = &u32_offload;
if (dev->netdev_ops->ndo_setup_tc) {
- offload.cls_u32->command = TC_CLSU32_DELETE_KNODE;
- offload.cls_u32->knode.handle = handle;
+ offload.tc_u.cls_u32->command = TC_CLSU32_DELETE_KNODE;
+ offload.tc_u.cls_u32->knode.handle = handle;
dev->netdev_ops->ndo_setup_tc(dev, tp->q->handle,
tp->protocol, &offload);
}
@@ -449,13 +449,13 @@ static void u32_replace_hw_hnode(struct tcf_proto *tp, struct tc_u_hnode *h)
struct tc_to_netdev offload;
offload.type = TC_SETUP_CLSU32;
- offload.cls_u32 = &u32_offload;
+ offload.tc_u.cls_u32 = &u32_offload;
if (dev->netdev_ops->ndo_setup_tc) {
- offload.cls_u32->command = TC_CLSU32_NEW_HNODE;
- offload.cls_u32->hnode.divisor = h->divisor;
- offload.cls_u32->hnode.handle = h->handle;
- offload.cls_u32->hnode.prio = h->prio;
+ offload.tc_u.cls_u32->command = TC_CLSU32_NEW_HNODE;
+ offload.tc_u.cls_u32->hnode.divisor = h->divisor;
+ offload.tc_u.cls_u32->hnode.handle = h->handle;
+ offload.tc_u.cls_u32->hnode.prio = h->prio;
dev->netdev_ops->ndo_setup_tc(dev, tp->q->handle,
tp->protocol, &offload);
@@ -469,13 +469,13 @@ static void u32_clear_hw_hnode(struct tcf_proto *tp, struct tc_u_hnode *h)
struct tc_to_netdev offload;
offload.type = TC_SETUP_CLSU32;
- offload.cls_u32 = &u32_offload;
+ offload.tc_u.cls_u32 = &u32_offload;
if (dev->netdev_ops->ndo_setup_tc) {
- offload.cls_u32->command = TC_CLSU32_DELETE_HNODE;
- offload.cls_u32->hnode.divisor = h->divisor;
- offload.cls_u32->hnode.handle = h->handle;
- offload.cls_u32->hnode.prio = h->prio;
+ offload.tc_u.cls_u32->command = TC_CLSU32_DELETE_HNODE;
+ offload.tc_u.cls_u32->hnode.divisor = h->divisor;
+ offload.tc_u.cls_u32->hnode.handle = h->handle;
+ offload.tc_u.cls_u32->hnode.prio = h->prio;
dev->netdev_ops->ndo_setup_tc(dev, tp->q->handle,
tp->protocol, &offload);
@@ -489,23 +489,23 @@ static void u32_replace_hw_knode(struct tcf_proto *tp, struct tc_u_knode *n)
struct tc_to_netdev offload;
offload.type = TC_SETUP_CLSU32;
- offload.cls_u32 = &u32_offload;
+ offload.tc_u.cls_u32 = &u32_offload;
if (dev->netdev_ops->ndo_setup_tc) {
- offload.cls_u32->command = TC_CLSU32_REPLACE_KNODE;
- offload.cls_u32->knode.handle = n->handle;
- offload.cls_u32->knode.fshift = n->fshift;
+ offload.tc_u.cls_u32->command = TC_CLSU32_REPLACE_KNODE;
+ offload.tc_u.cls_u32->knode.handle = n->handle;
+ offload.tc_u.cls_u32->knode.fshift = n->fshift;
#ifdef CONFIG_CLS_U32_MARK
- offload.cls_u32->knode.val = n->val;
- offload.cls_u32->knode.mask = n->mask;
+ offload.tc_u.cls_u32->knode.val = n->val;
+ offload.tc_u.cls_u32->knode.mask = n->mask;
#else
- offload.cls_u32->knode.val = 0;
- offload.cls_u32->knode.mask = 0;
+ offload.tc_u.cls_u32->knode.val = 0;
+ offload.tc_u.cls_u32->knode.mask = 0;
#endif
- offload.cls_u32->knode.sel = &n->sel;
- offload.cls_u32->knode.exts = &n->exts;
+ offload.tc_u.cls_u32->knode.sel = &n->sel;
+ offload.tc_u.cls_u32->knode.exts = &n->exts;
if (n->ht_down)
- offload.cls_u32->knode.link_handle = n->ht_down->handle;
+ offload.tc_u.cls_u32->knode.link_handle = n->ht_down->handle;
dev->netdev_ops->ndo_setup_tc(dev, tp->q->handle,
tp->protocol, &offload);
@@ -142,7 +142,7 @@ static int mqprio_init(struct Qdisc *sch, struct nlattr *opt)
*/
if (qopt->hw) {
struct tc_to_netdev tc = {.type = TC_SETUP_MQPRIO,
- .tc = qopt->num_tc};
+ .tc_u.tc = qopt->num_tc};
priv->hw_owned = 1;
err = dev->netdev_ops->ndo_setup_tc(dev, sch->handle, 0, &tc);
@@ -5330,7 +5330,7 @@ static int __i40e_setup_tc(struct net_device *netdev, u32 handle, __be16 proto,
{
if (handle != TC_H_ROOT || tc->type != TC_SETUP_MQPRIO)
return -EINVAL;
- return i40e_setup_tc(netdev, tc->tc);
+ return i40e_setup_tc(netdev, tc->tc_u.tc);
}
/**