net: sched: refactor reinsert action
The TC_ACT_REINSERT return type was added as an in-kernel only option to allow a packet ingress or egress redirect. This is used to avoid unnecessary skb clones in situations where they are not required. If a TC hook returns this code then the packet is 'reinserted' and no skb consume is carried out as no clone took place. This return type is only used in act_mirred. Rather than have the reinsert called from the main datapath, call it directly in act_mirred. Instead of returning TC_ACT_REINSERT, change the type to the new TC_ACT_CONSUMED which tells the caller that the packet has been stolen by another process and that no consume call is required. Moving all redirect calls to the act_mirred code is in preparation for tracking recursion created by act_mirred. Signed-off-by: John Hurley <john.hurley@netronome.com> Reviewed-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
5cdda5f1d6
commit
720f22fed8
@@ -279,7 +279,7 @@ struct tcf_result {
|
||||
};
|
||||
const struct tcf_proto *goto_tp;
|
||||
|
||||
/* used by the TC_ACT_REINSERT action */
|
||||
/* used in the skb_tc_reinsert function */
|
||||
struct {
|
||||
bool ingress;
|
||||
struct gnet_stats_queue *qstats;
|
||||
|
Reference in New Issue
Block a user