From patchwork Thu Mar 27 21:32:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vlad Yasevich X-Patchwork-Id: 334468 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 AC37F14009A for ; Fri, 28 Mar 2014 08:33:15 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757264AbaC0VdI (ORCPT ); Thu, 27 Mar 2014 17:33:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:22242 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756977AbaC0Vcg (ORCPT ); Thu, 27 Mar 2014 17:32:36 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s2RLWZD3030356 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 27 Mar 2014 17:32:35 -0400 Received: from vyasevic.redhat.com (ovpn-113-95.phx2.redhat.com [10.3.113.95]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s2RLWW6N008691; Thu, 27 Mar 2014 17:32:34 -0400 From: Vlad Yasevich To: netdev@vger.kernel.org Cc: bridge@lists.linux-foundation.org, shemminger@vyatta.com, Vlad Yasevich Subject: [PATCH v3 net 1/2] net: Allow modules to use is_skb_forwardable Date: Thu, 27 Mar 2014 17:32:29 -0400 Message-Id: <1395955950-17630-2-git-send-email-vyasevic@redhat.com> In-Reply-To: <1395955950-17630-1-git-send-email-vyasevic@redhat.com> References: <1395955950-17630-1-git-send-email-vyasevic@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Signed-off-by: Vlad Yasevich --- include/linux/netdevice.h | 1 + net/core/dev.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index e8eeebd..d855794 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -2551,6 +2551,7 @@ int dev_get_phys_port_id(struct net_device *dev, int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev, struct netdev_queue *txq); int dev_forward_skb(struct net_device *dev, struct sk_buff *skb); +bool is_skb_forwardable(struct net_device *dev, struct sk_buff *skb); extern int netdev_budget; diff --git a/net/core/dev.c b/net/core/dev.c index b1b0c8d..b3639c7 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -1645,8 +1645,7 @@ static inline void net_timestamp_set(struct sk_buff *skb) __net_timestamp(SKB); \ } \ -static inline bool is_skb_forwardable(struct net_device *dev, - struct sk_buff *skb) +bool is_skb_forwardable(struct net_device *dev, struct sk_buff *skb) { unsigned int len; @@ -1665,6 +1664,7 @@ static inline bool is_skb_forwardable(struct net_device *dev, return false; } +EXPORT_SYMBOL_GPL(is_skb_forwardable); /** * dev_forward_skb - loopback an skb to another netif