From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 284A042DF6; Fri, 7 Jul 2023 11:01:47 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0ABAB41101; Fri, 7 Jul 2023 11:01:47 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2084.outbound.protection.outlook.com [40.107.237.84]) by mails.dpdk.org (Postfix) with ESMTP id BDA20406B5 for ; Fri, 7 Jul 2023 11:01:45 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=M/dB0GPIZgIlqRJmPmQi5xUyvOEakh1e+AZLH7SFiCNClBF8L0CtgaMzgeZNzq6X/9TixN3HX1J4Fv625KU6pBJrEH1nBzp7IsDqb8zwB4azfCKlkz9L6klfDSDAwa6FEo+5YPUnN1vZ6b1L1gbQD7i6rOHQBF69DZUhFYllueMkyCSMQ0paxQaGOKPHKNd+YrHIeppeOQbQp842JXwca2QiMlN7H0oZTgHIbwaaCW79h8vWZ5pGt/58tJNKLuDuIbtH6z5ZVxNigL+uvj1U3QpHQJXoeYYp3fdh2cetpscuaiZ6+uel3cc/xBD2DGeFcWwGfDFk82UaDf5ZDWVu7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=TuAwgSLGQQSeRd7QZIII+kk1mtNvXr87QVTV2m1Y+yA=; b=MXH2qu9hA+9gmMLDCHHTECyylE2Fb0Q7QibDfNqYa56lnDolypDWyDzJALWrEJKDsjDU1fgwBTAqSOb5rtiDNPL5SryAeZzYHApSToSNwwAwVYFN0p13IPOqRz6j7V0v9+nyrQv90T3xDpToMOfq/oeRQtjVGAeABuhi/fbfjkpEEfNTgyYXSpHMVRs5PeHewSecnGbTR3Ry91OFyEmfdYABcqcrKznidqGXaDUhxLbdol08gv6fkQd/qEpgGdR4C6pHZnCobj4ZpsZKXTlgjz2/dhTSifsWLm3CZMX8rsKAcyZkwzj5xWnBBw89h0UNmfujyD/U2/tCky8/B42U5w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=TuAwgSLGQQSeRd7QZIII+kk1mtNvXr87QVTV2m1Y+yA=; b=aMHVI6ar2YwY/ccFlX+6b30wsBiPV7nUWD1b8S46qXGdSRLEoLyZciWTL71eEny2O3SOOpGfsSQhEpPvuO7IJehOlI4fEcEAh598N8pfKTcoT5Pcsw/otvwTwiENBD5g40QsDeruyujFMhPAPyDdufeu57MBxhyFsojLA9IBKIU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by MW3PR12MB4556.namprd12.prod.outlook.com (2603:10b6:303:52::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.25; Fri, 7 Jul 2023 09:01:43 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::369d:5f05:aaba:ebd8]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::369d:5f05:aaba:ebd8%3]) with mapi id 15.20.6565.019; Fri, 7 Jul 2023 09:01:42 +0000 Message-ID: <718d5b7e-d315-d935-8cae-5ed0a8d31872@amd.com> Date: Fri, 7 Jul 2023 10:01:36 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Content-Language: en-US To: longli@linuxonhyperv.com, Andrew Rybchenko Cc: dev@dpdk.org, Ajay Sharma , Long Li References: <1688689077-5557-1-git-send-email-longli@linuxonhyperv.com> From: Ferruh Yigit Subject: Re: [PATCH] net/mana: fix wrong indexing on CQE error when coalescing is used In-Reply-To: <1688689077-5557-1-git-send-email-longli@linuxonhyperv.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO2P123CA0102.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:139::17) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|MW3PR12MB4556:EE_ X-MS-Office365-Filtering-Correlation-Id: 163b0c91-3f9a-46f5-b769-08db7ec8c838 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zM6cptBSvobleoUMNgZsFgN2rIAfHdWWs+AL7J+5sdiCcNAMgteSbpOpJznzw3JLKo9ANlDUc5aZPkphm+3uCCPAJPkTvLVeBOU2nIPfrZDbGKZ6CmyXE14Xbs4YvEwiALkDrNjuocnaQHLq+MvrkM1jI4xkjnmO/RxVVJT0zb9SNlu9Ry3dS5+oBGbLIJi6smsNU4d3740A0mIlwGwcOBPZyv6bzMiWD/0FRLR685hewUrOaUYJ02tN93lriEWU++J+VHlatuz9TYZfYgVtGC1b4UWSKKE06eFBqNMTfkhF6lntOymJrE+/MaMDa0MJHTIkI4cFiRerZFg8rYBB+1S7eyKqi2kAv45IgOk1ESPE+zzTLQOA54RQZalrRw5zkCzXNj/KPUVCyi6Kan5RgQ6WnXCNuxrlXdWbtxnv+bZ8CyA7ziDCzamBDeKcR8wxlPLyWWjCGrT3LZq0ToN+sU4Cf/bVhSLMhorzrggnvtn9hmWiga1/dUSGSqwq7+XVbTO5C1kRjWPgM2x2REOQyIHp57tPSd/uBW5w/6OPKBW3DHj9m7GqOX8NkWXX/ICaMZ4umW8td7bKbqd15k97MTFmBYAmqfR5FEcozmvGdCXx0sOA5TMk/8+l+V/atRiX2jebfjPrdXacCdB3cYVxOQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(346002)(396003)(136003)(366004)(39860400002)(376002)(451199021)(31686004)(8936002)(8676002)(5660300002)(54906003)(2906002)(66476007)(316002)(41300700001)(38100700002)(6916009)(478600001)(66946007)(45080400002)(66556008)(44832011)(4326008)(83380400001)(6666004)(31696002)(6506007)(26005)(86362001)(6486002)(2616005)(6512007)(186003)(53546011)(36756003)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?bjk0ZmJRTmV2Sk9kWWhmMWplbGtxdkdJVVdNN0dvYS9LRnVtSzZCMmxhYU9X?= =?utf-8?B?U1BhTUJqTmI0cXRPVzBuelRSYitKQlpLeE1jN3NwQ3hreHRpZUJBdEdHejZH?= =?utf-8?B?a0R6RHVTWjNNS2l0cS9xM1pwTTdQYW41OUppZWJqSy93TDh1YW5uUllIaFVT?= =?utf-8?B?RElQSU1JNlJyYjZZM2R0ZlpURGpxZDlzdW1RWnF3aGxzYlJKN2FNZW9DYjZ1?= =?utf-8?B?a09FNldLeXgrZmpKcVZvT3BHMjRveklCOU5ucGc3c2t4MGlIbjRMOXo0M0lh?= =?utf-8?B?aGkvblovb1lMN0RGVENxbUFtdUZES0xsSU5jR0RHbzJzTzZJUC9kTXg3VVhG?= =?utf-8?B?dDVjQkQ0UHZEU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X-MS-Exchange-CrossTenant-Network-Message-Id: 163b0c91-3f9a-46f5-b769-08db7ec8c838 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2023 09:01:42.3394 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Bw+bcunNwAYfEW3KfZeOrmYgo9HugUqOk7gviNh+JeUFo1V8/s9JAdU6+1Z3kfwa X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR12MB4556 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 7/7/2023 1:17 AM, longli@linuxonhyperv.com wrote: > From: Long Li > > On a fatal CQE error when coalescing is used, update the correct index > and allow proceeding to the next CQE. > > Fixes: 3409e0f172f6 ("net/mana: implement Rx CQE coalescing") > Is above fixes commit correct? Logic for 'CQE_RX_COALESCED_4' is not changed with this commit, in above commit and in this commit both does breaks the loop. This commit changes logic for 'CQE_RX_TRUNCATED' and 'default' cases, which are added with different commits, not the one in fixes line. "fatal CQE error when coalescing" mentioned in the commit log, to which switch case does this corresponds to? > Signed-off-by: Long Li > --- > drivers/net/mana/rx.c | 18 ++++++++---------- > 1 file changed, 8 insertions(+), 10 deletions(-) > > diff --git a/drivers/net/mana/rx.c b/drivers/net/mana/rx.c > index cacfd9ae1b..220b372b15 100644 > --- a/drivers/net/mana/rx.c > +++ b/drivers/net/mana/rx.c > @@ -416,23 +416,21 @@ mana_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n) > > switch (oob->cqe_hdr.cqe_type) { > case CQE_RX_OKAY: > + case CQE_RX_COALESCED_4: > /* Proceed to process mbuf */ > break; > > case CQE_RX_TRUNCATED: > - DP_LOG(DEBUG, "Drop a truncated packet"); > + default: > + DP_LOG(ERR, "RX CQE type %d client %d vendor %d", > + oob->cqe_hdr.cqe_type, oob->cqe_hdr.client_type, > + oob->cqe_hdr.vendor_err); > + > rxq->stats.errors++; > rte_pktmbuf_free(mbuf); > - goto drop; > - > - case CQE_RX_COALESCED_4: > - /* Proceed to process mbuf */ > - break; > > - default: > - DP_LOG(ERR, "Unknown RX CQE type %d", > - oob->cqe_hdr.cqe_type); > - continue; > + i++; > + goto drop; > } > > DP_LOG(DEBUG, "mana_rx_comp_oob type %d rxq %p",