From patchwork Mon Mar 25 22:29:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Chan X-Patchwork-Id: 13603111 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-ot1-f49.google.com (mail-ot1-f49.google.com [209.85.210.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F2B4284D1D for ; Mon, 25 Mar 2024 22:29:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711405790; cv=none; b=lY0uzLcYU5/maLUFiVMd8K3NuuMwYAdUH/9djdTj1Xr/GD4UgB2IuTfy+Gucr/E7+v0slSRzmi0597esQgVplT55SFZ+TovLhQNw36tcg7YMVjCnqD77/wNLwqqGDDhBtOuxiifZUH7mtgj6K/1+uw+oMo2gpzIgq8SSGVRmgck= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711405790; c=relaxed/simple; bh=79NWRLX1Kvro4U48dgrwlYgsigypOyVTChxat/6OZVg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=SyM5UDz/Yi3zN/rFwMwDpC0e1S25WUFaXOzZ/Jx5ag+r2GiWBAaLm5o8XJ2aBi21CMsx/y7L2KTfoLV8VQLjODzMaE8QWW6lF+eonvem4yVJML8vco6wapZhDJXP4UHGENmrzqa+YW97at/IOkVCtqTmnqxPVIkq9qlAnfbCxmw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b=WG1IVS2e; arc=none smtp.client-ip=209.85.210.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="WG1IVS2e" Received: by mail-ot1-f49.google.com with SMTP id 46e09a7af769-6e695b7391dso2429765a34.1 for ; Mon, 25 Mar 2024 15:29:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1711405788; x=1712010588; darn=vger.kernel.org; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=kAeikOVigfK+k8KSzIIp8bnbiUONY6sZ2cAr+yFRmrk=; b=WG1IVS2e+HN3NhQcsUBHqBg+VogZvAYygOw5u+kze0zFs70iPgAiBPZLNX/DaW2CTD C/leOoU0OE/YvTulYbCxPT/BrbUmH8vjRbmWCkLwVB6oTElgaJ8yPnmrxBcozrnaSw6+ tzwYPfeSUARPV7m8EvS0JqPQDkNaJ+dCeWV1o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711405788; x=1712010588; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=kAeikOVigfK+k8KSzIIp8bnbiUONY6sZ2cAr+yFRmrk=; b=nYmqcnLhpja7EHjK/mlVZXk1D99GLb46Y9jDgx16uzhsZEILSlWW3LoQdGS4Y0Mszo T7GZrTT7YcwNaIWBqLn7paWCCg3DbEqa0Ps+PrERkIiHRHrD1/HePmyuHEMM+4ZztR3t EE5a2ajESrL1llP/xeGkofmGJLmHJ1fGLseH4I9SUG4fpbCjsO+ykHyqV35tPzhHujGg OPDRLyuMJZwaqukVxEpaQ17U2I3/TsNv5SkIhWgNpjVlDgOvY/0hrFS68HdDTJNbsx9T V6qlvHmHDeMWLZaXRfrah20uqlI0HJDQeS9qOfMsCtSuFA1GsI+qIaUZiHO/7gYM2frr yk1w== X-Gm-Message-State: AOJu0YwpOHVh63iOIRNsR5m0ohnX1GwoswFAew4YQPcVNkTVtS89gkAf sZ8NLjSC5jfmddvuZrbnvJESss+NKEcmC2d4PkJKZQu0I7ptliC0x32kgFN5AA== X-Google-Smtp-Source: AGHT+IGynZ1QexVnk70mY0/OFSYCeVLxgD2aZY9p8uwdo2T57gIv78ZN5zoaPWG4qhCQvH4onMHY6g== X-Received: by 2002:a05:6830:16c8:b0:6e6:c615:c0ec with SMTP id l8-20020a05683016c800b006e6c615c0ecmr8087317otr.22.1711405787674; Mon, 25 Mar 2024 15:29:47 -0700 (PDT) Received: from lvnvda5233.lvn.broadcom.net ([192.19.161.250]) by smtp.gmail.com with ESMTPSA id t10-20020a63dd0a000000b005e438fe702dsm6301610pgg.65.2024.03.25.15.29.45 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Mar 2024 15:29:46 -0700 (PDT) From: Michael Chan To: davem@davemloft.net Cc: netdev@vger.kernel.org, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, pavan.chebbi@broadcom.com, andrew.gospodarek@broadcom.com, Kalesh AP Subject: [PATCH net-next 11/12] bnxt_en: Refactor bnxt_cfg_rfs_ring_tbl_idx() Date: Mon, 25 Mar 2024 15:29:01 -0700 Message-Id: <20240325222902.220712-12-michael.chan@broadcom.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20240325222902.220712-1-michael.chan@broadcom.com> References: <20240325222902.220712-1-michael.chan@broadcom.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org From: Pavan Chebbi Refactor bnxt_cfg_rfs_ring_tbl_idx() to pass in the filter structure pointer instead of the RX ring number. This will allow an ntuple filter to be set up for the non-default RSS contexts in the next patch. Reviewed-by: Kalesh AP Signed-off-by: Pavan Chebbi Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index 8aa3db2ceece..88d4116cfd79 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -5789,8 +5789,10 @@ void bnxt_fill_ipv6_mask(__be32 mask[4]) static void bnxt_cfg_rfs_ring_tbl_idx(struct bnxt *bp, struct hwrm_cfa_ntuple_filter_alloc_input *req, - u16 rxq) + struct bnxt_ntuple_filter *fltr) { + u16 rxq = fltr->base.rxq; + if (BNXT_SUPPORTS_NTUPLE_VNIC(bp)) { struct bnxt_vnic_info *vnic; u32 enables; @@ -5831,7 +5833,7 @@ int bnxt_hwrm_cfa_ntuple_filter_alloc(struct bnxt *bp, req->flags = cpu_to_le32(CFA_NTUPLE_FILTER_ALLOC_REQ_FLAGS_DROP); } else if (bp->fw_cap & BNXT_FW_CAP_CFA_RFS_RING_TBL_IDX_V2) { - bnxt_cfg_rfs_ring_tbl_idx(bp, req, fltr->base.rxq); + bnxt_cfg_rfs_ring_tbl_idx(bp, req, fltr); } else { vnic = &bp->vnic_info[fltr->base.rxq + 1]; req->dst_id = cpu_to_le16(vnic->fw_vnic_id);