From patchwork Wed Mar 29 17:06:16 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: 76719 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp566204vqo; Wed, 29 Mar 2023 10:12:52 -0700 (PDT) X-Google-Smtp-Source: AKy350YWvRAKMCab5RT1w/D/pDPbzY+6y6Qnt91UiqJ7Lg02ETh4f7ppPcWIx4kKCVHkPjEKJ8hj X-Received: by 2002:a17:906:4ed8:b0:933:4d37:82b2 with SMTP id i24-20020a1709064ed800b009334d3782b2mr19446442ejv.57.1680109971795; Wed, 29 Mar 2023 10:12:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680109971; cv=none; d=google.com; s=arc-20160816; b=NmuKgdKz0ijhPnppTvilyLPXUbw5FQhHzK2Y4IeupPAIHFBM7pMccrYo4mfb7VW4Rh eREJ/D2alcXtWt+JZOJfzmZcrgGfXPcylyawQ5+yS20MXyxdCRgZemc4+1xevjCPM3DF wuhZ2+NoplfNz/vel5qn/Xx0BgNtCBWXFzuPerFbjg48mq6pOEHvr+yfYJPcPsL+kiIx bxCie/5k/2XKl6TssSZxSbAdF7uGXMlKMfs8fw/imvkvzFIhkt+OROH+ewMhw0i33HLK eJx/h/j3jqoQfa0dg+0Dp81L0+94L2iHTaCwPJX+6qTqun0B1Q22UPqY4cxv7Oor4ej0 oOgA== 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=r5iQOyecge+mIAqmb5xI+ZhCpEcoa0uCD3OrB1FbqPQ=; b=zQyaA9mCXjw5eUGsYhMF5SXIECXPzRveLQ4WRHz89D2uMTn42jka/nCoRb6beAz+69 ZLo8vyB+mzyfrXTXdZuv6Eq+r4sthf8iRXnUGxrXFWG/yKGPzXmjCxmc8jN39YVzyYjU dZu1YO2R6CyzouOsttlL3TQcIw5E7ZIAkYQJApqnKb6qDWeWgEsnXR5K5ZDLJeatGLvJ dJE+5NwAL8BgWFMHcr362eO6R4DIZrDlufEwPCsxWT86+e/oD29Tri04D118lMNlN7mF 6jZG5ARDiQmcD5YsZ0L7cIMv+fmvQ0DO+mix9cAjF81RlkzJakm7CkdBm9Qt5F4ijSNC 8Mbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=OMhS9O1F; 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 v13-20020a170906b00d00b0092fcbfe250esi16076171ejy.469.2023.03.29.10.12.27; Wed, 29 Mar 2023 10:12:51 -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=OMhS9O1F; 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 S231361AbjC2RKm (ORCPT + 99 others); Wed, 29 Mar 2023 13:10:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231392AbjC2RKP (ORCPT ); Wed, 29 Mar 2023 13:10:15 -0400 Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C1362717; Wed, 29 Mar 2023 10:09:27 -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 32TFobCY032164; Wed, 29 Mar 2023 10:09:21 -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=r5iQOyecge+mIAqmb5xI+ZhCpEcoa0uCD3OrB1FbqPQ=; b=OMhS9O1FSwqfg7SDxszZRAYo+3SlwqR06qSlhiY5vnmx+zxNU48f2M9Xfl/+73N8Lf3b ddxjDDQU1hcg6T/rc3yyuQpEIGyMKHLqgkTEQ3VbF7FKXq8buEdUNpdmA29TqLeYXHL1 50iZh+AGNbLhbnY2PUy828T3nO0Va8uJvdDZR/blTkcX9yxDKBZy4rfc1oUfPVlCupyo HGovFV9ULfj3ApJPjBBVayPrh4MSUDNQ8ofFbFkVqS1rqyuYA6I/AVyHX5nK5FNVnYx2 p5N4N+PrQBa2xJiYyY27MqC24emZpmjHzQtL94Ax2W9vTYd6fa/VrFUBuv5yc5iSy9Vq yQ== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3pmhc4a0jv-10 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 29 Mar 2023 10:09:21 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Wed, 29 Mar 2023 10:06:57 -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; Wed, 29 Mar 2023 10:06:57 -0700 Received: from hyd1425.marvell.com (unknown [10.29.37.83]) by maili.marvell.com (Postfix) with ESMTP id ADFB63F704C; Wed, 29 Mar 2023 10:06:54 -0700 (PDT) From: Sai Krishna To: , , , , , , , CC: Suman Ghosh , Sai Krishna Subject: [net PATCH 4/7] octeontx2-af: Update correct mask to filter IPv4 fragments Date: Wed, 29 Mar 2023 22:36:16 +0530 Message-ID: <20230329170619.183064-5-saikrishnag@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230329170619.183064-1-saikrishnag@marvell.com> References: <20230329170619.183064-1-saikrishnag@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: VHpdbgHTh46qFGKLCexqeWj1uvHU3MBN X-Proofpoint-GUID: VHpdbgHTh46qFGKLCexqeWj1uvHU3MBN 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-03-29_10,2023-03-28_02,2023-02-09_01 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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?1761722993635385453?= X-GMAIL-MSGID: =?utf-8?q?1761722993635385453?= 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: Leon Romanovsky --- 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;