From patchwork Sun Dec 1 22:30:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jamal Hadi Salim X-Patchwork-Id: 295734 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 7CBD72C007E for ; Mon, 2 Dec 2013 09:31:56 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752001Ab3LAWbw (ORCPT ); Sun, 1 Dec 2013 17:31:52 -0500 Received: from mail-ie0-f173.google.com ([209.85.223.173]:53640 "EHLO mail-ie0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751894Ab3LAWbu (ORCPT ); Sun, 1 Dec 2013 17:31:50 -0500 Received: by mail-ie0-f173.google.com with SMTP id to1so18926151ieb.4 for ; Sun, 01 Dec 2013 14:31:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=wufvFesmPbzixs4819Jrm9AsBpV45TBE3VIoMUzj0dg=; b=FXeZaCfLioDAx0SAGk97/kfAg/Qrw3HPOn1gOhzXwcs0eb17dLQ+Cvt33gPi6pm8ZM MshSNfuZTMT6FCWjq4ynJsFFxSZhpxIyzIxtNxlYSk9FojXq+CzSNb8FqCUK+oeJpnv1 QEU+kopm7Dlm0IMoV6WtDHaM0Mr/khqWiSqF1s70ZaVVYoBJmqcViKkCnyOnTEpueFu8 qiWcoIaGig4gwr/vHm9RUTzP+IFwMMOkR8+Jns66uh1kxeXHAxqZzGWp/Zz828xN+AKL nSJC333n8M/SN0hrnzSYFDYKCOYrbBa2snbKN+/z0J+5A1pvEGcG17EjvZGn69x63NEL ifLg== X-Gm-Message-State: ALoCoQmGOl8VmeL3tulxp/cYt761irjMRmGE9r8N88TQrMMRHEjSXh+wxVP8gkWhG27vdj7HsBQ+ X-Received: by 10.50.85.115 with SMTP id g19mr15121133igz.1.1385937110016; Sun, 01 Dec 2013 14:31:50 -0800 (PST) Received: from minipc.minipc (24-246-6-163.cable.teksavvy.com. [24.246.6.163]) by mx.google.com with ESMTPSA id t4sm32070281igm.10.2013.12.01.14.31.49 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 01 Dec 2013 14:31:49 -0800 (PST) From: Jamal Hadi Salim To: davem@davemloft.net Cc: netdev@vger.kernel.org, eric.dumazet@gmail.com, alexander.h.duyck@intel.com, ebiederm@xmission.com, jhs@mojatatu.com Subject: [PATCH 1/4] Provide default lookup function for actions that dont provide one Date: Sun, 1 Dec 2013 17:30:06 -0500 Message-Id: <1385937009-589-2-git-send-email-jhs@mojatatu.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1385937009-589-1-git-send-email-jhs@mojatatu.com> References: <1385937009-589-1-git-send-email-jhs@mojatatu.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Signed-off-by: Jamal Hadi Salim --- net/sched/act_api.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/net/sched/act_api.c b/net/sched/act_api.c index fd70728..3c974a0 100644 --- a/net/sched/act_api.c +++ b/net/sched/act_api.c @@ -279,6 +279,10 @@ int tcf_register_action(struct tc_action_ops *act) } act->next = NULL; *ap = act; + + if (!act->lookup) + act->lookup = tcf_hash_search; + write_unlock(&act_mod_lock); return 0; }