From patchwork Fri Dec 12 18:27:08 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: stephen hemminger X-Patchwork-Id: 13759 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.176.167]) by ozlabs.org (Postfix) with ESMTP id DDF02DE0AE for ; Sat, 13 Dec 2008 05:27:33 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759904AbYLLS1N (ORCPT ); Fri, 12 Dec 2008 13:27:13 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1759899AbYLLS1L (ORCPT ); Fri, 12 Dec 2008 13:27:11 -0500 Received: from mail.vyatta.com ([76.74.103.46]:58555 "EHLO mail.vyatta.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758628AbYLLS1K (ORCPT ); Fri, 12 Dec 2008 13:27:10 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.vyatta.com (Postfix) with ESMTP id 718334F4245; Fri, 12 Dec 2008 10:27:11 -0800 (PST) X-Virus-Scanned: amavisd-new at X-Spam-Flag: NO X-Spam-Score: -1.331 X-Spam-Level: X-Spam-Status: No, score=-1.331 tagged_above=-10 required=3 tests=[AWL=-0.615, BAYES_00=-2.599, FH_HOST_EQ_VERIZON_P=0.001, RCVD_IN_PBL=0.905, RCVD_IN_SORBS_DUL=0.877, RDNS_DYNAMIC=0.1] Received: from mail.vyatta.com ([127.0.0.1]) by localhost (mail.vyatta.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dHO2lunPPzRK; Fri, 12 Dec 2008 10:27:11 -0800 (PST) Received: from extreme (pool-96-225-207-155.ptldor.fios.verizon.net [96.225.207.155]) by mail.vyatta.com (Postfix) with ESMTP id DEDCF4F4236; Fri, 12 Dec 2008 10:27:10 -0800 (PST) Date: Fri, 12 Dec 2008 10:27:08 -0800 From: Stephen Hemminger To: David Miller Cc: stable@kernel.org, netdev@vger.kernel.org Subject: [PATCH] net: eliminate warning from NETIF_F_UFO on bridge Message-ID: <20081212102708.3f8dfbff@extreme> Organization: Vyatta X-Mailer: Claws Mail 3.5.0 (GTK+ 2.14.4; x86_64-pc-linux-gnu) Mime-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The bridge device always causes a warning because when it is first created it has the no checksum flag set along with all the segmentation/fragmentation offload bits. The code in register_netdevice incorrectly checks for only hardware checksum bit and ignores no checksum bit. Similar code is already in 2.6.28: commit b63365a2d60268a3988285d6c3c6003d7066f93a net: Fix disjunct computation of netdev features Signed-off-by: Stephen Hemminger --- Patch against 2.6.27.y -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/net/core/dev.c 2008-12-09 09:52:03.226334984 -0800 +++ b/net/core/dev.c 2008-12-09 09:53:15.527751814 -0800 @@ -3990,7 +3990,7 @@ int register_netdevice(struct net_device dev->features &= ~NETIF_F_TSO; } if (dev->features & NETIF_F_UFO) { - if (!(dev->features & NETIF_F_HW_CSUM)) { + if (!(dev->features & NETIF_F_GEN_CSUM)) { printk(KERN_ERR "%s: Dropping NETIF_F_UFO since no " "NETIF_F_HW_CSUM feature.\n", dev->name);