From patchwork Fri Sep 17 08:35:36 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Dumazet X-Patchwork-Id: 65045 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 B7F42B70A9 for ; Fri, 17 Sep 2010 18:35:46 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752833Ab0IQIfl (ORCPT ); Fri, 17 Sep 2010 04:35:41 -0400 Received: from mail-ww0-f47.google.com ([74.125.82.47]:45694 "EHLO mail-ww0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752266Ab0IQIfk (ORCPT ); Fri, 17 Sep 2010 04:35:40 -0400 Received: by wwf26 with SMTP id 26so1038454wwf.4 for ; Fri, 17 Sep 2010 01:35:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :content-type:date:message-id:mime-version:x-mailer :content-transfer-encoding; bh=yvKj5xTX38XFUFKYQMAFsDLUDlFQTW3VmieY+FKKexI=; b=o6THL7rYCCEB/xh8Vps9W9p+Ff2aOLJ0ztwh/MwGPEMK46Jkc7DW/PcMSiII1RCMZG BNV99p82wy1pat5YUZY29Z5pBeRcgzdWvmKFplr9iCBdjWRRT89fIy1cBwOV2TrsVI/a xyd/I0xXmw7eTsxhgVvb+qb8efr3+n0OOdyWQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; b=O8hqaPUm+57opax8+F+NS1o0+nUij4/2+ixIHYhsbUuBhKbHwJ5dVKnKarlPb8xGMZ dpG2NicyYhDgPssyIxB3RcZetlZNn9jkjNVjQZLc5NX16zouFbvGVez0/2SYpi3OXgUN VvuAm0VunN9jl+1AcP/P0dfNuzaRl1KQ8cFMY= Received: by 10.216.7.78 with SMTP id 56mr459663weo.96.1284712538981; Fri, 17 Sep 2010 01:35:38 -0700 (PDT) Received: from [10.150.51.217] (gw0.net.jmsp.net [212.23.165.14]) by mx.google.com with ESMTPS id p42sm2455512weq.36.2010.09.17.01.35.37 (version=SSLv3 cipher=RC4-MD5); Fri, 17 Sep 2010 01:35:38 -0700 (PDT) Subject: [PATCH net-next-2.6 2/2] ip_gre: add multiqueue support From: Eric Dumazet To: David Miller Cc: netdev Date: Fri, 17 Sep 2010 10:35:36 +0200 Message-ID: <1284712536.3391.40.camel@edumazet-laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Enable multiqueue support for non fallback GRE tunnels. # ip link add gre34 txqueues 8 type gre remote A.B.C.D Signed-off-by: Eric Dumazet --- net/ipv4/ip_gre.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -- 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 diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c index fc20e68..c708a25 100644 --- a/net/ipv4/ip_gre.c +++ b/net/ipv4/ip_gre.c @@ -664,7 +664,8 @@ static netdev_tx_t ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev { struct ip_tunnel *tunnel = netdev_priv(dev); struct net_device_stats *stats = &dev->stats; - struct netdev_queue *txq = netdev_get_tx_queue(dev, 0); + int n = skb_get_queue_mapping(skb); + struct netdev_queue *txq = netdev_get_tx_queue(dev, n); struct iphdr *old_iph = ip_hdr(skb); struct iphdr *tiph; u8 tos; @@ -1490,6 +1491,8 @@ static int ipgre_newlink(struct net *src_net, struct net_device *dev, struct nla if (!tb[IFLA_MTU]) dev->mtu = mtu; + dev->real_num_tx_queues = dev->num_tx_queues; + err = register_netdevice(dev); if (err) goto out;