From patchwork Wed May 3 07:09:39 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: 89592 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1136737vqo; Wed, 3 May 2023 00:25:58 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ77xmo2zdlfsmErT6BfU/w4qoCU+KZQQqwSiQnTiKjtet4mMyvU04NGG6EuFINrOV3UikMf X-Received: by 2002:a05:6a20:5493:b0:f2:5c65:b767 with SMTP id i19-20020a056a20549300b000f25c65b767mr28159013pzk.42.1683098757895; Wed, 03 May 2023 00:25:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683098757; cv=none; d=google.com; s=arc-20160816; b=CERKRkEHyUyO/Ih3lwDYqPBZhO7/ffAs2bZd/M9pMTZmtK446Ba9bl+Y9xCohB+9I+ 1TjcxwvtIJL79N6Uc5UwDgoSjafNHchj1sJZS9YKwLrseCaSIZ3XxO5ZJWrn3wtPcW+B WDg3UNVuEL3TwpzW2Ntm4RQjnWrjHmErCvK3+LgSVDn+5GtiVZkW30wYbGw4MZtsbrSh sYkdaFKHDRHLugEVOznB9EzWpRGid2Yd6wueohPXUQoBeErh69k+AS7f7fe+K0iyui48 pWSeXSFzTt1ebxTvaZ3yVlWbmnK5wdpoMDiwATJqoZQQkSBK16/U0fvA9clOZ6WWQJbp qoHw== 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=k9OUvdMXOGrVWOiDKCm3VaplkyY1VX4ZHIDROep9n1TFIXAw/lEt0rpeZNhfI6mHGg Gd80/Ece6ICwE1nLuiZ2WuEMODnwX9x4xU8jQzNzeX2CWemuDAK0fIFBU3HJo2awRzzH 47vuZryiMVKo7WcsIF2VdgruZKfcWPTeqAbOXGVwP5fXqXWcTFiW7i1LqH363ceND9fh BkbxmRLSgYpT0zelvlCjleDdqzdBF8UdQc0Xmzs/HD4QpBWvchcpe6i7ctdOLrk2m9Ze CxhNVaocMhjKcL4ZN6B621MRqg8ivKA9jDkvYVayk7fQF5X/8fcuDTZrFRv8mVuHhzz2 Ug3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=YB9SPuJu; 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 t10-20020a63eb0a000000b0052069c10102si31876972pgh.75.2023.05.03.00.25.43; Wed, 03 May 2023 00:25:57 -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=YB9SPuJu; 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 S229733AbjECHKs (ORCPT + 99 others); Wed, 3 May 2023 03:10:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229722AbjECHKl (ORCPT ); Wed, 3 May 2023 03:10:41 -0400 Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 675E744B1; Wed, 3 May 2023 00:10:30 -0700 (PDT) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 342K5f0r026446; Wed, 3 May 2023 00:10:23 -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=YB9SPuJuRZ6s8tKQf1BUNCMUFL/Q+u37cb/BZT4keLVf8k3LILtVoCDjL+ey6Bhov4TU ZdrSWZMnoelLzfFUuQr3zMnIRNDmG0xLvO1asZV8ofu5J9DFDqkxtcPj/z053jadvFjb 8EcitTKxFXevaDfLroOlkf4xrpwGBln/D9edvA74O6JKHWcUU6MRnrqYxpbNhCvQPsuu 17ncgPeWf38XKcMe1d3p3wSS9sj/04X4lxYhWUx226YsK4aVgFYOGb8gtTtB2099s+Js nGvAIm3SQKqfMTs1CHJkjgybjJWJIq/VeLfbkSxL+MRrb4j4FaLcb9uXdCE6Gz7eRZJJ 6g== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3qavhenawe-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 03 May 2023 00:10:23 -0700 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; Wed, 3 May 2023 00:10:21 -0700 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; Wed, 3 May 2023 00:10:21 -0700 Received: from hyd1425.marvell.com (unknown [10.29.37.83]) by maili.marvell.com (Postfix) with ESMTP id E1E5C3F70BC; Wed, 3 May 2023 00:10:15 -0700 (PDT) From: Sai Krishna To: , , , , , , , , , , , , , CC: Suman Ghosh , Sai Krishna Subject: [net PATCH v5 06/11] octeontx2-af: Update correct mask to filter IPv4 fragments Date: Wed, 3 May 2023 12:39:39 +0530 Message-ID: <20230503070944.960190-7-saikrishnag@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230503070944.960190-1-saikrishnag@marvell.com> References: <20230503070944.960190-1-saikrishnag@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: cGKOW5124QrhFGNepVi5TuCyUXaI6Sav X-Proofpoint-GUID: cGKOW5124QrhFGNepVi5TuCyUXaI6Sav 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-05-03_04,2023-04-27_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?1764856963084387635?= X-GMAIL-MSGID: =?utf-8?q?1764856963084387635?= 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;