From patchwork Wed Apr 26 07:43:41 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: 87696 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp73562vqo; Wed, 26 Apr 2023 00:57:29 -0700 (PDT) X-Google-Smtp-Source: AKy350bVJ0l6ApGMdz7uqPQwfehiLlG97G7aPkhOeaDSVjK+tn6mv1nsK1O5hXcHgLGGlYuGVKTO X-Received: by 2002:a05:6a00:1681:b0:63f:3aac:78a6 with SMTP id k1-20020a056a00168100b0063f3aac78a6mr17930279pfc.9.1682495849233; Wed, 26 Apr 2023 00:57:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682495849; cv=none; d=google.com; s=arc-20160816; b=SGD0LcPsyMcfZQpVGreX1wPWRhw3JARtDMj+cf662i8sacboDGUJVhEM+BSlwgMI48 HT4AfwH5To/xFDpuRvdquiEal6i0JALBAEW4FEBIn74peQLMNUsS7cmttpu4p9IZdt+i J10pXxAhzxytp27sbnnerSAraciG4vKjydnXOY/0TfrTwzKSioqgWX+BeCKLJ2cxd+jW IWHFlxZLzGXyLT/znl7Ae7IJjZZixj40mp9zi31EutQziO7/VCw8yq3Ln51POZy0Mkdq lPGohq72R3HSNsJTRHDaaEVWlUM4RYlEKb8obl43IsWMg/jP1DZGuVXTVeX2paLbNH7i XAjQ== 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=y7BqRfxAGON2uQRPNSUHRPPchooa/NNy2VHCO8FFsmW0cEvmYmFtASS0Xzv+0hB460 s7MR6lJL2FFGdQsoV+J8sdJ8iWYRBSaQ6Bfmn3hJCZ4TYnemJ9sW7WrxaLn9MFEoSfZF eSocwoyqi47vtwKxSsRgmPjntcz/maQ/LPC1NUQfpWthgqQaxidK1buE8MabgDRNfFCv kIHtTHncXwobhju7ZbWL7ZJEKxog/uZYt8mIQ+5u4GGsdBnX55mdpQYPj28/oDEsIjye vZK/hQarwbcAnMW+1dKGUi/tNX7G/QmF+GyNBpwHpNm85qovkzAny8138VtHOVI5TJyD EGSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=CYW4UEhK; 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 p10-20020aa79e8a000000b0063b7ab0b1aasi15984676pfq.242.2023.04.26.00.57.14; Wed, 26 Apr 2023 00:57:29 -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=CYW4UEhK; 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 S240125AbjDZHpS (ORCPT + 99 others); Wed, 26 Apr 2023 03:45:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240093AbjDZHou (ORCPT ); Wed, 26 Apr 2023 03:44:50 -0400 Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E94D13AAB; Wed, 26 Apr 2023 00:44:29 -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 33Q75YDp012965; Wed, 26 Apr 2023 00:44: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=CYW4UEhKR1tyYydOiw8f29CDcJjPYLdr2z32PlfjHRJR1Qg0IfHK+IAwfgn8ewBPQiN2 QvE7y5LRLIVI8pmZptgS9Af0dcCW3xrIuDmXbB6rXRRSjsTrnB7SwfL/FXUObdhIP0ts 0Bby6z5NIuywpH+GaBYQnkbHr5muPA8+UfzWmSbj1VtJ2etcRww6tvDdTgmBWX5rnZvA YDqbC6xkYdUQH6B/OT1MMutWZs5d9ehP3b4RWR6Fsq8OnTy8r3uj28RodH6xqtwpRx1X We4b6NPqqsPhdNRoKReW2emCeaxwwrK6SOy/z07C0se65pTBpsgV2eXVAPCUqRSPKBov IA== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3q6c2fdd4f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 26 Apr 2023 00:44:23 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Wed, 26 Apr 2023 00:44: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, 26 Apr 2023 00:44:21 -0700 Received: from hyd1425.marvell.com (unknown [10.29.37.83]) by maili.marvell.com (Postfix) with ESMTP id 235455B692A; Wed, 26 Apr 2023 00:44:16 -0700 (PDT) From: Sai Krishna To: , , , , , , , , , , , , , CC: Suman Ghosh , Sai Krishna Subject: [net PATCH v4 06/10] octeontx2-af: Update correct mask to filter IPv4 fragments Date: Wed, 26 Apr 2023 13:13:41 +0530 Message-ID: <20230426074345.750135-7-saikrishnag@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230426074345.750135-1-saikrishnag@marvell.com> References: <20230426074345.750135-1-saikrishnag@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: 1JXJAv1ZH1Ck31ZKlhiSvcgWjlE7kbqL X-Proofpoint-ORIG-GUID: 1JXJAv1ZH1Ck31ZKlhiSvcgWjlE7kbqL 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-26_02,2023-04-26_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?1764224767647646011?= X-GMAIL-MSGID: =?utf-8?q?1764224767647646011?= 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;