From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cong Wang Subject: Re: [PATCH v3 net-next 4/4] net/sched: act_mirred: Implement ingress actions Date: Thu, 6 Oct 2016 17:49:16 -0700 Message-ID: References: <1475147012-15538-1-git-send-email-shmulik.ladkani@gmail.com> <1475147012-15538-5-git-send-email-shmulik.ladkani@gmail.com> <2d606b1d-0281-403b-cf82-c02c785c0f10@mojatatu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: Shmulik Ladkani , David Miller , Eric Dumazet , Daniel Borkmann , Linux Kernel Network Developers , Eric Dumazet To: Jamal Hadi Salim Return-path: Received: from mail-io0-f176.google.com ([209.85.223.176]:34268 "EHLO mail-io0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936356AbcJGAti (ORCPT ); Thu, 6 Oct 2016 20:49:38 -0400 Received: by mail-io0-f176.google.com with SMTP id r30so32694472ioi.1 for ; Thu, 06 Oct 2016 17:49:38 -0700 (PDT) In-Reply-To: <2d606b1d-0281-403b-cf82-c02c785c0f10@mojatatu.com> Sender: netdev-owner@vger.kernel.org List-ID: On Thu, Oct 6, 2016 at 5:17 PM, Jamal Hadi Salim wrote: > I dont believe we need to bother with the return code in this case. Why? For a quick example, STOLEN vs. SHOT: result = tc_classify(skb, filter, &res, false); if (result >= 0) { #ifdef CONFIG_NET_CLS_ACT switch (result) { case TC_ACT_STOLEN: case TC_ACT_QUEUED: *qerr = NET_XMIT_SUCCESS | __NET_XMIT_STOLEN; case TC_ACT_SHOT: return 0; } #endif Note, *qerr is the return value to ->enqueue().