|
@@ -437,11 +437,10 @@ static void u32_remove_hw_knode(struct tcf_proto *tp, u32 handle)
|
|
|
offload.cls_u32 = &u32_offload;
|
|
|
|
|
|
if (tc_should_offload(dev, tp, 0)) {
|
|
|
+ tc_cls_common_offload_init(&u32_offload.common, tp);
|
|
|
offload.cls_u32->command = TC_CLSU32_DELETE_KNODE;
|
|
|
offload.cls_u32->knode.handle = handle;
|
|
|
- dev->netdev_ops->ndo_setup_tc(dev, TC_SETUP_CLSU32,
|
|
|
- tp->q->handle, tp->chain->index,
|
|
|
- tp->protocol, &offload);
|
|
|
+ dev->netdev_ops->ndo_setup_tc(dev, TC_SETUP_CLSU32, &offload);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -458,14 +457,13 @@ static int u32_replace_hw_hnode(struct tcf_proto *tp, struct tc_u_hnode *h,
|
|
|
|
|
|
offload.cls_u32 = &u32_offload;
|
|
|
|
|
|
+ tc_cls_common_offload_init(&u32_offload.common, tp);
|
|
|
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;
|
|
|
|
|
|
- err = dev->netdev_ops->ndo_setup_tc(dev, TC_SETUP_CLSU32, tp->q->handle,
|
|
|
- tp->chain->index, tp->protocol,
|
|
|
- &offload);
|
|
|
+ err = dev->netdev_ops->ndo_setup_tc(dev, TC_SETUP_CLSU32, &offload);
|
|
|
if (tc_skip_sw(flags))
|
|
|
return err;
|
|
|
|
|
@@ -481,14 +479,13 @@ static void u32_clear_hw_hnode(struct tcf_proto *tp, struct tc_u_hnode *h)
|
|
|
offload.cls_u32 = &u32_offload;
|
|
|
|
|
|
if (tc_should_offload(dev, tp, 0)) {
|
|
|
+ tc_cls_common_offload_init(&u32_offload.common, tp);
|
|
|
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;
|
|
|
|
|
|
- dev->netdev_ops->ndo_setup_tc(dev, TC_SETUP_CLSU32,
|
|
|
- tp->q->handle, tp->chain->index,
|
|
|
- tp->protocol, &offload);
|
|
|
+ dev->netdev_ops->ndo_setup_tc(dev, TC_SETUP_CLSU32, &offload);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -505,6 +502,7 @@ static int u32_replace_hw_knode(struct tcf_proto *tp, struct tc_u_knode *n,
|
|
|
if (!tc_should_offload(dev, tp, flags))
|
|
|
return tc_skip_sw(flags) ? -EINVAL : 0;
|
|
|
|
|
|
+ tc_cls_common_offload_init(&u32_offload.common, tp);
|
|
|
offload.cls_u32->command = TC_CLSU32_REPLACE_KNODE;
|
|
|
offload.cls_u32->knode.handle = n->handle;
|
|
|
offload.cls_u32->knode.fshift = n->fshift;
|
|
@@ -520,9 +518,7 @@ static int u32_replace_hw_knode(struct tcf_proto *tp, struct tc_u_knode *n,
|
|
|
if (n->ht_down)
|
|
|
offload.cls_u32->knode.link_handle = n->ht_down->handle;
|
|
|
|
|
|
- err = dev->netdev_ops->ndo_setup_tc(dev, TC_SETUP_CLSU32, tp->q->handle,
|
|
|
- tp->chain->index, tp->protocol,
|
|
|
- &offload);
|
|
|
+ err = dev->netdev_ops->ndo_setup_tc(dev, TC_SETUP_CLSU32, &offload);
|
|
|
|
|
|
if (!err)
|
|
|
n->flags |= TCA_CLS_FLAGS_IN_HW;
|