From patchwork Fri Jun 4 12:06:22 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: jamal X-Patchwork-Id: 54570 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 91103B7D6A for ; Fri, 4 Jun 2010 22:06:32 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753253Ab0FDMG2 (ORCPT ); Fri, 4 Jun 2010 08:06:28 -0400 Received: from mail-gy0-f174.google.com ([209.85.160.174]:41160 "EHLO mail-gy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751850Ab0FDMG1 (ORCPT ); Fri, 4 Jun 2010 08:06:27 -0400 Received: by gye5 with SMTP id 5so788650gye.19 for ; Fri, 04 Jun 2010 05:06:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:subject:from:reply-to :to:cc:content-type:date:message-id:mime-version:x-mailer; bh=pPPLqR49cjwUafZMYJwMWu/JzkfdrQG8Yq4W2rtkkN0=; b=Mj5BlsRmk15YF0lTM0vDzg8nQlONf6paJzXmcpWIXm9t+0X8kH7dmEZyXLLDVM7wI1 P8qGgWT+wQugU3TXINEf3GTjBW0FdXpwh2q+xq3lfjBKQIeb0rq3qf56YZNS3Rab2IOo KOipWNyGAfkOyqFrgEoqFYLHhQ/c6825uzzRI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:subject:from:reply-to:to:cc:content-type:date:message-id :mime-version:x-mailer; b=O+3ZUq9+SqUtNIvKDCA0oQ0arnxhMq9IRxpu8tIB+YQaVBkpdJzmVEg2lE5Oo0inkY +gxiX49qdiZl/4hnOyNFcIKbTzpiEl/+2frC0C4E4qSfbtvuk+Q1kQlzA70EonOPZu/v Vs6QHAg2h1Q8YOTLfJQnPYIu2fld2NFWzvJR4= Received: by 10.224.65.29 with SMTP id g29mr5796967qai.262.1275653185841; Fri, 04 Jun 2010 05:06:25 -0700 (PDT) Received: from [10.0.0.26] (CPE0030ab124d2f-CM001bd7a7f1a0.cpe.net.cable.rogers.com [99.240.66.42]) by mx.google.com with ESMTPS id 8sm2060034qwj.40.2010.06.04.05.06.24 (version=SSLv3 cipher=RC4-MD5); Fri, 04 Jun 2010 05:06:24 -0700 (PDT) Subject: [PATCH net-next-2.6] net: Remove unnecessary net action assertion From: jamal Reply-To: hadi@cyberus.ca To: davem@davemloft.net Cc: Herbert Xu , Jiri Pirko , netdev@vger.kernel.org Date: Fri, 04 Jun 2010 08:06:22 -0400 Message-Id: <1275653182.3445.58.camel@bigi> Mime-Version: 1.0 X-Mailer: Evolution 2.26.1 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org I will followup with another (independent) change on pedit. cheers, jamal commit 45c644796fe2aa834918b15d7b41e57ccf86c1b3 Author: Jamal Hadi Salim Date: Fri Jun 4 06:16:30 2010 -0400 net: Remove unnecessary net action assertion The extra assertion to allow packet munging only when there are no other ptypes listening which may have worked around an old bug is unnecessary. It is sufficient to check if the skb is cloned before trampling on it. Thanks to Herbert Xu for being persistent and patient in getting this across. [Note that cloning checks and assertions are the general rule used by tc actions (documentation/networking/tc-actions-env-rules.txt)]. Signed-off-by: Jamal Hadi Salim diff --git a/net/core/dev.c b/net/core/dev.c index ec01a59..b272752 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -2662,9 +2662,6 @@ static inline struct sk_buff *handle_ing(struct sk_buff *skb, if (*pt_prev) { *ret = deliver_skb(skb, *pt_prev, orig_dev); *pt_prev = NULL; - } else { - /* Huh? Why does turning on AF_PACKET affect this? */ - skb->tc_verd = SET_TC_OK2MUNGE(skb->tc_verd); } switch (ing_filter(skb)) {