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 B54EA43B76; Tue, 5 Mar 2024 19:05:58 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9F31140271; Tue, 5 Mar 2024 19:05:58 +0100 (CET) Received: from mx0a-00103a01.pphosted.com (mx0a-00103a01.pphosted.com [67.231.144.234]) by mails.dpdk.org (Postfix) with ESMTP id E2FBA40270 for ; Tue, 5 Mar 2024 19:05:56 +0100 (CET) Received: from pps.filterd (m0174892.ppops.net [127.0.0.1]) by mx0a-00103a01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 425HhVJW006829; Tue, 5 Mar 2024 13:05:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ciena.com; h= from:to:cc:subject:date:message-id:references:in-reply-to :content-type:mime-version; s=06252019; bh=FUgPUa1k/7E+m7fKTIuaI iTTy652Z3SeumgLX2wL3JM=; b=dt6bqgB318mnbZoUFCIEniV44Ez+PaMQrXGht 2JNyrI1w2L6L8RRgC2ESfs4DLzLUFLWHi7z34pD0ml3yI2pPglCgyDYJ7nkkR4jC kClR3mat45D0WL5B0g+vZu3woXad7XKxYUwzAUx7XLta/bpyfOMK7/dKokN1EOQC bbvpTxKz8Ieg3HlSuTqiDbT5aYQoWlqieGVn8ESmavg36YcD9sRKMj3RT37h83Rx CzZAy9KOBmmHboREWD50J3uHykhlrxw8nVLBPwZjOt8+oJat0ZZLCDWvmw4va1ND bwRbDY9qd25L5Hq/iO3/JS9xphIMP6zyJp/IMpWynZE65w6iw== Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2100.outbound.protection.outlook.com [104.47.70.100]) by mx0a-00103a01.pphosted.com (PPS) with ESMTPS id 3wp81x81qb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 05 Mar 2024 13:05:55 -0500 (EST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HatFg2Nhnc2Bf2F2pJ4IwH6kd5npki2ozHst03KcqyXOeyPTkfR0RY05r9aKj8agsOyqWdB7nk9ioLG13XkBfUR0fEBh7KCreNeF70pX9u4UHOoCSrJDux2qQeiPQNR6PyIoXHdzBfbUv5nM9QBYvXIHynzaGaAa7YaL4x2vNmm+HGBBMOTbWNAP/rbzcNKDW4s44Jb7gB0L/s3PvPliD77d2xC/sfMt2qKzJSasXXGNrIqXhYt+pmmqsmpaAaBXBKQVIFgvkjmYLnTernv6WZzv7WpSy+L91lpf4o8dmgyI40gysPs+Aiaqo8C/Sum1miQ53TB9WwgPYqSry4GUAg== 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=FUgPUa1k/7E+m7fKTIuaIiTTy652Z3SeumgLX2wL3JM=; b=XDMoTZrE/zqFS6S3aNFBPLNHbiLJ9EH3hYULwsoXWlKOTteAA38euX8MQoVZ9KHr3JpAZyYcptWz1YQPgmKdjl+2ge7TpDlcZ5Cmt3ul87QzxfjlqMfKVM77xR+WrT6d9ipFW+UvIyfRQeEqogpcTc0IRzx0EBN+Ff066LfD5o3evjYWvdeI9obV1mD/6uSczgS1oXRBW31Ut7Dz8NGnZ1JcLUWTYa5N1NxbI1bCzErV7h3wvXucaaE3sa3/DIUVOG/AjSgyABGD+FY4MTS0vri9Qf4c9b2j0FJRslNO62hrQed8nERvGnLXG5i3c80K9aqmORiA4bp2R7mvhGaZiQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ciena.com; dmarc=pass action=none header.from=ciena.com; dkim=pass header.d=ciena.com; arc=none Received: from SN4PR04MB8413.namprd04.prod.outlook.com (2603:10b6:806:200::16) by PH0PR04MB8433.namprd04.prod.outlook.com (2603:10b6:510:f0::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.39; Tue, 5 Mar 2024 18:05:52 +0000 Received: from SN4PR04MB8413.namprd04.prod.outlook.com ([fe80::94c5:dc9d:e989:9818]) by SN4PR04MB8413.namprd04.prod.outlook.com ([fe80::94c5:dc9d:e989:9818%4]) with mapi id 15.20.7339.035; Tue, 5 Mar 2024 18:05:52 +0000 From: "Gudimetla, Leela Sankar" To: Qiming Yang , "dev@dpdk.org" , Jacob Keller CC: "qi.z.zhang@intel.com" , "Chandra Mohan, Vijay Mohan" , "Gajarampalli, Prasanth" Subject: Re: [**EXTERNAL**] [PATCH 03/30] net/ice/base: remove unnecessary control queue array Thread-Topic: [**EXTERNAL**] [PATCH 03/30] net/ice/base: remove unnecessary control queue array Thread-Index: AQHZeNLb8ZUfPsBbskmBzLHZ2hal0bErW+BK Date: Tue, 5 Mar 2024 18:05:52 +0000 Message-ID: References: <20230427062001.478032-1-qiming.yang@intel.com> <20230427062001.478032-4-qiming.yang@intel.com> In-Reply-To: <20230427062001.478032-4-qiming.yang@intel.com> Accept-Language: en-US Content-Language: en-US X-Mentions: jacob.e.keller@intel.com X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SN4PR04MB8413:EE_|PH0PR04MB8433:EE_ x-ms-office365-filtering-correlation-id: 3490b5d2-085b-4984-f97d-08dc3d3ee53a x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: o8JNqxPxjbZL3G8os/FWW7cmZpG36H/LKuMKelUX8F0t1fiE+3f7VuUvC6TX/BVIbNYfO4h4mysvBQkry/jxz6YXp74PIU2q4p0eYr7QjCrwI5BNte/HumJs1fB0E+YJAV3PvjujkAj0emRsnexj1biRS7eGN9FqeVPiwpHeUSS2F78N9UpiRRoOZ2GuVTHnUBchGfGb6UKiq+R8lKAUrwFm+wAuMyqXTobOXoyZ421wFzhZ94T+u8Xos1hkzSJY8v/WMX/WbDlTSF+8ykR4m+FsbF8ZMO4/UBmUeoQinepqOKlVfILkQZHvxuApzQT20Org4qcQyvx8tw6eTStB1nrBIJ1+vuG7JQrW7yPbPlmrTcVdNyCdRdorIWpxukvDkr1tYFPio8H3/pXSaK/esWB2Pe1p1puiebc4dtdaM7125UTzv7ndDQPbzbf/8EqzbXATA00c1YLOqfHOjPTcHjQyETQ7KKWB+DLdkOdO0yNoCmqdIPc14Zy4BdFGpqizcQAZLqneEZlOQgsm052V3GLX2QWvj4YX3NkQi6jKCci1tAOWdr1cDoOUoljWU37p9wEBScFkUHicy8qPsnoOzkCRKnbtVy72FCJxbnRfV7EUYgJUN0PBlliIbj9ujFvMCNW4pLeXufb9PGonAEOJOu21e9zeaoBUd9815slp778DyUmhWMoXjUfLVKLTKahaefGGL0/YyTLETgU5vwe+9Q== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN4PR04MB8413.namprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376005)(38070700009); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?/jIQBTwpb8zRGdwyZdVyU3ESMdUyIUmtSle7veP2KlMyzus+EJzVwbykMt01?= =?us-ascii?Q?v8fEldHNJ6A63PGIA30fmBUJ/3Qi3Rkdz8lz8pjfU/gSI8qa1sIhT9xuAyeW?= =?us-ascii?Q?YWxJIL8Y32lbByhj+dkyAKL0z7McsZnqf8ezzHaGF+sL3aSWK6F3/MnnvY0b?= =?us-ascii?Q?gxNmBvlrnYfYOfd5wRawh+dz0MMSokHNfyV/KDSLApTzPy2XcsxuY7k4yjmz?= =?us-ascii?Q?6pUQ5eaW7qjRHKCSJiPxYyK4IWWd20BYX5MIOfyEwpxkkJq0jWRk/fFfYPoX?= =?us-ascii?Q?ltIAmGzw7ao2savq7zeuSjwcQLwMzsmffcmhvW0Sl1hkXDLLwwfCrJQdi6fI?= =?us-ascii?Q?keViUdtc0U9ZVIC0Xx55Tz0vxNxU/hPvvtxo45SdjFNcJEmor/pZRk3P1iLV?= =?us-ascii?Q?zrZhfpppzf42l/tp5tj8iRVpRiIAOCJHWYCJLjm9R2TFYVzDuTVoylVRVYYJ?= =?us-ascii?Q?vE5EqreUXM+GVUUM+tLSntxIEdgqkywrs7DE0l8lW8aYVIiBE7M2+Bz5FwgT?= =?us-ascii?Q?FPCJ5nwEUMgFiw4T/LI3ANZ/gX/nrMCuCOEv5HrQaFqy1P+987rtz6y3O5zY?= =?us-ascii?Q?1qu18mWOIWwgLNotxm9ZrBAn56LfCsEW0G+dX3q9IaFQ0DhpPF0d0WCCPhV2?= =?us-ascii?Q?uRO9SW5hqEHKO0OBbiMkVl3PI/8BngUMCWtUODlviS4R4AIrI1is65fUUd3v?= =?us-ascii?Q?dHeKkK+2qjIue4PHlnVBvnmAQncr/LSV7JqzOYFoFUYgDgK1syueDhJlZ6/5?= =?us-ascii?Q?P4JMW3VEixUIrvrYGBHi2LQp2PLmBqEJQWIM4hwnXrY+Mvc7wo6Ki4SGQWxc?= =?us-ascii?Q?Xf2DPrdsGonoy08IIe2Q5RWheSejJtZUoNWGtZWbNXW3hNF3T3BOmBHE6lRf?= =?us-ascii?Q?FD1VS2KlJnaER+ys+ernEcmTfXuDeOLimpeDaMNaxmUVn/f+0hhK29erYwO9?= =?us-ascii?Q?BaRZXR710si+N0+m276ofaMQqrz7P/2Gxi74Rysp4mDwmbviZbKFG98OPWrY?= =?us-ascii?Q?tdky61oPFNpyDqTFKeM4kl7eVagE2zmy0DvlJimXJUWzjGFaulPWi5A/azmb?= =?us-ascii?Q?QTRVq9GGIxvFRcfl6XVuXG95Ws9+MoaS888CVitLmdsMcUvhA562Mev5Bvdg?= =?us-ascii?Q?Tyh85bWc39cb5QQyIbPJnr9z4r21umv5NxNo/FZ/yf104oKcx6CZHXdnibmF?= =?us-ascii?Q?R7YCVpVIRV6Sob8JCBSZZ9JZRDkDrjB4dH3NxN1s5O8Bve0YoYF5c2jX8g70?= =?us-ascii?Q?YVKN2lpr/L1CywWWqrLO5I2+ejU9/kOrNwstHTuAVdXeAeQXyZSnF7do8Jeh?= =?us-ascii?Q?3m3apeG5M7IRIPQ5IEsC3hAUtvvobSHjdd5QJ7mlh9ZGHSTWTk6A0R5yyc5v?= =?us-ascii?Q?sb4xxsjkbbAYVRSAYjiosNXNxb8/gv+wgqT4fZ7oR3+VJmXQxrJMDGxKCwTD?= =?us-ascii?Q?HQJdZ+gn69TvjcbXa8lcXQ7e294Io3+ShhTrgEvz2y0sQH5ePWNC6joL7Ltf?= =?us-ascii?Q?VTN1odkUijdbmRIFXbnwNOgbdpyazmgRPsjKtgVPGOzMe3UUx2TVvIiIlpgV?= =?us-ascii?Q?UoteRtsGERQV0qEvVTuYbY1wga/foQWKWU0rsG6I67ohQpvEdYgBG1GCydyu?= =?us-ascii?Q?8g=3D=3D?= Content-Type: multipart/alternative; boundary="_000_SN4PR04MB8413933B1D8A101DD86408CADA222SN4PR04MB8413namp_" MIME-Version: 1.0 X-OriginatorOrg: ciena.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SN4PR04MB8413.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3490b5d2-085b-4984-f97d-08dc3d3ee53a X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Mar 2024 18:05:52.2536 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 457a2b01-0019-42ba-a449-45f99e96b60a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: YrPY4tDuu9EOM7dQlxFHPnGtSpU8yFZo6mgCy3h0AzKRn5gxGUSnCnS1FkS1m81MFkM5nttm2YZtNsqXpM2XpQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR04MB8433 X-Proofpoint-ORIG-GUID: UOBua1kyON3NKt-513UGmgBvCwTm5sX1 X-Proofpoint-GUID: UOBua1kyON3NKt-513UGmgBvCwTm5sX1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-03-05_15,2024-03-05_01,2023-05-22_02 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 --_000_SN4PR04MB8413933B1D8A101DD86408CADA222SN4PR04MB8413namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi @Qiming Yang, @Jacob Keller Good day! I am seeing a crash in ice/base running DPDK-2111-stable. We use VPP. While looking at DPDK-emails, I see some relevant changes here. Can you please take a look at the back-trace and suggest/point if this has = been found and fixed ? (gdb) bt #0 __pthread_kill_implementation (threadid=3D, signo=3Dsign= o@entry=3D6, no_tid=3Dno_tid@entry=3D0) at pthread_kill.c:44 #1 0x00007fb6f9983773 in __pthread_kill_internal (signo=3D6, threadid=3D) at pthread_kill.c:78 #2 0x00007fb6f9938876 in __GI_raise (sig=3Dsig@entry=3D6) at ../sysdeps/po= six/raise.c:26 #3 0x00007fb6f99237e3 in __GI_abort () at abort.c:79 #4 0x00000000004083fa in os_exit (code=3Dcode@entry=3D1) at /usr/src/debug= /vpp/21.01+gitAUTOINC+fdd8bd2f89-r0/git/src/vpp/vnet/main.c:434 #5 0x00007fb6f9c6b8d1 in unix_signal_handler (signum=3D11, si=3D, uc=3D) at /usr/src/debug/vpp/21.01+gitAUTOINC+fdd8bd2= f89-r0/git/src/vlib/unix/main.c:190 #6 #7 0x00007fb6b37e5850 in ice_sq_send_cmd_nolock (hw=3D0xac0318700, cq=3D0x= ac031a1c0, desc=3D0x7fb6b643c5e0, buf=3D0xac2a78200, buf_size=3D6, cd=3D0x0= ) at ../git/drivers/net/ice/base/ice_controlq.c:1058 #8 0x00007fb6b37f428a in ice_sq_send_cmd (hw=3D0xac0318700, cq=3D0xac031a1= c0, desc=3D0x7fb6b643c5e0, buf=3D0xac2a78200, buf_size=3D6, cd=3D0x0) at ..= /git/drivers/net/ice/base/ice_controlq.c:1126 #9 0x00007fb6b3824ddb in ice_sq_send_cmd_retry (hw=3D0xac0318700, cq=3D0xa= c031a1c0, desc=3D0x7fb6b643c5e0, buf=3D0xac2a78200, buf_size=3D6, cd=3D0x0)= at ../git/drivers/net/ice/base/ice_common.c:1729 #10 0x00007fb6b38335ee in ice_aq_send_cmd (hw=3D0xac0318700, desc=3D0x7fb6b= 643c5e0, buf=3D0xac2a78200, buf_size=3D6, cd=3D0x0) at ../git/drivers/net/i= ce/base/ice_common.c:1788 #11 0x00007fb6b3833fca in ice_aq_alloc_free_res (hw=3D0xac0318700, num_entr= ies=3D1, buf=3D0xac2a78200, buf_size=3D6, opc=3Dice_aqc_opc_alloc_res, cd= =3D0x0) at ../git/drivers/net/ice/base/ice_common.c:2124 #12 0x00007fb6b38340a1 in ice_alloc_hw_res (hw=3D0xac0318700, type=3D96, nu= m=3D1, btm=3Dfalse, res=3D0x7fb6b643f348) at ../git/drivers/net/ice/base/ic= e_common.c:2154 #13 0x00007fb6b39e25e8 in ice_alloc_prof_id (hw=3D0xac0318700, blk=3DICE_BL= K_RSS, prof_id=3D0x7fb6b643f39f "") at ../git/drivers/net/ice/base/ice_flex= _pipe.c:3309 #14 0x00007fb6b3a03659 in ice_add_prof (hw=3D0xac0318700, blk=3DICE_BLK_RSS= , id=3D17179875328, ptypes=3D0xac2a790fc "", attr=3D0x0, attr_cnt=3D0, es= =3D0xac2a78fd0, masks=3D0xac2a7909a, fd_swap=3Dtrue) at ../git/drivers/net/ice/base/ice_flex_pipe.c:5028 #15 0x00007fb6b3a20210 in ice_flow_add_prof_sync (hw=3D0xac0318700, blk=3DI= CE_BLK_RSS, dir=3DICE_FLOW_RX, prof_id=3D17179875328, segs=3D0xac2a79200, s= egs_cnt=3D1 '\001', acts=3D0x0, acts_cnt=3D0 '\000', prof=3D0x7fb6b6444f10) at ../git/drivers/net/ice/base/ice_flow.c:2245 #16 0x00007fb6b3a20f9a in ice_flow_add_prof (hw=3D0xac0318700, blk=3DICE_BL= K_RSS, dir=3DICE_FLOW_RX, prof_id=3D17179875328, segs=3D0xac2a79200, segs_c= nt=3D1 '\001', acts=3D0x0, acts_cnt=3D0 '\000', prof=3D0x7fb6b6444f10) at ../git/drivers/net/ice/base/ice_flow.c:2646 #17 0x00007fb6b3a483af in ice_add_rss_cfg_sync (hw=3D0xac0318700, vsi_handl= e=3D0, cfg=3D0x7fb6b6444f60) at ../git/drivers/net/ice/base/ice_flow.c:4276 #18 0x00007fb6b3a48503 in ice_add_rss_cfg (hw=3D0xac0318700, vsi_handle=3D0= , cfg=3D0x7fb6b6444fe0) at ../git/drivers/net/ice/base/ice_flow.c:4329 #19 0x00007fb6b3c18577 in ice_add_rss_cfg_wrap (pf=3D0xac031b718, vsi_id=3D= 0, cfg=3D0x7fb6b6444fe0) at ../git/drivers/net/ice/ice_ethdev.c:2998 #20 0x00007fb6b3c186cc in ice_rss_hash_set (pf=3D0xac031b718, rss_hf=3D1222= 0) at ../git/drivers/net/ice/ice_ethdev.c:3038 #21 0x00007fb6b3c2eba9 in ice_init_rss (pf=3D0xac031b718) at ../git/drivers= /net/ice/ice_ethdev.c:3289 #22 0x00007fb6b3c2eccd in ice_dev_configure (dev=3D0x7fb6b8dc04c0 ) at ../git/drivers/net/ice/ice_ethdev.c:3323 #23 0x00007fb6b8ca82a3 in rte_eth_dev_configure (port_id=3D0, nb_rx_q=3D2, = nb_tx_q=3D3, dev_conf=3D0x7fb6bbde3820) at ../git/lib/ethdev/rte_ethdev.c:1= 633 #24 0x00007fb6b8fb7fef in dpdk_device_setup (xd=3Dxd@entry=3D0x7fb6bbde37c0= ) at /usr/src/debug/vpp/21.01+gitAUTOINC+fdd8bd2f89-r0/git/src/plugins/dpdk= /device/common.c:92 #25 0x00007fb6b8fcbe37 in dpdk_lib_init (dm=3D0x7fb6b901d260 ) a= t /usr/src/debug/vpp/21.01+gitAUTOINC+fdd8bd2f89-r0/git/src/plugins/dpdk/de= vice/init.c:759 #26 0x00007fb6b8fd0936 in dpdk_process (vm=3D0x4aef40 , r= t=3D, f=3D) at /usr/src/debug/vpp/21.01+gitAUTOINC+fdd8bd2f89-r0/git/src/plugins/dp= dk/device/init.c:1684 #27 0x00007fb6f9c1c7b7 in vlib_process_bootstrap (_a=3D) at = /usr/src/debug/vpp/21.01+gitAUTOINC+fdd8bd2f89-r0/git/src/vlib/main.c:1477 #28 0x00007fb6f9b24ea8 in clib_calljmp () at /usr/src/debug/vpp/21.01+gitAU= TOINC+fdd8bd2f89-r0/git/src/vppinfra/longjmp.S:123 #29 0x00007fb6b8656d10 in ?? () #30 0x00007fb6f9c2075c in vlib_process_startup (f=3D0x0, p=3D0x7fb6b966e080= , vm=3D0x4aef40 ) at /usr/src/debug/vpp/21.01+gitAUTOINC+= fdd8bd2f89-r0/git/src/vlib/main.c:1502 #31 dispatch_process (vm=3D0x4aef40 , p=3D0x7fb6b966e080,= last_time_stamp=3D, f=3D0x0) at /usr/src/debug/vpp/21.01+gi= tAUTOINC+fdd8bd2f89-r0/git/src/vlib/main.c:1558 #32 0x0000000000000000 in ?? () Thanks, Leela sankar From: Qiming Yang Date: Thursday, April 27, 2023 at 1:38 AM To: dev@dpdk.org Cc: qi.z.zhang@intel.com , Qiming Yang , Jacob Keller Subject: [**EXTERNAL**] [PATCH 03/30] net/ice/base: remove unnecessary cont= rol queue array The driver allocates a cmd_buf array in addition to the desc_buf array. This array stores an ice_sq_cd command details structure for each entry in the control queue ring. And improve debug print for control queue messages. Signed-off-by: Jacob Keller Signed-off-by: Qiming Yang --- drivers/net/ice/base/ice_controlq.c | 107 +++++++++++++++------------- drivers/net/ice/base/ice_controlq.h | 3 - 2 files changed, 56 insertions(+), 54 deletions(-) diff --git a/drivers/net/ice/base/ice_controlq.c b/drivers/net/ice/base/ice= _controlq.c index c34407b48c..acd6ad249b 100644 --- a/drivers/net/ice/base/ice_controlq.c +++ b/drivers/net/ice/base/ice_controlq.c @@ -101,13 +101,6 @@ ice_alloc_ctrlq_sq_ring(struct ice_hw *hw, struct ice_= ctl_q_info *cq) if (!cq->sq.desc_buf.va) return ICE_ERR_NO_MEMORY; - cq->sq.cmd_buf =3D ice_calloc(hw, cq->num_sq_entries, - sizeof(struct ice_sq_cd)); - if (!cq->sq.cmd_buf) { - ice_free_dma_mem(hw, &cq->sq.desc_buf); - return ICE_ERR_NO_MEMORY; - } - return ICE_SUCCESS; } @@ -176,7 +169,7 @@ ice_alloc_rq_bufs(struct ice_hw *hw, struct ice_ctl_q_i= nfo *cq) if (cq->rq_buf_size > ICE_AQ_LG_BUF) desc->flags |=3D CPU_TO_LE16(ICE_AQ_FLAG_LB); desc->opcode =3D 0; - /* This is in accordance with Admin queue design, there is = no + /* This is in accordance with control queue design, there i= s no * register for buffer size configuration */ desc->datalen =3D CPU_TO_LE16(bi->size); @@ -309,9 +302,6 @@ do { = \ ice_free_dma_mem((hw), \ &(qi)->ring.r.ring##_bi[i]); \ } \ - /* free the buffer info list */ \ - if ((qi)->ring.cmd_buf) \ - ice_free(hw, (qi)->ring.cmd_buf); \ /* free DMA head */ \ ice_free(hw, (qi)->ring.dma_head); \ } while (0) @@ -379,11 +369,11 @@ static enum ice_status ice_init_sq(struct ice_hw *hw,= struct ice_ctl_q_info *cq) } /** - * ice_init_rq - initialize ARQ + * ice_init_rq - initialize receive side of a control queue * @hw: pointer to the hardware structure * @cq: pointer to the specific Control queue * - * The main initialization routine for the Admin Receive (Event) Queue. + * The main initialization routine for Receive side of a control queue. * Prior to calling this function, the driver *MUST* set the following fie= lds * in the cq->structure: * - cq->num_rq_entries @@ -441,7 +431,7 @@ static enum ice_status ice_init_rq(struct ice_hw *hw, s= truct ice_ctl_q_info *cq) } /** - * ice_shutdown_sq - shutdown the Control ATQ + * ice_shutdown_sq - shutdown the transmit side of a control queue * @hw: pointer to the hardware structure * @cq: pointer to the specific Control queue * @@ -461,7 +451,7 @@ ice_shutdown_sq(struct ice_hw *hw, struct ice_ctl_q_inf= o *cq) goto shutdown_sq_out; } - /* Stop firmware AdminQ processing */ + /* Stop processing of the control queue */ wr32(hw, cq->sq.head, 0); wr32(hw, cq->sq.tail, 0); wr32(hw, cq->sq.len, 0); @@ -834,7 +824,7 @@ void ice_destroy_all_ctrlq(struct ice_hw *hw) } /** - * ice_clean_sq - cleans Admin send queue (ATQ) + * ice_clean_sq - cleans send side of a control queue * @hw: pointer to the hardware structure * @cq: pointer to the specific Control queue * @@ -844,21 +834,17 @@ static u16 ice_clean_sq(struct ice_hw *hw, struct ice= _ctl_q_info *cq) { struct ice_ctl_q_ring *sq =3D &cq->sq; u16 ntc =3D sq->next_to_clean; - struct ice_sq_cd *details; struct ice_aq_desc *desc; desc =3D ICE_CTL_Q_DESC(*sq, ntc); - details =3D ICE_CTL_Q_DETAILS(*sq, ntc); while (rd32(hw, cq->sq.head) !=3D ntc) { ice_debug(hw, ICE_DBG_AQ_MSG, "ntc %d head %d.\n", ntc, rd= 32(hw, cq->sq.head)); ice_memset(desc, 0, sizeof(*desc), ICE_DMA_MEM); - ice_memset(details, 0, sizeof(*details), ICE_NONDMA_MEM); ntc++; if (ntc =3D=3D sq->count) ntc =3D 0; desc =3D ICE_CTL_Q_DESC(*sq, ntc); - details =3D ICE_CTL_Q_DETAILS(*sq, ntc); } sq->next_to_clean =3D ntc; @@ -866,16 +852,42 @@ static u16 ice_clean_sq(struct ice_hw *hw, struct ice= _ctl_q_info *cq) return ICE_CTL_Q_DESC_UNUSED(sq); } +/** + * ice_ctl_q_str - Convert control queue type to string + * @qtype: the control queue type + * + * Returns: A string name for the given control queue type. + */ +static const char *ice_ctl_q_str(enum ice_ctl_q qtype) +{ + switch (qtype) { + case ICE_CTL_Q_UNKNOWN: + return "Unknown CQ"; + case ICE_CTL_Q_ADMIN: + return "AQ"; + case ICE_CTL_Q_MAILBOX: + return "MBXQ"; + case ICE_CTL_Q_SB: + return "SBQ"; + default: + return "Unrecognized CQ"; + } +} + /** * ice_debug_cq * @hw: pointer to the hardware structure + * @cq: pointer to the specific Control queue * @desc: pointer to control queue descriptor * @buf: pointer to command buffer * @buf_len: max length of buf + * @response: true if this is the writeback response * * Dumps debug log about control command with descriptor contents. */ -static void ice_debug_cq(struct ice_hw *hw, void *desc, void *buf, u16 buf= _len) +static void +ice_debug_cq(struct ice_hw *hw, struct ice_ctl_q_info *cq, + void *desc, void *buf, u16 buf_len, bool response) { struct ice_aq_desc *cq_desc =3D (struct ice_aq_desc *)desc; u16 datalen, flags; @@ -889,7 +901,8 @@ static void ice_debug_cq(struct ice_hw *hw, void *desc,= void *buf, u16 buf_len) datalen =3D LE16_TO_CPU(cq_desc->datalen); flags =3D LE16_TO_CPU(cq_desc->flags); - ice_debug(hw, ICE_DBG_AQ_DESC, "CQ CMD: opcode 0x%04X, flags 0x%04X= , datalen 0x%04X, retval 0x%04X\n", + ice_debug(hw, ICE_DBG_AQ_DESC, "%s %s: opcode 0x%04X, flags 0x%04X,= datalen 0x%04X, retval 0x%04X\n", + ice_ctl_q_str(cq->qtype), response ? "Response" : "Comman= d", LE16_TO_CPU(cq_desc->opcode), flags, datalen, LE16_TO_CPU(cq_desc->retval)); ice_debug(hw, ICE_DBG_AQ_DESC, "\tcookie (h,l) 0x%08X 0x%08X\n", @@ -914,23 +927,23 @@ static void ice_debug_cq(struct ice_hw *hw, void *des= c, void *buf, u16 buf_len) } /** - * ice_sq_done - check if FW has processed the Admin Send Queue (ATQ) + * ice_sq_done - check if the last send on a control queue has completed * @hw: pointer to the HW struct * @cq: pointer to the specific Control queue * - * Returns true if the firmware has processed all descriptors on the - * admin send queue. Returns false if there are still requests pending. + * Returns: true if all the descriptors on the send side of a control queu= e + * are finished processing, false otherwise. */ static bool ice_sq_done(struct ice_hw *hw, struct ice_ctl_q_info *cq) { - /* AQ designers suggest use of head for better + /* control queue designers suggest use of head for better * timing reliability than DD bit */ return rd32(hw, cq->sq.head) =3D=3D cq->sq.next_to_use; } /** - * ice_sq_send_cmd_nolock - send command to Control Queue (ATQ) + * ice_sq_send_cmd_nolock - send command to a control queue * @hw: pointer to the HW struct * @cq: pointer to the specific Control queue * @desc: prefilled descriptor describing the command (non DMA mem) @@ -938,8 +951,9 @@ static bool ice_sq_done(struct ice_hw *hw, struct ice_c= tl_q_info *cq) * @buf_size: size of buffer for indirect commands (or 0 for direct comman= ds) * @cd: pointer to command details structure * - * This is the main send command routine for the ATQ. It runs the queue, - * cleans the queue, etc. + * This is the main send command routine for a control queue. It prepares = the + * command into a descriptor, bumps the send queue tail, waits for the com= mand + * to complete, captures status and data for the command, etc. */ enum ice_status ice_sq_send_cmd_nolock(struct ice_hw *hw, struct ice_ctl_q_info *cq, @@ -950,7 +964,6 @@ ice_sq_send_cmd_nolock(struct ice_hw *hw, struct ice_ct= l_q_info *cq, struct ice_aq_desc *desc_on_ring; bool cmd_completed =3D false; enum ice_status status =3D ICE_SUCCESS; - struct ice_sq_cd *details; u32 total_delay =3D 0; u16 retval =3D 0; u32 val =3D 0; @@ -993,12 +1006,6 @@ ice_sq_send_cmd_nolock(struct ice_hw *hw, struct ice_= ctl_q_info *cq, goto sq_send_command_error; } - details =3D ICE_CTL_Q_DETAILS(cq->sq, cq->sq.next_to_use); - if (cd) - *details =3D *cd; - else - ice_memset(details, 0, sizeof(*details), ICE_NONDMA_MEM); - /* Call clean and check queue available function to reclaim the * descriptors that were processed by FW/MBX; the function returns= the * number of desc available. The clean function called here could = be @@ -1035,8 +1042,7 @@ ice_sq_send_cmd_nolock(struct ice_hw *hw, struct ice_= ctl_q_info *cq, /* Debug desc and buffer */ ice_debug(hw, ICE_DBG_AQ_DESC, "ATQ: Control Send queue desc and b= uffer:\n"); - - ice_debug_cq(hw, (void *)desc_on_ring, buf, buf_size); + ice_debug_cq(hw, cq, (void *)desc_on_ring, buf, buf_size, false); (cq->sq.next_to_use)++; if (cq->sq.next_to_use =3D=3D cq->sq.count) @@ -1084,13 +1090,12 @@ ice_sq_send_cmd_nolock(struct ice_hw *hw, struct ic= e_ctl_q_info *cq, } ice_debug(hw, ICE_DBG_AQ_MSG, "ATQ: desc and buffer writeback:\n")= ; - - ice_debug_cq(hw, (void *)desc, buf, buf_size); + ice_debug_cq(hw, cq, (void *)desc, buf, buf_size, true); /* save writeback AQ if requested */ - if (details->wb_desc) - ice_memcpy(details->wb_desc, desc_on_ring, - sizeof(*details->wb_desc), ICE_DMA_TO_NONDMA); + if (cd && cd->wb_desc) + ice_memcpy(cd->wb_desc, desc_on_ring, + sizeof(*cd->wb_desc), ICE_DMA_TO_NONDMA); /* update the error if time out occurred */ if (!cmd_completed) { @@ -1109,7 +1114,7 @@ ice_sq_send_cmd_nolock(struct ice_hw *hw, struct ice_= ctl_q_info *cq, } /** - * ice_sq_send_cmd - send command to Control Queue (ATQ) + * ice_sq_send_cmd - send command to a control queue * @hw: pointer to the HW struct * @cq: pointer to the specific Control queue * @desc: prefilled descriptor describing the command @@ -1117,8 +1122,9 @@ ice_sq_send_cmd_nolock(struct ice_hw *hw, struct ice_= ctl_q_info *cq, * @buf_size: size of buffer for indirect commands (or 0 for direct comman= ds) * @cd: pointer to command details structure * - * This is the main send command routine for the ATQ. It runs the queue, - * cleans the queue, etc. + * Main command for the transmit side of a control queue. It puts the comm= and + * on the queue, bumps the tail, waits for processing of the command, capt= ures + * command status and results, etc. */ enum ice_status ice_sq_send_cmd(struct ice_hw *hw, struct ice_ctl_q_info *cq, @@ -1160,9 +1166,9 @@ void ice_fill_dflt_direct_cmd_desc(struct ice_aq_desc= *desc, u16 opcode) * @e: event info from the receive descriptor, includes any buffers * @pending: number of events that could be left to process * - * This function cleans one Admin Receive Queue element and returns - * the contents through e. It can also return how many events are - * left to process through 'pending'. + * Clean one element from the receive side of a control queue. On return '= e' + * contains contents of the message, and 'pending' contains the number of + * events left to process. */ enum ice_status ice_clean_rq_elem(struct ice_hw *hw, struct ice_ctl_q_info *cq, @@ -1218,8 +1224,7 @@ ice_clean_rq_elem(struct ice_hw *hw, struct ice_ctl_q= _info *cq, e->msg_len, ICE_DMA_TO_NONDMA); ice_debug(hw, ICE_DBG_AQ_DESC, "ARQ: desc and buffer:\n"); - - ice_debug_cq(hw, (void *)desc, e->msg_buf, cq->rq_buf_size); + ice_debug_cq(hw, cq, (void *)desc, e->msg_buf, cq->rq_buf_size, tru= e); /* Restore the original datalen and buffer address in the desc, * FW updates datalen to indicate the event message size diff --git a/drivers/net/ice/base/ice_controlq.h b/drivers/net/ice/base/ice= _controlq.h index 986604ec3c..5c60469693 100644 --- a/drivers/net/ice/base/ice_controlq.h +++ b/drivers/net/ice/base/ice_controlq.h @@ -43,7 +43,6 @@ enum ice_ctl_q { struct ice_ctl_q_ring { void *dma_head; /* Virtual address to DMA head */ struct ice_dma_mem desc_buf; /* descriptor ring memory */ - void *cmd_buf; /* command buffer memory */ union { struct ice_dma_mem *sq_bi; @@ -73,8 +72,6 @@ struct ice_sq_cd { struct ice_aq_desc *wb_desc; }; -#define ICE_CTL_Q_DETAILS(R, i) (&(((struct ice_sq_cd *)((R).cmd_buf))[i])= ) - /* rq event information */ struct ice_rq_event_info { struct ice_aq_desc desc; -- 2.25.1 --_000_SN4PR04MB8413933B1D8A101DD86408CADA222SN4PR04MB8413namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi @Qiming Yang, @Jacob Keller

 

Good day!

I am seeing  a= crash in ice/base running DPDK-2111-stable. We use VPP.
While looking at DPDK-emails, I see some relevant changes here.<= /span>

Can you please take= a look at the back-trace and suggest/point if this has been found and fixe= d ?

(
gdb) bt

#0  __pthread_kill_implementation (thre= adid=3D<optimized out>, signo=3Dsigno@entry=3D6, no_tid=3Dno_tid@entr= y=3D0) at pthread_kill.c:44

#1  0x00007fb6f9983773 in __pthread_kil= l_internal (signo=3D6, threadid=3D<optimized out>) at pthread_kill.c:= 78

#2  0x00007fb6f9938876 in __GI_raise (s= ig=3Dsig@entry=3D6) at ../sysdeps/posix/raise.c:26

#3  0x00007fb6f99237e3 in __GI_abort ()= at abort.c:79

#4  0x00000000004083fa in os_exit (code= =3Dcode@entry=3D1) at /usr/src/debug/vpp/21.01+gitAUTOINC+fdd8bd2f89-r0/git= /src/vpp/vnet/main.c:434

#5  0x00007fb6f9c6b8d1 in unix_signal_h= andler (signum=3D11, si=3D<optimized out>, uc=3D<optimized out>= ) at /usr/src/debug/vpp/21.01+gitAUTOINC+fdd8bd2f89-r0/git/src/vlib/unix/ma= in.c:190

#6  <signal handler called><= /o:p>

#7  0x00007fb6b37e5850 in ice_sq_send_c= md_nolock (hw=3D0xac0318700, cq=3D0xac031a1c0, desc=3D0x7fb6b643c5e0, buf= =3D0xac2a78200, buf_size=3D6, cd=3D0x0) at ../git/drivers/net/ice/base/ice_= controlq.c:1058

#8  0x00007fb6b37f428a in ice_sq_send_c= md (hw=3D0xac0318700, cq=3D0xac031a1c0, desc=3D0x7fb6b643c5e0, buf=3D0xac2a= 78200, buf_size=3D6, cd=3D0x0) at ../git/drivers/net/ice/base/ice_controlq.= c:1126

#9  0x00007fb6b3824ddb in ice_sq_send_c= md_retry (hw=3D0xac0318700, cq=3D0xac031a1c0, desc=3D0x7fb6b643c5e0, buf=3D= 0xac2a78200, buf_size=3D6, cd=3D0x0) at ../git/drivers/net/ice/base/ice_com= mon.c:1729

#10 0x00007fb6b38335ee in ice_aq_send_cmd (h= w=3D0xac0318700, desc=3D0x7fb6b643c5e0, buf=3D0xac2a78200, buf_size=3D6, cd= =3D0x0) at ../git/drivers/net/ice/base/ice_common.c:1788<= /p>

#11 0x00007fb6b3833fca in ice_aq_alloc_free_= res (hw=3D0xac0318700, num_entries=3D1, buf=3D0xac2a78200, buf_size=3D6, op= c=3Dice_aqc_opc_alloc_res, cd=3D0x0) at ../git/drivers/net/ice/base/ice_com= mon.c:2124

#12 0x00007fb6b38340a1 in ice_alloc_hw_res (= hw=3D0xac0318700, type=3D96, num=3D1, btm=3Dfalse, res=3D0x7fb6b643f348) at= ../git/drivers/net/ice/base/ice_common.c:2154

#13 0x00007fb6b39e25e8 in ice_alloc_prof_id = (hw=3D0xac0318700, blk=3DICE_BLK_RSS, prof_id=3D0x7fb6b643f39f ""= ) at ../git/drivers/net/ice/base/ice_flex_pipe.c:3309

#14 0x00007fb6b3a03659 in ice_add_prof (hw= =3D0xac0318700, blk=3DICE_BLK_RSS, id=3D17179875328, ptypes=3D0xac2a790fc &= quot;", attr=3D0x0, attr_cnt=3D0, es=3D0xac2a78fd0, masks=3D0xac2a7909= a, fd_swap=3Dtrue)

    at ../git/drivers/net/ice= /base/ice_flex_pipe.c:5028

#15 0x00007fb6b3a20210 in ice_flow_add_prof_= sync (hw=3D0xac0318700, blk=3DICE_BLK_RSS, dir=3DICE_FLOW_RX, prof_id=3D171= 79875328, segs=3D0xac2a79200, segs_cnt=3D1 '\001', acts=3D0x0, acts_cnt=3D0 '\000',

    prof=3D0x7fb6b6444f1= 0) at ../git/drivers/net/ice/base/ice_flow.c:2245

#16 0x00007fb6b3a20f9a in ice_flow_add_prof = (hw=3D0xac0318700, blk=3DICE_BLK_RSS, dir=3DICE_FLOW_RX, prof_id=3D17179875= 328, segs=3D0xac2a79200, segs_cnt=3D1 '\001', acts=3D0x0, acts_cnt=3D0 '\000',

    prof=3D0x7fb6b6444f1= 0) at ../git/drivers/net/ice/base/ice_flow.c:2646

#17 0x00007fb6b3a483af in ice_add_rss_cfg_sy= nc (hw=3D0xac0318700, vsi_handle=3D0, cfg=3D0x7fb6b6444f60) at ../git/drive= rs/net/ice/base/ice_flow.c:4276

#18 0x00007fb6b3a48503 in ice_add_rss_cfg (h= w=3D0xac0318700, vsi_handle=3D0, cfg=3D0x7fb6b6444fe0) at ../git/drivers/ne= t/ice/base/ice_flow.c:4329

#19 0x00007fb6b3c18577 in ice_add_rss_cfg_wr= ap (pf=3D0xac031b718, vsi_id=3D0, cfg=3D0x7fb6b6444fe0) at ../git/drivers/n= et/ice/ice_ethdev.c:2998

#20 0x00007fb6b3c186cc in ice_rss_hash_set (= pf=3D0xac031b718, rss_hf=3D12220) at ../git/drivers/net/ice/ice_ethdev.c:30= 38

#21 0x00007fb6b3c2eba9 in ice_init_rss (pf= =3D0xac031b718) at ../git/drivers/net/ice/ice_ethdev.c:3289

#22 0x00007fb6b3c2eccd in ice_dev_configure = (dev=3D0x7fb6b8dc04c0 <rte_eth_devices>) at ../git/drivers/net/ice/ic= e_ethdev.c:3323

#23 0x00007fb6b8ca82a3 in rte_eth_dev_config= ure (port_id=3D0, nb_rx_q=3D2, nb_tx_q=3D3, dev_conf=3D0x7fb6bbde3820) at .= ./git/lib/ethdev/rte_ethdev.c:1633

#24 0x00007fb6b8fb7fef in dpdk_device_setup = (xd=3Dxd@entry=3D0x7fb6bbde37c0) at /usr/src/debug/vpp/21.01+gitAUTOINC+fdd= 8bd2f89-r0/git/src/plugins/dpdk/device/common.c:92

#25 0x00007fb6b8fcbe37 in dpdk_lib_init (dm= =3D0x7fb6b901d260 <dpdk_main>) at /usr/src/debug/vpp/21.01+gitAUTOINC= +fdd8bd2f89-r0/git/src/plugins/dpdk/device/init.c:759

#26 0x00007fb6b8fd0936 in dpdk_process (vm= =3D0x4aef40 <vlib_global_main>, rt=3D<optimized out>, f=3D<o= ptimized out>)

    at /usr/src/debug/vpp/21.= 01+gitAUTOINC+fdd8bd2f89-r0/git/src/plugins/dpdk/device/init.c:1684

#27 0x00007fb6f9c1c7b7 in vlib_process_boots= trap (_a=3D<optimized out>) at /usr/src/debug/vpp/21.01+gitAUTOINC+fd= d8bd2f89-r0/git/src/vlib/main.c:1477

#28 0x00007fb6f9b24ea8 in clib_calljmp () at= /usr/src/debug/vpp/21.01+gitAUTOINC+fdd8bd2f89-r0/git/src/vppinfra/longjmp= .S:123

#29 0x00007fb6b8656d10 in ?? ()

#30 0x00007fb6f9c2075c in vlib_process_start= up (f=3D0x0, p=3D0x7fb6b966e080, vm=3D0x4aef40 <vlib_global_main>) at= /usr/src/debug/vpp/21.01+gitAUTOINC+fdd8bd2f89-r0/git/src/vlib/main.c:1502=

#31 dispatch_process (vm=3D0x4aef40 <vlib= _global_main>, p=3D0x7fb6b966e080, last_time_stamp=3D<optimized out&g= t;, f=3D0x0) at /usr/src/debug/vpp/21.01+gitAUTOINC+fdd8bd2f89-r0/git/src/v= lib/main.c:1558

#32 0x0000000000000000 in ?? ()

 

Thanks,<= /span>

Leela sankar

 

From: Qiming Yang <qiming.yang@intel.co= m>
Date: Thursday, April 27, 2023 at 1:38 AM
To: dev@dpdk.org <dev@dpdk.org>
Cc: qi.z.zhang@intel.com <qi.z.zhang@intel.com>, Qiming Yang &= lt;qiming.yang@intel.com>, Jacob Keller <jacob.e.keller@intel.com>=
Subject: [**EXTERNAL**] [PATCH 03/30] net/ice/base: remove unnecessa= ry control queue array

The driver allocates a cmd_buf array in addition to the desc_bu= f array.
This array stores an ice_sq_cd command details structure for each entry in<= br> the control queue ring. And improve debug print for control queue messages.=

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
---
 drivers/net/ice/base/ice_controlq.c | 107 +++++++++++++++------------= -
 drivers/net/ice/base/ice_controlq.h |   3 -
 2 files changed, 56 insertions(+), 54 deletions(-)

diff --git a/drivers/net/ice/base/ice_controlq.c b/drivers/net/ice/base/ice= _controlq.c
index c34407b48c..acd6ad249b 100644
--- a/drivers/net/ice/base/ice_controlq.c
+++ b/drivers/net/ice/base/ice_controlq.c
@@ -101,13 +101,6 @@ ice_alloc_ctrlq_sq_ring(struct ice_hw *hw, struct ice_= ctl_q_info *cq)
         if (!cq->sq.desc_buf.va= )
            &nb= sp;    return ICE_ERR_NO_MEMORY;
 
-       cq->sq.cmd_buf =3D ice_calloc(hw, = cq->num_sq_entries,
-            &n= bsp;            = ;          sizeof(struct ice_s= q_cd));
-       if (!cq->sq.cmd_buf) {
-            &n= bsp;  ice_free_dma_mem(hw, &cq->sq.desc_buf);
-            &n= bsp;  return ICE_ERR_NO_MEMORY;
-       }
-
         return ICE_SUCCESS;
 }
 
@@ -176,7 +169,7 @@ ice_alloc_rq_bufs(struct ice_hw *hw, struct ice_ctl_q_i= nfo *cq)
            &nb= sp;    if (cq->rq_buf_size > ICE_AQ_LG_BUF)
            &nb= sp;            desc-= >flags |=3D CPU_TO_LE16(ICE_AQ_FLAG_LB);
            &nb= sp;    desc->opcode =3D 0;
-            &n= bsp;  /* This is in accordance with Admin queue design, there is no +            &n= bsp;  /* This is in accordance with control queue design, there is no<= br>             &nb= sp;     * register for buffer size configuration
            &nb= sp;     */
            &nb= sp;    desc->datalen =3D CPU_TO_LE16(bi->size);
@@ -309,9 +302,6 @@ do {        &nb= sp;            =             &nb= sp;            =             &nb= sp;            = \
            &nb= sp;            =         ice_free_dma_mem((hw), &nbs= p;            &= nbsp;   \
            &nb= sp;            =             &nb= sp;   &(qi)->ring.r.ring##_bi[i]);    \
         }    &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;        \
-       /* free the buffer info list */ =             &nb= sp;            =        \
-       if ((qi)->ring.cmd_buf)  = ;            &n= bsp;            = ;            &n= bsp; \
-            &n= bsp;  ice_free(hw, (qi)->ring.cmd_buf);    &nbs= p;            &= nbsp;     \
         /* free DMA head */ &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;      \
         ice_free(hw, (qi)->ring= .dma_head);          &nbs= p;            &= nbsp;      \
 } while (0)
@@ -379,11 +369,11 @@ static enum ice_status ice_init_sq(struct ice_hw *hw,= struct ice_ctl_q_info *cq)
 }
 
 /**
- * ice_init_rq - initialize ARQ
+ * ice_init_rq - initialize receive side of a control queue
  * @hw: pointer to the hardware structure
  * @cq: pointer to the specific Control queue
  *
- * The main initialization routine for the Admin Receive (Event) Queue. + * The main initialization routine for Receive side of a control queue.   * Prior to calling this function, the driver *MUST* set the followin= g fields
  * in the cq->structure:
  *     - cq->num_rq_entries
@@ -441,7 +431,7 @@ static enum ice_status ice_init_rq(struct ice_hw *hw, s= truct ice_ctl_q_info *cq)
 }
 
 /**
- * ice_shutdown_sq - shutdown the Control ATQ
+ * ice_shutdown_sq - shutdown the transmit side of a control queue
  * @hw: pointer to the hardware structure
  * @cq: pointer to the specific Control queue
  *
@@ -461,7 +451,7 @@ ice_shutdown_sq(struct ice_hw *hw, struct ice_ctl_q_inf= o *cq)
            &nb= sp;    goto shutdown_sq_out;
         }
 
-       /* Stop firmware AdminQ processing */=
+       /* Stop processing of the control que= ue */
         wr32(hw, cq->sq.head, 0= );
         wr32(hw, cq->sq.tail, 0= );
         wr32(hw, cq->sq.len, 0)= ;
@@ -834,7 +824,7 @@ void ice_destroy_all_ctrlq(struct ice_hw *hw)
 }
 
 /**
- * ice_clean_sq - cleans Admin send queue (ATQ)
+ * ice_clean_sq - cleans send side of a control queue
  * @hw: pointer to the hardware structure
  * @cq: pointer to the specific Control queue
  *
@@ -844,21 +834,17 @@ static u16 ice_clean_sq(struct ice_hw *hw, struct ice= _ctl_q_info *cq)
 {
         struct ice_ctl_q_ring *sq = =3D &cq->sq;
         u16 ntc =3D sq->next_to= _clean;
-       struct ice_sq_cd *details;
         struct ice_aq_desc *desc;<= br>  
         desc =3D ICE_CTL_Q_DESC(*s= q, ntc);
-       details =3D ICE_CTL_Q_DETAILS(*sq, nt= c);
 
         while (rd32(hw, cq->sq.= head) !=3D ntc) {
            &nb= sp;    ice_debug(hw, ICE_DBG_AQ_MSG, "ntc %d head %d.\n= ", ntc, rd32(hw, cq->sq.head));
            &nb= sp;    ice_memset(desc, 0, sizeof(*desc), ICE_DMA_MEM);
-            &n= bsp;  ice_memset(details, 0, sizeof(*details), ICE_NONDMA_MEM);
            &nb= sp;    ntc++;
            &nb= sp;    if (ntc =3D=3D sq->count)
            &nb= sp;            ntc = =3D 0;
            &nb= sp;    desc =3D ICE_CTL_Q_DESC(*sq, ntc);
-            &n= bsp;  details =3D ICE_CTL_Q_DETAILS(*sq, ntc);
         }
 
         sq->next_to_clean =3D n= tc;
@@ -866,16 +852,42 @@ static u16 ice_clean_sq(struct ice_hw *hw, struct ice= _ctl_q_info *cq)
         return ICE_CTL_Q_DESC_UNUS= ED(sq);
 }
 
+/**
+ * ice_ctl_q_str - Convert control queue type to string
+ * @qtype: the control queue type
+ *
+ * Returns: A string name for the given control queue type.
+ */
+static const char *ice_ctl_q_str(enum ice_ctl_q qtype)
+{
+       switch (qtype) {
+       case ICE_CTL_Q_UNKNOWN:
+            &n= bsp;  return "Unknown CQ";
+       case ICE_CTL_Q_ADMIN:
+            &n= bsp;  return "AQ";
+       case ICE_CTL_Q_MAILBOX:
+            &n= bsp;  return "MBXQ";
+       case ICE_CTL_Q_SB:
+            &n= bsp;  return "SBQ";
+       default:
+            &n= bsp;  return "Unrecognized CQ";
+       }
+}
+
 /**
  * ice_debug_cq
  * @hw: pointer to the hardware structure
+ * @cq: pointer to the specific Control queue
  * @desc: pointer to control queue descriptor
  * @buf: pointer to command buffer
  * @buf_len: max length of buf
+ * @response: true if this is the writeback response
  *
  * Dumps debug log about control command with descriptor contents.   */
-static void ice_debug_cq(struct ice_hw *hw, void *desc, void *buf, u16 buf= _len)
+static void
+ice_debug_cq(struct ice_hw *hw, struct ice_ctl_q_info *cq,
+            void *d= esc, void *buf, u16 buf_len, bool response)
 {
         struct ice_aq_desc *cq_des= c =3D (struct ice_aq_desc *)desc;
         u16 datalen, flags;
@@ -889,7 +901,8 @@ static void ice_debug_cq(struct ice_hw *hw, void *desc,= void *buf, u16 buf_len)
         datalen =3D LE16_TO_CPU(cq= _desc->datalen);
         flags =3D LE16_TO_CPU(cq_d= esc->flags);
 
-       ice_debug(hw, ICE_DBG_AQ_DESC, "= CQ CMD: opcode 0x%04X, flags 0x%04X, datalen 0x%04X, retval 0x%04X\n",=
+       ice_debug(hw, ICE_DBG_AQ_DESC, "= %s %s: opcode 0x%04X, flags 0x%04X, datalen 0x%04X, retval 0x%04X\n",<= br> +            &n= bsp;    ice_ctl_q_str(cq->qtype), response ? "Respon= se" : "Command",
            &nb= sp;      LE16_TO_CPU(cq_desc->opcode), flags, d= atalen,
            &nb= sp;      LE16_TO_CPU(cq_desc->retval));
         ice_debug(hw, ICE_DBG_AQ_D= ESC, "\tcookie (h,l) 0x%08X 0x%08X\n",
@@ -914,23 +927,23 @@ static void ice_debug_cq(struct ice_hw *hw, void *des= c, void *buf, u16 buf_len)
 }
 
 /**
- * ice_sq_done - check if FW has processed the Admin Send Queue (ATQ)
+ * ice_sq_done - check if the last send on a control queue has completed   * @hw: pointer to the HW struct
  * @cq: pointer to the specific Control queue
  *
- * Returns true if the firmware has processed all descriptors on the
- * admin send queue. Returns false if there are still requests pending. + * Returns: true if all the descriptors on the send side of a control queu= e
+ *          are finished proc= essing, false otherwise.
  */
 static bool ice_sq_done(struct ice_hw *hw, struct ice_ctl_q_info *cq)=
 {
-       /* AQ designers suggest use of head f= or better
+       /* control queue designers suggest us= e of head for better
          * timing reliability= than DD bit
          */
         return rd32(hw, cq->sq.= head) =3D=3D cq->sq.next_to_use;
 }
 
 /**
- * ice_sq_send_cmd_nolock - send command to Control Queue (ATQ)
+ * ice_sq_send_cmd_nolock - send command to a control queue
  * @hw: pointer to the HW struct
  * @cq: pointer to the specific Control queue
  * @desc: prefilled descriptor describing the command (non DMA mem) @@ -938,8 +951,9 @@ static bool ice_sq_done(struct ice_hw *hw, struct ice_c= tl_q_info *cq)
  * @buf_size: size of buffer for indirect commands (or 0 for direct c= ommands)
  * @cd: pointer to command details structure
  *
- * This is the main send command routine for the ATQ. It runs the queue, - * cleans the queue, etc.
+ * This is the main send command routine for a control queue. It prepares = the
+ * command into a descriptor, bumps the send queue tail, waits for the com= mand
+ * to complete, captures status and data for the command, etc.
  */
 enum ice_status
 ice_sq_send_cmd_nolock(struct ice_hw *hw, struct ice_ctl_q_info *cq,<= br> @@ -950,7 +964,6 @@ ice_sq_send_cmd_nolock(struct ice_hw *hw, struct ice_ct= l_q_info *cq,
         struct ice_aq_desc *desc_o= n_ring;
         bool cmd_completed =3D fal= se;
         enum ice_status status =3D= ICE_SUCCESS;
-       struct ice_sq_cd *details;
         u32 total_delay =3D 0;
         u16 retval =3D 0;
         u32 val =3D 0;
@@ -993,12 +1006,6 @@ ice_sq_send_cmd_nolock(struct ice_hw *hw, struct ice_= ctl_q_info *cq,
            &nb= sp;    goto sq_send_command_error;
         }
 
-       details =3D ICE_CTL_Q_DETAILS(cq->= sq, cq->sq.next_to_use);
-       if (cd)
-            &n= bsp;  *details =3D *cd;
-       else
-            &n= bsp;  ice_memset(details, 0, sizeof(*details), ICE_NONDMA_MEM);
-
         /* Call clean and check qu= eue available function to reclaim the
          * descriptors that w= ere processed by FW/MBX; the function returns the
          * number of desc ava= ilable. The clean function called here could be
@@ -1035,8 +1042,7 @@ ice_sq_send_cmd_nolock(struct ice_hw *hw, struct ice_= ctl_q_info *cq,
 
         /* Debug desc and buffer *= /
         ice_debug(hw, ICE_DBG_AQ_D= ESC, "ATQ: Control Send queue desc and buffer:\n");
-
-       ice_debug_cq(hw, (void *)desc_on_ring= , buf, buf_size);
+       ice_debug_cq(hw, cq, (void *)desc_on_= ring, buf, buf_size, false);
 
         (cq->sq.next_to_use)++;=
         if (cq->sq.next_to_use = =3D=3D cq->sq.count)
@@ -1084,13 +1090,12 @@ ice_sq_send_cmd_nolock(struct ice_hw *hw, struct ic= e_ctl_q_info *cq,
         }
 
         ice_debug(hw, ICE_DBG_AQ_M= SG, "ATQ: desc and buffer writeback:\n");
-
-       ice_debug_cq(hw, (void *)desc, buf, b= uf_size);
+       ice_debug_cq(hw, cq, (void *)desc, bu= f, buf_size, true);
 
         /* save writeback AQ if re= quested */
-       if (details->wb_desc)
-            &n= bsp;  ice_memcpy(details->wb_desc, desc_on_ring,
-            &n= bsp;            = ; sizeof(*details->wb_desc), ICE_DMA_TO_NONDMA);
+       if (cd && cd->wb_desc)
+            &n= bsp;  ice_memcpy(cd->wb_desc, desc_on_ring,
+            &n= bsp;            = ; sizeof(*cd->wb_desc), ICE_DMA_TO_NONDMA);
 
         /* update the error if tim= e out occurred */
         if (!cmd_completed) {
@@ -1109,7 +1114,7 @@ ice_sq_send_cmd_nolock(struct ice_hw *hw, struct ice_= ctl_q_info *cq,
 }
 
 /**
- * ice_sq_send_cmd - send command to Control Queue (ATQ)
+ * ice_sq_send_cmd - send command to a control queue
  * @hw: pointer to the HW struct
  * @cq: pointer to the specific Control queue
  * @desc: prefilled descriptor describing the command
@@ -1117,8 +1122,9 @@ ice_sq_send_cmd_nolock(struct ice_hw *hw, struct ice_= ctl_q_info *cq,
  * @buf_size: size of buffer for indirect commands (or 0 for direct c= ommands)
  * @cd: pointer to command details structure
  *
- * This is the main send command routine for the ATQ. It runs the queue, - * cleans the queue, etc.
+ * Main command for the transmit side of a control queue. It puts the comm= and
+ * on the queue, bumps the tail, waits for processing of the command, capt= ures
+ * command status and results, etc.
  */
 enum ice_status
 ice_sq_send_cmd(struct ice_hw *hw, struct ice_ctl_q_info *cq,
@@ -1160,9 +1166,9 @@ void ice_fill_dflt_direct_cmd_desc(struct ice_aq_desc= *desc, u16 opcode)
  * @e: event info from the receive descriptor, includes any buffers   * @pending: number of events that could be left to process
  *
- * This function cleans one Admin Receive Queue element and returns
- * the contents through e. It can also return how many events are
- * left to process through 'pending'.
+ * Clean one element from the receive side of a control queue. On return '= e'
+ * contains contents of the message, and 'pending' contains the number of<= br> + * events left to process.
  */
 enum ice_status
 ice_clean_rq_elem(struct ice_hw *hw, struct ice_ctl_q_info *cq,
@@ -1218,8 +1224,7 @@ ice_clean_rq_elem(struct ice_hw *hw, struct ice_ctl_q= _info *cq,
            &nb= sp;            =    e->msg_len, ICE_DMA_TO_NONDMA);
 
         ice_debug(hw, ICE_DBG_AQ_D= ESC, "ARQ: desc and buffer:\n");
-
-       ice_debug_cq(hw, (void *)desc, e->= msg_buf, cq->rq_buf_size);
+       ice_debug_cq(hw, cq, (void *)desc, e-= >msg_buf, cq->rq_buf_size, true);
 
         /* Restore the original da= talen and buffer address in the desc,
          * FW updates datalen= to indicate the event message size
diff --git a/drivers/net/ice/base/ice_controlq.h b/drivers/net/ice/base/ice= _controlq.h
index 986604ec3c..5c60469693 100644
--- a/drivers/net/ice/base/ice_controlq.h
+++ b/drivers/net/ice/base/ice_controlq.h
@@ -43,7 +43,6 @@ enum ice_ctl_q {
 struct ice_ctl_q_ring {
         void *dma_head;  = ;            &n= bsp;  /* Virtual address to DMA head */
         struct ice_dma_mem desc_bu= f;    /* descriptor ring memory */
-       void *cmd_buf;    = ;            &n= bsp; /* command buffer memory */
 
         union {
            &nb= sp;    struct ice_dma_mem *sq_bi;
@@ -73,8 +72,6 @@ struct ice_sq_cd {
         struct ice_aq_desc *wb_des= c;
 };
 
-#define ICE_CTL_Q_DETAILS(R, i) (&(((struct ice_sq_cd *)((R).cmd_buf))= [i]))
-
 /* rq event information */
 struct ice_rq_event_info {
         struct ice_aq_desc desc; --
2.25.1

--_000_SN4PR04MB8413933B1D8A101DD86408CADA222SN4PR04MB8413namp_--