Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 40A9AC3B1BF for ; Sun, 16 Feb 2020 23:12:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0F006206D6 for ; Sun, 16 Feb 2020 23:12:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=pensando.io header.i=@pensando.io header.b="HUsMUd0n" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726652AbgBPXMJ (ORCPT ); Sun, 16 Feb 2020 18:12:09 -0500 Received: from mail-pl1-f195.google.com ([209.85.214.195]:35052 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726020AbgBPXMJ (ORCPT ); Sun, 16 Feb 2020 18:12:09 -0500 Received: by mail-pl1-f195.google.com with SMTP id g6so5957857plt.2 for ; Sun, 16 Feb 2020 15:12:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pensando.io; s=google; h=from:to:cc:subject:date:message-id; bh=zQ/jBcdNNxE33Bh09x48BXXjNYiCmSii8so/uiKhKag=; b=HUsMUd0nSTaxhvjyMRowLBU8WEo8kv//g0sjcTm9RmB3lUan/9O303HG0xWbRDxgph auq0gQEZExOm1C468ZQxwKfDUHC2ucLsAV3CUTQ4/dmvAlDBhWnV0xB+SPHRXdEZeO0t eAdZtzdUpx9hSVmgwUYRgz2Fc6K7GXXFRVhRrALcspTPwc6Of6SdJP7LpQEZiDXTuPmq oGWek6Bg+O1fP9EwkVvxwiqWFU9A7YUojbXTGvqywTmxu6uq9RmkAt5d2I+becFjAMPw Gbucc7uWhATUYwms6zV7KlcjkG/qaCc2L2pwMOoWGoRpeu7dSglnm14K68FXuhO6/zzb BK6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=zQ/jBcdNNxE33Bh09x48BXXjNYiCmSii8so/uiKhKag=; b=TyAHrbzBWyjv8FKlv6mt+GBcCk6fNAck7geweeHlXK7+KldSICorseuwF4STryri70 53JqR7PbOp/zq1gBJoa435untn/jyWeFGRnGpt6nCErCyozCvwmcjw6yO36YlaFTPmSz g/AhQcNzVkhA+f5waWYFiNAKIWkdmW6coclLyJ6ez/0DX8ZF+FLDGx7pZqNVLzxZa1mP rgwrLxG/DmK01f5/7njHw43XN/obi1XfECeTKk50ZhZ2sEp2kSoEHoWYrG+Vn9lzTC+g 0dYP+l6eeHEW4Vj30pVtS1CXkIDqrY5OEhCunPT3ksl49H+IMxhtwxkhSiEDOLIXO6Hq 9FsQ== X-Gm-Message-State: APjAAAVO9/0S5Qik3YKRMolKNlaBZViaMH3V1o/ZkIPVW/Ow+2wYm9nG BmBnAUHJuhtFAlY8P7OO0qKizA== X-Google-Smtp-Source: APXvYqxissoUD5ZL6kcH7UUZBN7EZ6bDMaksy6DrN0bwyev0d4IHUL9E5sfF6mXsealfneAudOkQfg== X-Received: by 2002:a17:90a:a409:: with SMTP id y9mr16741594pjp.119.1581894728394; Sun, 16 Feb 2020 15:12:08 -0800 (PST) Received: from driver-dev1.pensando.io ([12.226.153.42]) by smtp.gmail.com with ESMTPSA id 70sm14074573pgd.28.2020.02.16.15.12.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 16 Feb 2020 15:12:07 -0800 (PST) From: Shannon Nelson To: davem@davemloft.net, netdev@vger.kernel.org Cc: Shannon Nelson Subject: [PATCH net-next 0/9] ionic: Add support for Event Queues Date: Sun, 16 Feb 2020 15:11:49 -0800 Message-Id: <20200216231158.5678-1-snelson@pensando.io> X-Mailer: git-send-email 2.17.1 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org In configurations where we have many CPU cores and want lots of queues in each device, we can easily run out of interrupt resources, and so need to find ways to limit our usage, either by using fewer queues, or by multiplexing the interrupt needs. This patchset adds a new EventQueue feature that can be used for multiplexing the interrupts if we find that we can't get enough from the system to support our configuration. We can create a small number of EQs that use interrupts, and have the TxRx queue pairs subscribe to event messages that come through the EQs, selecting an EQ with (TxIndex % numEqs). The interrupt messages normally generated by packet events become events in the EQ, and the EQ handler will schedule napi sessions for the queues subscribed to the particular event. The use of EQs is driven by the firmware configuration - if it shows support for ethernet event queues (eq_count in the device identity), the driver will try to use them instead of regular interrupts per TxRx queuepair. If for some reason the EQ setup fails, the driver falls back to using regular TxRx interrupts. The first 3 patches are prep work, the next 4 build up the Event Queue support, the 8th links in and uses the new EQs, and the final patch adds a bit of debugging assistance if things ever go very wrong in probe. Signed-off-by: Shannon Nelson Shannon Nelson (9): ionic: change param from lif to ionic ionic: rename rdma eqs field ionic: replace lif list with xarray ionic: add event queue definitions to hw interface ionic: rename napi irq functions ionic: add functions for setup and tear down event queues ionic: add q ident query for eq ionic: add basic eq support ionic: keep ionic dev on lif init fail drivers/net/ethernet/pensando/ionic/ionic.h | 20 +- .../ethernet/pensando/ionic/ionic_bus_pci.c | 8 + .../ethernet/pensando/ionic/ionic_debugfs.c | 34 ++ .../ethernet/pensando/ionic/ionic_debugfs.h | 2 + .../net/ethernet/pensando/ionic/ionic_dev.c | 357 ++++++++++++++++++ .../net/ethernet/pensando/ionic/ionic_dev.h | 29 ++ .../net/ethernet/pensando/ionic/ionic_if.h | 86 +++++ .../net/ethernet/pensando/ionic/ionic_lif.c | 265 ++++++++----- .../net/ethernet/pensando/ionic/ionic_lif.h | 7 +- .../net/ethernet/pensando/ionic/ionic_txrx.c | 63 +++- .../net/ethernet/pensando/ionic/ionic_txrx.h | 1 + 11 files changed, 772 insertions(+), 100 deletions(-) -- 2.17.1