From patchwork Tue Feb 20 23:03:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Chan X-Patchwork-Id: 13564706 Received: from mail-qt1-f177.google.com (mail-qt1-f177.google.com [209.85.160.177]) (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 9F8466BB28 for ; Tue, 20 Feb 2024 23:03:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.177 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708470225; cv=none; b=KsejjHTPFP5fUHX6YrU4ib5xwq6h3NclfU8RYeVpzwXf6wIfYRsVhXmRVMycXQnB8ua80kNw34Sgucd7AnE7nA++mDWWLzW8JzlaHuAFSZIA0sWOvz+uEn6/2tUdcZ/VfGJllGYUZe1xiAjHm2h/p0NhOvwkPTaSE6tvanaZu5E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708470225; c=relaxed/simple; bh=U+2OzRWxaEL0DAitJdvIm1NZbh1w96rMggbXdBngXpg=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Type; b=CyreSqcI5cwW2QJb5frDtr8ggYAq4tbqzG0e9LsQjE7kQrxtXCZZVVpWfm/6iIaPq+RiviF4sVmVPJIQPYLBUPC67SDrPKN0x/HFA1aSWmJimDWfDiXB+abFdiOWTcuMrOYuwo1DYDIcF7eEfRTf+CONjKFQg+ZAK9L9RO7IKKM= 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=P+eouObl; arc=none smtp.client-ip=209.85.160.177 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="P+eouObl" Received: by mail-qt1-f177.google.com with SMTP id d75a77b69052e-42e2947a940so5277251cf.0 for ; Tue, 20 Feb 2024 15:03:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1708470222; x=1709075022; darn=vger.kernel.org; h=mime-version:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=UQwFpL9TJ6oUoIOWxcmQy8TWu9VYmpCmlucB2hw1LPI=; b=P+eouOblzlpXrIvvcbDXglHkI8cBFCIEtTMhR+RE1whVCHf73yjiSw3qSuHOQc93Wm CZtCP9DwRCGO7PmIZx747SPLmXylX1IHLWdn3xhz90ZHAciRmWes4ZR99K7lAPBHpTaM ONVXODd0CnhWNWNHBGL9ZHVCH7ieBqB9gnAUw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708470222; x=1709075022; h=mime-version:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=UQwFpL9TJ6oUoIOWxcmQy8TWu9VYmpCmlucB2hw1LPI=; b=t8WQICsa1w22KdFrRJ44UU+mCWv2fTl0SBcwgAWq4chfQO0130r+RkN7z37c/cQXoT MTwyushIKXq+Dejk4wSGtiDsdWna2/+RnpsMG7RnN+accmeOjzFi18G+8s/hIJzdZFeo cR24wxVnOEede/QADXGO56pJkLTGRQRQvAVf0KXioJeDYEpEzj43NzxtizCn5CV3crf3 Vsa88yPYukysT6w5w22TMI9x+2nN1ZrEat3Me7u5gU28VQdgi9sAF6FShoyUT6UYFSpk XfsLvRqpHN05+zQ+skyy0zgq1bGU3asFkUzKNCOsD7AblVBmLn/8Q6MO2ekaPfBpnuCm gKiQ== X-Gm-Message-State: AOJu0YwpH1EvafdDHQJyno+eL+hRtfDgD/WJy5E4ZTh3DUxDUCT2amf7 QPAdAVXO3MS7LEVsxMmW+RRxti3WqdoBrl2WmLOIaPhgszz3X1DTT4otH0iGGw== X-Google-Smtp-Source: AGHT+IGlf4Jdkig7ml4CpZ2Xm5EnVsEWWZ6O/6PCCRsx8syyfdAjhEuOrp2Cx6Uz3hR/c2F6SQ1N4g== X-Received: by 2002:a05:622a:15c4:b0:42c:774e:d63 with SMTP id d4-20020a05622a15c400b0042c774e0d63mr22792134qty.22.1708470222365; Tue, 20 Feb 2024 15:03:42 -0800 (PST) Received: from lvnvda5233.lvn.broadcom.net ([192.19.161.250]) by smtp.gmail.com with ESMTPSA id g10-20020ae9e10a000000b00785d7dda9easm3797966qkm.28.2024.02.20.15.03.41 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Feb 2024 15:03:41 -0800 (PST) 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 Subject: [PATCH net-next 00/10] bnxt_en: Ntuple filter improvements Date: Tue, 20 Feb 2024 15:03:07 -0800 Message-Id: <20240220230317.96341-1-michael.chan@broadcom.com> X-Mailer: git-send-email 2.32.0 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 The current Ntuple filter implementation has a limitation on 5750X (P5) and newer chips. The destination ring of the ntuple filter must be a valid ring in the RSS indirection table. Ntuple filters may not work if the RSS indirection table is modified by the user to only contain a subset of the rings. If an ntuple filter is set to a ring destination that is not in the RSS indirection table, the packet matching that filter will be placed in a random ring instead of the specified destination ring. This series of patches will fix the problem by using a separate VNIC for ntuple filters. The default VNIC will be dedicated for RSS and so the indirection table can be setup in any way and will not affect ntuple filters using the separate VNIC. Quite a bit of refactoring is needed to do the the VNIC and RSS context accounting in the first few patches. This is technically a bug fix, but I think the changes are too big for -net. Michael Chan (3): bnxt_en: Refactor ring reservation functions bnxt_en: Explicitly specify P5 completion rings to reserve bnxt_en: Check additional resources in bnxt_check_rings() Pavan Chebbi (6): bnxt_en: Improve RSS context reservation infrastructure bnxt_en: Refactor bnxt_set_features() bnxt_en: Define BNXT_VNIC_DEFAULT for the default vnic index bnxt_en: Provision for an additional VNIC for ntuple filters bnxt_en: Create and setup the additional VNIC for adding ntuple filters bnxt_en: Use the new VNIC to create ntuple filters Venkat Duvvuru (1): bnxt_en: Add bnxt_get_total_vnics() to calculate number of VNICs drivers/net/ethernet/broadcom/bnxt/bnxt.c | 487 +++++++++++------- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 20 + .../net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 4 +- 3 files changed, 311 insertions(+), 200 deletions(-)