From patchwork Sat Oct 12 21:08:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Dumazet X-Patchwork-Id: 283020 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 3390E2C0098 for ; Sun, 13 Oct 2013 08:08:53 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753208Ab3JLVIh (ORCPT ); Sat, 12 Oct 2013 17:08:37 -0400 Received: from mail-pa0-f44.google.com ([209.85.220.44]:34269 "EHLO mail-pa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753125Ab3JLVIg (ORCPT ); Sat, 12 Oct 2013 17:08:36 -0400 Received: by mail-pa0-f44.google.com with SMTP id lf10so5900169pab.31 for ; Sat, 12 Oct 2013 14:08:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:subject:from:to:cc:date:content-type :content-transfer-encoding:mime-version; bh=lybC1c9l4pj1oOP3PJ+M9FxYrEiYLB+9jUDPjc1TcBQ=; b=lYvRGTLfmOQwoC02DuucBuncPA/QGPKLDIdSS+i85K0jI/wXaEXkn+etVONO5wJRk/ NqV+wVBVGXjh2spXrLFJxxLRph3pmZwBe2EeSHZQCFbJ5Ra00vwsENUTkegVePuVrS4/ v09LZp7h6naJNgqazEcrZnce4geAY5sTLZlp/hBHJvTAgaXSOtJrsXDKjPQtnq/KjBEp DLTQbmhMmtcRwC7FCK/oVp8HYZ1UjDHmmnu3zOyYEFCo7k415ELMuOUybl39H4QzpGCd 3wxv5Qh+QAp46tdbV4v3iJaW2rBuDM00f1fl+jCe2vTeQbwzj4FdTe4dB7FwmN6W35ht lVaA== X-Received: by 10.68.134.6 with SMTP id pg6mr27528672pbb.67.1381612115595; Sat, 12 Oct 2013 14:08:35 -0700 (PDT) Received: from [172.26.51.150] ([172.26.51.150]) by mx.google.com with ESMTPSA id bt1sm68202171pbb.2.1969.12.31.16.00.00 (version=SSLv3 cipher=RC4-SHA bits=128/128); Sat, 12 Oct 2013 14:08:35 -0700 (PDT) Message-ID: <1381612114.3392.14.camel@edumazet-glaptop.roam.corp.google.com> Subject: [PATCH] bnx2x: record rx queue for LRO packets From: Eric Dumazet To: David Miller Cc: netdev , Eilon Greenstein , Willem de Bruijn Date: Sat, 12 Oct 2013 14:08:34 -0700 X-Mailer: Evolution 3.2.3-0ubuntu6 Mime-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Eric Dumazet RPS support is kind of broken on bnx2x, because only non LRO packets get proper rx queue information. This triggers reorders, as it seems bnx2x like to generate a non LRO packet for segment including TCP PUSH flag : (this might be pure coincidence, but all the reorders I've seen involve segments with a PUSH) 11:13:34.335847 IP A > B: . 415808:447136(31328) ack 1 win 457 11:13:34.335992 IP A > B: . 447136:448560(1424) ack 1 win 457 11:13:34.336391 IP A > B: . 448560:479888(31328) ack 1 win 457 11:13:34.336425 IP A > B: P 511216:512640(1424) ack 1 win 457 11:13:34.336423 IP A > B: . 479888:511216(31328) ack 1 win 457 11:13:34.336924 IP A > B: . 512640:543968(31328) ack 1 win 457 11:13:34.336963 IP A > B: . 543968:575296(31328) ack 1 win 457 We must call skb_record_rx_queue() to properly give to RPS (and more generally for TX queue selection on forward path) the receive queue information. Similar fix is needed for skb_mark_napi_id(), but will be handled in a separate patch to ease stable backports. Signed-off-by: Eric Dumazet Cc: Willem de Bruijn Cc: Eilon Greenstein Acked-by: Dmitry Kravkov --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 1 + 1 file changed, 1 insertion(+) -- 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/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c index 0c64122..6e46cff 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c @@ -681,6 +681,7 @@ static void bnx2x_gro_receive(struct bnx2x *bp, struct bnx2x_fastpath *fp, } } #endif + skb_record_rx_queue(skb, fp->rx_queue); napi_gro_receive(&fp->napi, skb); }