From patchwork Thu Dec 6 20:54:56 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Gallatin X-Patchwork-Id: 204320 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 3B1792C00EC for ; Fri, 7 Dec 2012 07:55:19 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1947199Ab2LFUzN (ORCPT ); Thu, 6 Dec 2012 15:55:13 -0500 Received: from mail-gh0-f174.google.com ([209.85.160.174]:55684 "EHLO mail-gh0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1947192Ab2LFUzH (ORCPT ); Thu, 6 Dec 2012 15:55:07 -0500 Received: by mail-gh0-f174.google.com with SMTP id g15so1142669ghb.19 for ; Thu, 06 Dec 2012 12:55:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=iNp3qpaCIsButOj0P2k+NisYt8IzJieL1HeQZNcQj3g=; b=eIyBXhdblHDytT5PNv2vMWMl1FxTIjD3jw4s1ex9SESMY7OIf8JImiyuTID2Swxmx0 HJmIP7vGrwW2APQm4DKCtnH6a/YkEfQZnW9YLiuy/oJNhm9X5+fkdFAe4Dqw+lLqVGts Pw7FezZeDo4QLDJCE+uqfk+nKcBYybazO4EeuLYVB7vM4rxbAV0GtYyCKGzVpgU35+ML 0FFyEra89dCcjqhL+6ze1x6nhdR5T+A1cjGNm949+yaS3tlQeJzemwDExNQuxhp4iXhO 8rHXvVihGx0K7vuwO1z6dfrlpOibU5fajvirh2G9FqJntTVUv0FdkcOtwS9xDIDIQ1p3 EuoA== Received: by 10.101.22.3 with SMTP id z3mr1174683ani.13.1354827307189; Thu, 06 Dec 2012 12:55:07 -0800 (PST) Received: from drogon.sw.myri.com (c-24-125-204-77.hsd1.va.comcast.net. [24.125.204.77]) by mx.google.com with ESMTPS id z11sm9822252anj.13.2012.12.06.12.55.05 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 06 Dec 2012 12:55:06 -0800 (PST) From: Andrew Gallatin To: davem@davemloft.net Cc: netdev@vger.kernel.org, Andrew Gallatin Subject: [PATCH net-next 1/1] vlan: restore offload use on vlan transmit Date: Thu, 6 Dec 2012 15:54:56 -0500 Message-Id: <1354827296-12009-2-git-send-email-gallatin@myri.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1354827296-12009-1-git-send-email-gallatin@myri.com> References: <1354827296-12009-1-git-send-email-gallatin@myri.com> X-Gm-Message-State: ALoCoQmEMrtm+bgL3OPXumcPpwN4OxhPOpiEDP7K84po9IcuHJUmblkXSqCN/JPiyl+6UDqkcfD1 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This patch copies the vlan device's dev->features to its dev->vlan_features, which allows packets to arrive at vlan_dev_hard_start_xmit() with their offloads intact. When a packet destined for a vlan interface is transmitted, it passes through dev_hard_start_xmit() (and netif_skb_features()) twice. First on its way to vlan_dev_hard_start_xmit(), and then again on its way to the backing device's xmit handler. If the vlan device does not setup its dev->vlan_features, then netif_skb_features() will strip the features on the first trip through it (on the way to vlan_dev_hard_start_xmit()). Signed-off-by: Andrew Gallatin --- net/8021q/vlan_dev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c index 4a6d31a..9d4b3c9 100644 --- a/net/8021q/vlan_dev.c +++ b/net/8021q/vlan_dev.c @@ -559,6 +559,7 @@ static int vlan_dev_init(struct net_device *dev) dev->features |= real_dev->vlan_features | NETIF_F_LLTX; dev->gso_max_size = real_dev->gso_max_size; + dev->vlan_features = dev->features; /* ipv6 shared card related stuff */ dev->dev_id = real_dev->dev_id;