From patchwork Mon Feb 19 12:55:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Subbaraya Sundeep X-Patchwork-Id: 203049 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp1262879dyc; Mon, 19 Feb 2024 04:56:03 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW6CHdJ5HabjTEC1XRWNjyNmBuvanUXGGx/jLIf0oi/WhAIRazuZUHZmwiTWT+9gLjQrNZzJzXvcTg8FnJFmX5ZmJsnwQ== X-Google-Smtp-Source: AGHT+IFsebu0KgLU8KTs3VxeP3noP+xzrUqk953hLhHm8T4PigJBjKzhtumsIdsrdeH375Vq+bTZ X-Received: by 2002:a05:6102:1286:b0:470:4729:dbbb with SMTP id jc6-20020a056102128600b004704729dbbbmr2952146vsb.0.1708347363781; Mon, 19 Feb 2024 04:56:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708347363; cv=pass; d=google.com; s=arc-20160816; b=NnPP08SL01sj1j9GnPrUTAHu5fMQtJumFWFIzkcj1ta/C8R/V62JUmZAWKiZ4Sy5CT +MM7w8QcqTYEHIevFE075UP5Vm4ZWe8MSQ+cvkYhqfTFths9KIVVNDZGBohoNywR2pyk ZnNODD8h/TOtSHB/dFwkLdIy2lY8CkEaCgmsqy5KbuCyOL6buH2Ijr7cBWHTOePUz0Yi JO/eC/bHT2q1NvvChAJ5c4TFFQ+o5kjcv4WnNWlE+YrX5KZ4WQadog95xj3EtlidmdoO jo6puvySPDXq8KVq1ccy8tBwKSsrgloLNxdWlbNZp7hm3a7bvJz1hXyoX2kTgZ2bKb1R DzBg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:subject:cc:to:from:dkim-signature; bh=+Fo9IVYowPyi1LncksOQzJGd5fMCzgpCmmcZhOyruV4=; fh=v5qsui9zqlYTcjwbmifmQwi9mCJC1Y7QSRb3GowZD4E=; b=fFZfC8VCsIdYFgNgqk47HEIGnqSKGgxmXB42+HW16HFTtvwTVDHjpvYqRWLwK9zxo7 1RjYbRMZcSrRF5dcAmH/s5OP6afSj5tEg9OhncTsQI0KWB9FJlUYniRm7xy2R8RcPbpm Ok1iM1u8SUjURrToXo1h+s1kaFLXhO1W2eToNDs99wr0llM3zwjHIBYFdeFxUe4cmXxW RI5MR6+bW5DTX20PklqYR+sXvAxdwGBZL0q6C0rBhZ/eSyag7KxD0JuKvD536XqUlUak 5Y+w/YNff+nSwWUTej5b/UZ1wXwZgcIkiHs65jmBreK3Lr3n24ijmu9A2+hh3F3nICDj b2Lg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=hVtVF45y; arc=pass (i=1 spf=pass spfdomain=marvell.com dkim=pass dkdomain=marvell.com dmarc=pass fromdomain=marvell.com); spf=pass (google.com: domain of linux-kernel+bounces-71356-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71356-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id t22-20020a05622a149600b0042e1243cc94si2147776qtx.438.2024.02.19.04.56.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 04:56:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-71356-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=hVtVF45y; arc=pass (i=1 spf=pass spfdomain=marvell.com dkim=pass dkdomain=marvell.com dmarc=pass fromdomain=marvell.com); spf=pass (google.com: domain of linux-kernel+bounces-71356-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71356-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 905401C2116B for ; Mon, 19 Feb 2024 12:56:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 78A013307B; Mon, 19 Feb 2024 12:55:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=marvell.com header.i=@marvell.com header.b="hVtVF45y" Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) (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 3B4802E844; Mon, 19 Feb 2024 12:55:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=67.231.156.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708347344; cv=none; b=DEdBhMbSyguCEYQ2j6LPkd/PCmPJW9CHFIFPT7kk7qFvGmXwySaLGtxofK4Yfl2xdvY3WCo4pmlmPf1Bu32IkV7OrVcbANlMsl95Q1Inar6vhPztCF3LXQ+bydpK1va/gOk8anWUGWfyoO2q734JXjKaNT15TIpy86sTG/9dLyA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708347344; c=relaxed/simple; bh=2eoTnZ/3sqpihyRo3EwafjNnuu63QfId39rcykL5KBY=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=mXoYM6xYf6sk5cntWnOBb96oagCiHSvZz1L8CgnyyiPRFiIaDQodUDphrIf31yHO6rIW3eGp9l0HXeK3WeCQjHekK2TNBiS0ji8QtMWT8gPOuMWuK05BDT2ZslIxhqO9K4TvCoZGzgur0qn2d9R8iSbYZTQV/FzQPEQAp6mkSKo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=marvell.com; spf=pass smtp.mailfrom=marvell.com; dkim=pass (2048-bit key) header.d=marvell.com header.i=@marvell.com header.b=hVtVF45y; arc=none smtp.client-ip=67.231.156.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=marvell.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=marvell.com Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 41INnvMf020664; Mon, 19 Feb 2024 04:55:29 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h= from:to:cc:subject:date:message-id:mime-version:content-type; s= pfpt0220; bh=+Fo9IVYowPyi1LncksOQzJGd5fMCzgpCmmcZhOyruV4=; b=hVt VF45y+UPcGvY/Fk71esqTUeN89q4OnJEIDn+Hiqm+Wuv49jHVYkaFVcsDW1m/i+Z SHxDhJkvilsRyxXlOVe0+Q7LJOLe9FAPMt58y1BTTer7qImWWsZPFn1oGSQXo/Qn hzo6Z0JYqKCBUqNMytSuUSnnMAnizpeem1bExeYB5+8GF2LV7uuer9uLKG7LQhPW zX4N4e5xlC99KJ/sFm1UOLKY79IglIIhHetJ/YjNCT9YIQh8h0q1vlqEkGrPAHB4 UryzXuzZHxqZkELHBy8YHyJk3BTuLga4bxGibMv8ogVzeICULVXK54Iy8RfYLMIt nTGK7sjlA4yj28RihcA== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3waw6jv83v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 19 Feb 2024 04:55:29 -0800 (PST) Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Mon, 19 Feb 2024 04:55:27 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Mon, 19 Feb 2024 04:55:27 -0800 Received: from hyd1358.marvell.com (unknown [10.29.37.11]) by maili.marvell.com (Postfix) with ESMTP id CFC693F7060; Mon, 19 Feb 2024 04:55:23 -0800 (PST) From: Subbaraya Sundeep To: , CC: , , , , , , , , , , Subbaraya Sundeep Subject: [PATCH net] octeontx2-af: Consider the action set by PF Date: Mon, 19 Feb 2024 18:25:14 +0530 Message-ID: <1708347314-21624-1-git-send-email-sbhatta@marvell.com> X-Mailer: git-send-email 2.7.4 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Proofpoint-GUID: s9nlq-SDGdRonDmXlSg5blNdPpBJl9tW X-Proofpoint-ORIG-GUID: s9nlq-SDGdRonDmXlSg5blNdPpBJl9tW X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-19_09,2024-02-19_01,2023-05-22_02 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791332044995781419 X-GMAIL-MSGID: 1791332044995781419 AF reserves MCAM entries for each PF, VF present in the system and populates the entry with DMAC and action with default RSS so that basic packet I/O works. Since PF/VF is not aware of the RSS action installed by AF, AF only fixup the actions of the rules installed by PF/VF with corresponding default RSS action. This worked well for rules installed by PF/VF for features like RX VLAN offload and DMAC filters but rules involving action like drop/forward to queue are also getting modified by AF. Hence fix it by setting the default RSS action only if requested by PF/VF. Fixes: 967db3529eca ("octeontx2-af: add support for multicast/promisc packet replication feature") Signed-off-by: Subbaraya Sundeep --- drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c index e5d6156..516adb5 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c @@ -415,6 +415,10 @@ static void npc_fixup_vf_rule(struct rvu *rvu, struct npc_mcam *mcam, return; } + /* AF modifies given action iff PF/VF has requested for it */ + if ((entry->action & 0xFULL) != NIX_RX_ACTION_DEFAULT) + return; + /* copy VF default entry action to the VF mcam entry */ rx_action = npc_get_default_entry_action(rvu, mcam, blkaddr, target_func);