From patchwork Wed Apr 19 06:20:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sai Krishna Gajula X-Patchwork-Id: 85205 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp149277vqo; Tue, 18 Apr 2023 23:27:54 -0700 (PDT) X-Google-Smtp-Source: AKy350YK5y9l7gkRh0mcLrgilsWH/re+0GSyIwk0P6C+nJjbxZxez85AJykCaQDIreJv7QHU0fjf X-Received: by 2002:a05:6a00:2d14:b0:63d:254a:3909 with SMTP id fa20-20020a056a002d1400b0063d254a3909mr2655014pfb.32.1681885673731; Tue, 18 Apr 2023 23:27:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681885673; cv=none; d=google.com; s=arc-20160816; b=pQppFLqKlRmTiMBVBne3M+QkxCwS1jKwsNSRjcJJmMKd8616v9Qij4TarX8q75eue3 zeyQSvZ0Iysi7KJs4E7WJoKUoIkLRdIv0KJ1QCxWzHwlLwR7N4Y5989unB9c9PgXwkyy oGTgX9jIvYHIjfV6A0tdBy83kVP2Vjxrjj+5c57wqtBCSYnah+DPFbWGAPPUcJ4xF4fZ Ue28cO/lQiccUsgJAOtgDAViYTDoCuS8/zwayhpqV5dZgRsw7NoWHG2qGNQ7gR39B/lN m+S0HgcgLvM/+mrrqljWj9c418SpdXDsXinEz+X2IX4xaPGuAawPk3Lpb42xUcLq2Yrt A92g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ULQ0BrR7wzq3hufaukTzQqwThQaxiFl+ufv1LiMejOQ=; b=ZJ7/bD9XDHnFS7PRCrkmAPpYSlT2/SbKtUML+avOqtWIr4SzolFy1I9rcV0lDyCoED rhlqwCAc3bTZjDHbPy9+h1D/azukCTu6UA8Cm+dMtQNMlXidkkHU1LofdLKrUUjUQz6r COAs2hZidrYc/ThnNqbQ8FNvTlHG5bUO6Cn3l55lLsCKmzC56hh26S/kcfmPn3oXCAf5 ZKcRIrB72z9ZJElrbDZWBAdFo3tVySVC9GqXIpkZ+i2Ar1sfpqF7lPUvyAJyPOJd+8uw cDOgy4D4Z/0PBTnGvsAX2P6FCCQTAbo62Ez4WWA6YElJQ1LHI4OASCn+xpds6DthcRuC JQOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=LKmlLBk2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 144-20020a621896000000b00633d39d7b09si15189134pfy.390.2023.04.18.23.27.40; Tue, 18 Apr 2023 23:27:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=LKmlLBk2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232016AbjDSGVq (ORCPT + 99 others); Wed, 19 Apr 2023 02:21:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232163AbjDSGVj (ORCPT ); Wed, 19 Apr 2023 02:21:39 -0400 Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 003346E8E; Tue, 18 Apr 2023 23:21:06 -0700 (PDT) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 33J49asc013387; Tue, 18 Apr 2023 23:20:58 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=ULQ0BrR7wzq3hufaukTzQqwThQaxiFl+ufv1LiMejOQ=; b=LKmlLBk2ohuFAG0EwSC2kKscLz9TXbSVbKQuajD0VevIh55ni7laN/INHgk7AQ0SV8ZJ vvOIw1yNYsdhyHbFY1uc5R0kjG53leE3ouD3mJmWmT+RbAol1EImfeAQcN7f7N7mOica /5EA1fY/Orng6fA1yodgaKqo8o18tc+Ei7Okv178GDviKPn8wKaQkT0QPwlDbol8J3hi SKc9OWKj0fmPrJSHbGcLUlJ5iBm5sqm+G44f7kIRvakFHpb1LNhiqQVCLK8/cng6JCjx jMbgq/IVbocXLwdbnUE7PX1i9C1RYRNd4rZwoyqnlUrkWF/Y6tmsWK8C/Z/mvQH2XF+F 0g== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3q2917rjt5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 18 Apr 2023 23:20:58 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Tue, 18 Apr 2023 23:20:56 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Tue, 18 Apr 2023 23:20:56 -0700 Received: from hyd1425.marvell.com (unknown [10.29.37.83]) by maili.marvell.com (Postfix) with ESMTP id 7731E3F7055; Tue, 18 Apr 2023 23:20:51 -0700 (PDT) From: Sai Krishna To: , , , , , , , , , , , , , CC: Suman Ghosh , Sai Krishna Subject: [net PATCH v3 06/10] octeontx2-af: Update correct mask to filter IPv4 fragments Date: Wed, 19 Apr 2023 11:50:14 +0530 Message-ID: <20230419062018.286136-7-saikrishnag@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230419062018.286136-1-saikrishnag@marvell.com> References: <20230419062018.286136-1-saikrishnag@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: EHK2-thx-_qVw4UfISoBy78ObPzNSIUl X-Proofpoint-ORIG-GUID: EHK2-thx-_qVw4UfISoBy78ObPzNSIUl X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-19_02,2023-04-18_01,2023-02-09_01 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763584952466136017?= X-GMAIL-MSGID: =?utf-8?q?1763584952466136017?= From: Suman Ghosh During the initial design, the IPv4 ip_flag mask was set to 0xff. Which results to filter only fragmets with (fragment_offset == 0). As part of the fix, updated the mask to 0x20 to filter all the fragmented packets irrespective of the fragment_offset value. Fixes: c672e3727989 ("octeontx2-pf: Add support to filter packet based on IP fragment") Signed-off-by: Suman Ghosh Signed-off-by: Sunil Kovvuri Goutham Signed-off-by: Sai Krishna Reviewed-by: Simon Horman --- drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c index 044cc211424e..8392f63e433f 100644 --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c @@ -544,7 +544,7 @@ static int otx2_tc_prepare_flow(struct otx2_nic *nic, struct otx2_tc_flow *node, if (match.mask->flags & FLOW_DIS_IS_FRAGMENT) { if (ntohs(flow_spec->etype) == ETH_P_IP) { flow_spec->ip_flag = IPV4_FLAG_MORE; - flow_mask->ip_flag = 0xff; + flow_mask->ip_flag = IPV4_FLAG_MORE; req->features |= BIT_ULL(NPC_IPFRAG_IPV4); } else if (ntohs(flow_spec->etype) == ETH_P_IPV6) { flow_spec->next_header = IPPROTO_FRAGMENT;