From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AB10B3E51D9 for ; Thu, 23 Apr 2026 09:39:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776937156; cv=none; b=QDNzFTWgMaon2mlcRwM33RAMtaH0rlhobc1eqxWl5JZboLP3DJZSdVR1Hy+6AElQ9WxJ3aETIRCsuJFR/iO7vm+YErDcReDEl3boTjxaRyBsoiyApaCstm1+T8hsSP37eYiD+FCXQy0DCC8IIJYaqYKKPFzj/AGIzTCDXFP0SE0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776937156; c=relaxed/simple; bh=n8PIjgIUEEPbYl8wiqKvWUmCj65cJf49TySsuytpK7A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=F7xoQB1rnOzlumXvzSyWCvI8yevjNqMr1IhaQjZPAAKDsz7PLI0WVAsqcyrjFzss5JMNFbDHv8Rz7ibUBV78GQ0zMn0IsA8wBQbVcJhy/jqgUkP3dJ9A8Q6UVmHzTytWAXM0PgwUh2EdVwWvC4ubjQpuwVtQFZjD1hoNnzUnoHI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=iPyV12jO; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="iPyV12jO" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1776937152; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4Xo6oUDKNyK+qqRNSbY/aof+abDZD7/ZcXyiZroh3s8=; b=iPyV12jOzeo1A0vaOAMTT0aZpcFdSHGBSVeEn6m9oTa/qDe4fPF8OWC8PC10r6eT3pEwrk EeeP/RCr41Yjk6C8EQ3pXEQYtN3ACPOXkwK0uJmnaW7lpT+EMVG7Oc9Dt2qJO9npoz/q7g TeVtrTNwSOjx7Hl/fZqkORBhaAdfqoM= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-318-7rjCWyeWPdqouL5UKDV3UQ-1; Thu, 23 Apr 2026 05:39:08 -0400 X-MC-Unique: 7rjCWyeWPdqouL5UKDV3UQ-1 X-Mimecast-MFC-AGG-ID: 7rjCWyeWPdqouL5UKDV3UQ_1776937146 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 302DF1800345; Thu, 23 Apr 2026 09:39:06 +0000 (UTC) Received: from gerbillo.redhat.com (unknown [10.44.32.251]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 51A6A300756E; Thu, 23 Apr 2026 09:39:02 +0000 (UTC) From: Paolo Abeni To: rkannoth@marvell.com Cc: davem@davemloft.net, sgoutham@marvell.com, pabeni@redhat.com, sumang@marvell.com, dan.carpenter@linaro.org, error27@gmail.com, andrew+netdev@lunn.ch, kuba@kernel.org, horms@kernel.org, linux-kernel@vger.kernel.org, edumazet@google.com, netdev@vger.kernel.org Subject: Re: [v2,net,01/11] octeontx2-af: npc: cn20k: Propagate MCAM key-type errors on cn20k Date: Thu, 23 Apr 2026 11:38:53 +0200 Message-ID: <20260423093853.138458-1-pabeni@redhat.com> In-Reply-To: <20260420023442.3295891-2-rkannoth@marvell.com> References: <20260420023442.3295891-2-rkannoth@marvell.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 This is an AI-generated review of your patch. The human sending this email has considered the AI review valid, or at least plausible. For local reproduction steps see https://netdev-ai.bots.linux.dev/ai-local.html --- octeontx2-af: npc: cn20k: Propagate MCAM key-type errors on cn20k This patch converts several cn20k NPC functions from void to int return types to propagate MCAM key-type lookup errors. It adds error checking for npc_mcam_idx_2_key_type() and threads these errors through the cn20k MCAM handlers. Link: https://lore.kernel.org/netdev/adiQJvuKlEhq2ILx@stanley.mountain/ > diff --git a/drivers/net/ethernet/marvell/octeontx2/af/cn20k/npc.c b/drivers/net/ethernet/marvell/octeontx2/af/cn20k/npc.c > index 7291fdb89b03..18d70f4527d1 100644 > --- a/drivers/net/ethernet/marvell/octeontx2/af/cn20k/npc.c > +++ b/drivers/net/ethernet/marvell/octeontx2/af/cn20k/npc.c [ ... ] > @@ -1415,9 +1435,9 @@ int rvu_mbox_handler_npc_cn20k_mcam_alloc_and_write_entry(struct rvu *rvu, > else > nix_intf = pfvf->nix_rx_intf; > > - npc_cn20k_config_mcam_entry(rvu, blkaddr, entry, nix_intf, > - &req->entry_data, req->enable_entry, > - req->hw_prio, req->req_kw_type); > + rc = npc_cn20k_config_mcam_entry(rvu, blkaddr, entry, nix_intf, > + &req->entry_data, req->enable_entry, > + req->hw_prio, req->req_kw_type); > > mutex_unlock(&mcam->lock); > > rsp->entry = entry_rsp.entry; > return 0; Does this function need to return rc instead of 0? If npc_cn20k_config_mcam_entry() fails (for example, due to an invalid key type), the function still returns success to the caller. The mailbox response indicates the entry was successfully allocated and configured, but the hardware entry may be in an undefined state. [ ... ]