From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 995BB3FB064; Fri, 8 May 2026 15:08:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=192.198.163.18 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778252920; cv=fail; b=Tjl1pgjcJEtcEIx7s2EMynGfYo53Vn7S7P7nczjIL3u/Te0HAj42tSxb/n64LzGBazfUzHhT7Sx8KFlRP/IQKlqgJ2yv6ZDdxcdjXFCXD9qf9/L6mkT5EO/oygKPU/rKTm2TCGKjwlaGO6wlnuTTxz7kiQQUyivd1+00uSyaMRQ= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778252920; c=relaxed/simple; bh=DKjKQn5mWBvBPvkLpdkqlFBHyoYlsUhjTNlKERaHGwc=; h=Message-ID:Date:Subject:To:CC:References:From:In-Reply-To: Content-Type:MIME-Version; b=eP/Kp4cVrgyj144zsYmK0+V8V1tMF3eS6OBUXr6MJ/tQLeLRRK58ID+o1ccBCc8GcAdlpMijYcv+IyrVuJoo8yzWZvT+fhUzJAFKGWcAnRT5kWgLspmV19sQQ9mdqJfkwzNwxH7tS7mubhLBCMhkKTDxpkFhORvLd9JBdLmbs8E= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=FIQSyN3F; arc=fail smtp.client-ip=192.198.163.18 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="FIQSyN3F" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1778252919; x=1809788919; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=DKjKQn5mWBvBPvkLpdkqlFBHyoYlsUhjTNlKERaHGwc=; b=FIQSyN3FP3MUKfTDHbUi6LXyHO45yQ6nbTqIbRCwu0fC27MQ0tUUlcs5 bkR+C/IQSbztUnPaYK/v8f0q96u30S7rZ8X27rnkJx82W5YPQziV6Al6Y Zqoxa0iH02GV+g7yrEM+KiS/iG0+18oVKMzbNHeNCzCfT0j20lutUtfB4 TkLTePM3448RCTtMtkqWExndArjh59Ob0GbYQZ8UYurQ3UAXu/BRsFdnG pi2Aj7X4ZtyxbQhoNGBjH/Fv+kdIkTaHFPhwjoUhRvqPO9dWISKDgaL16 WtRcK6NcGpnpNmXnkbs0XUxZDpwxHwLBaTuw5mal9ReIJGd62b34ENs13 Q==; X-CSE-ConnectionGUID: 7Gcw+b3oQfevg3BMmpo5Kg== X-CSE-MsgGUID: Oruk23LrQrSXHyDaETnrsQ== X-IronPort-AV: E=McAfee;i="6800,10657,11780"; a="78365230" X-IronPort-AV: E=Sophos;i="6.23,223,1770624000"; d="scan'208";a="78365230" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 May 2026 08:08:38 -0700 X-CSE-ConnectionGUID: TEAPp8KUTOiBpBhJZtzyKg== X-CSE-MsgGUID: Axesa6V3QU+A8j95xDXRnA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,223,1770624000"; d="scan'208";a="236725131" Received: from orsmsx901.amr.corp.intel.com ([10.22.229.23]) by orviesa008.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 May 2026 08:08:38 -0700 Received: from ORSMSX902.amr.corp.intel.com (10.22.229.24) by ORSMSX901.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.37; Fri, 8 May 2026 08:08:37 -0700 Received: from ORSEDG903.ED.cps.intel.com (10.7.248.13) by ORSMSX902.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.37 via Frontend Transport; Fri, 8 May 2026 08:08:37 -0700 Received: from CY3PR05CU001.outbound.protection.outlook.com (40.93.201.53) by edgegateway.intel.com (134.134.137.113) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.37; Fri, 8 May 2026 08:08:36 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ZU6s+YmxT5j/DQCMGrb/GenqHPC1vpoiCWnQ3Pgvvei7P1G0sbw/ziJ2Jt+lSNEKBlt38UrS6Jvrrk15qPXHXWu6BHQEgH7gKNqdLfiMpXs3f2AhMmU5AelTWgLjYx0e/nTrdlxceyI8vW101g400rkits6jaCsExDa9UNEFO1LsgOXmeC9OnCRGRMHRxErLZEt8V/kaFn49Er5IM4npNHqKpFv3TAGAe+1epioqP+zVZJVpnyeFZ8AfIasNUQWN2yBGCaB5iMD+wvtSe6hhOhy/tb8sW+Q+1GFBYUz2hUc2QuDmddUDP9dZn39gqtmk00sQYEFSoeRVP3g9WjnSEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=I13G0utElhy1I210dqBQzgFrPjyF6yFeMGVmg599ey0=; b=cnPOyaaOU9zyOInllqd9SaENCVYrGNYfAy9OOZAWIDwOi3GFx0keYhoJeCTeXjNd/TEmBuGH5JYS2QvinlzfUzzO7SflQJbXsAmN5AUSIRaUlZAhvHYJJxJ+t6zrZ1FCM389wolbeaQ8+f/ncQXnIDe8M0JQh1pZfX/2q7hiZ0hRxaIy+rj520kqgQCTcwEyXj1TfazjS7bGG/+RLT2tkW1v+H6jIexG7JEnjzup90pifnCyC8AvpW3tT0czR6uzPRrJGYeP4N5o97d9S8ZYzUiFe2Jz1GsJdTq4o/Wri3/kVwinXNFkFwF3W3Lg0a8VIazSn8DagUsv1MdkTkY53A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DS0PR11MB8718.namprd11.prod.outlook.com (2603:10b6:8:1b9::20) by IA0PR11MB7306.namprd11.prod.outlook.com (2603:10b6:208:438::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9891.19; Fri, 8 May 2026 15:08:34 +0000 Received: from DS0PR11MB8718.namprd11.prod.outlook.com ([fe80::6aa:411d:4bfa:619c]) by DS0PR11MB8718.namprd11.prod.outlook.com ([fe80::6aa:411d:4bfa:619c%5]) with mapi id 15.20.9891.019; Fri, 8 May 2026 15:08:33 +0000 Message-ID: <4c0cacc0-b5f4-47fa-8865-72bd157c1cb1@intel.com> Date: Fri, 8 May 2026 17:07:03 +0200 User-Agent: Mozilla Thunderbird Subject: Re: [Intel-wired-lan] [PATCH iwl-next v5 4/5] ice: implement Rx queue management ops To: Simon Horman CC: , , , , , , , , , , , , , References: <20260505152923.1040589-5-aleksander.lobakin@intel.com> <20260508140758.1200568-3-horms@kernel.org> Content-Language: en-US From: Alexander Lobakin In-Reply-To: <20260508140758.1200568-3-horms@kernel.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: TL2P290CA0011.ISRP290.PROD.OUTLOOK.COM (2603:1096:950:2::14) To DS0PR11MB8718.namprd11.prod.outlook.com (2603:10b6:8:1b9::20) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB8718:EE_|IA0PR11MB7306:EE_ X-MS-Office365-Filtering-Correlation-Id: 1b7b255e-6508-4409-5456-08dead13ac0e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|376014|366016|1800799024|18002099003|22082099003|56012099003; X-Microsoft-Antispam-Message-Info: +QzH1VvVO7sqpy5XY0nu6DThrfJmSHARrSsqn8RBqMwA/Zaajj7SJY3buQ4ata3w4rlsNqyXuT7hljzFCUZXgAswDrtJMqn7QXa2+bPmQmaF3C7VTerhypAAlgsiL/3mWDhnV2VsGveHB93e3kDTChnDHANOYlZ0fvj/UO7p9wz7E/IDih3HvN0+UZAtv8PShvASz9qMH937RhJMxWxvRhgP+mQchcE/kK2pKkQZyKVluu0zM59wjjdVaHtRQFM5c9ePlqrGXU6918kTbz97uA0U3Xbcxy8NhgxaRi3E10t3YjMDtE49wp0px0vGoENcVbLj8lqkuFIG27LD37fS3zk8dnx2MjdegsexnTPVXr/5QD/xp20/9qrn3gICNGGGBsiyivrg2jiaAOSwVg89vukrg3CnHSaGezKkEoPBQT0BSe9hpcR2WWZ3noHWMt5BNnYM7JBgPfs3RRzyFYPrm51Pqg1TWKvW2Dm/7Gc/Il12taFBVoat0wwCutKhBgCgsTqgvtaNovmD2iFGtasTD+yR9qyvCfThks3PpW8S/6TmT1Z7ZbXOmFH0jtdFIs/UzZOx0EVkTUCBtiZ5V001yLxa56nZ5pfNbxp1J/szbhjtI6NYjJb5X3dd/zrla5tmjl3RxWYPlYsMgarzGN6OKQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS0PR11MB8718.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(7416014)(376014)(366016)(1800799024)(18002099003)(22082099003)(56012099003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Tm1LMkdhYmg1ZVUzZGhabW5GWnpUUENKTVhESjZjN3ZzOXdpU1cvZnZPcmJl?= =?utf-8?B?TWRzN1kzUXRVakkyYlFXbEo0Q1ZwOEJNMXRqNk1jYzduVDdsMTFQUHhrRzRZ?= =?utf-8?B?UmUrZ3NjeVpVandTaVlmSzlSM3o5dzc4NnEwWWJZeEJnQk1IZnd2THJxVEwy?= =?utf-8?B?QjJENFJPaWw1Tmp3VHhsOTZMSmRYNEt3TnVYVVNOSHBIWS85ck1SU2Q3V0FF?= =?utf-8?B?RzlqaFUreUN0OXowQk1Yb3NsMHpmYVcrU1UyY1ZzNnZVZ29RZjArMjgvelcx?= =?utf-8?B?OFJiOXpXN2tvSWl2SG5IQVJPcWJCZWFJa3RuY29GMTZhMlNKNDBVYm1uekNV?= =?utf-8?B?aUxRZCtVOHZMNkhqTEd5Tm1HSFIxMXppVFpVVmF3ZDE3bEVPTmwyZnNCN3Mw?= =?utf-8?B?RjlER2w1R2pwVi9TWUF1VVhQN3daeEkvV0hPSDBtVlNiR2NLbjNtZkx0OVJw?= =?utf-8?B?dE5RWTVMVWVZYVlxTzdCQ2w5aU5zNjFXTHBsY3p2TkJpRTJFWEttalM1b3Jr?= =?utf-8?B?dU05UnhzWXBEbFNsRlFQcWgwYVN3Mms0SFhRN01ONU5RNTI0dloyTDZwZmxJ?= =?utf-8?B?QVEzU2cybGxXMGZMREMxZHhEQUlPL2hSUUZZMXZKZmRzL3VhdElq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+shpvmQQDiSnawL8xyjUFp34f9ayYNSGhpXO5KsyM4nlwpmKTlL+UVqrWqoK1ARwyhQXwNQkVsDFK8TOMtdheNBau8xueOYM/FuzT5NPKRc990LjxgMEsnN98uY3duzAVB0eB72Q6SvK6NsBpqseERSf7JqWiGLTKo+k2c35un6RfGfNOwg7/3H+I9CBLM6y2JrSzfrdf/8zWE7Bf1ZU/xWZJShRr8gSLuUGSGp4BInxqbh7GjnvH44ti9Ro8vQSroNjZDdBJjYbtj+oLEmww== X-MS-Exchange-CrossTenant-Network-Message-Id: 1b7b255e-6508-4409-5456-08dead13ac0e X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB8718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 May 2026 15:08:33.8346 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: j1H9r6wb+CH7lyR2/NgdQUJ+ujaojZIzUHNb6hBuCYOL4aLuGyEakEAsQb76tsqimr+kNJo7l2KDGibhk/ql9Up2JwqwF2RJeBLYUmugGSw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR11MB7306 X-OriginatorOrg: intel.com From: Simon Horman Date: Fri, 8 May 2026 15:08:00 +0100 > From: 'Simon Horman' > > This is an AI-generated review of your patch. The human sending this > email has considered the AI review valid, or at least plausible. > Full review at: https://sashiko.dev > --- > ice: implement Rx queue management ops > > This commit wires the ice driver into the netdev queue management ops > framework, reusing the existing per-queue disable/reconfig/enable paths > originally added for XSk. With it, ice reportedly passes the io_uring > zcrx selftests. > >> diff --git a/drivers/net/ethernet/intel/ice/ice_base.c b/drivers/net/ethernet/intel/ice/ice_base.c >> index 1add82d894bb..4e0b8895c303 100644 >> --- a/drivers/net/ethernet/intel/ice/ice_base.c >> +++ b/drivers/net/ethernet/intel/ice/ice_base.c > > [ ... ] > >> @@ -1577,3 +1593,81 @@ int ice_qp_ena(struct ice_vsi *vsi, u16 q_idx) >> >> return fail; >> } >> + >> +/** >> + * ice_qp_ena - Enables a queue pair >> + * @vsi: VSI of interest >> + * @q_idx: ring index in array >> + * >> + * Returns 0 on success, negative on failure. >> + */ >> +int ice_qp_ena(struct ice_vsi *vsi, u16 q_idx) >> +{ >> + return __ice_qp_ena(vsi, q_idx, ice_vsi_cfg_single_rxq(vsi, q_idx)); >> +} >> + >> +static int ice_queue_start(struct net_device *dev, >> + struct netdev_queue_config *qcfg, >> + void *per_queue_mem, int idx) >> +{ >> + const struct ice_netdev_priv *priv = netdev_priv(dev); >> + struct ice_rx_ring *real = priv->vsi->rx_rings[idx]; >> + struct ice_rx_ring *new = per_queue_mem; >> + struct napi_struct *napi; >> + int ret; >> + >> + real->pp = new->pp; >> + real->rx_fqes = new->rx_fqes; >> + real->hdr_fqes = new->hdr_fqes; >> + real->hdr_pp = new->hdr_pp; >> + >> + real->hdr_truesize = new->hdr_truesize; >> + real->truesize = new->truesize; >> + real->rx_hdr_len = new->rx_hdr_len; >> + real->rx_buf_len = new->rx_buf_len; >> + >> + memcpy(&real->xdp_rxq, &new->xdp_rxq, sizeof(new->xdp_rxq)); >> + >> + ret = ice_setup_rx_ctx(real); >> + if (ret) >> + return ret; > > Simon says: I believe that the issue flagged immediately below is > a false positive; the cleanup logic unwinds things correctly. Yup, our Sashiko also had concerns about this piece, but I rechecked and seems like it's a FP. > > However, the two other issues flagged further down do seem to be > of concern. > > ice_queue_start() eagerly copies new->pp, new->rx_fqes, new->hdr_pp, > new->hdr_fqes and the entire new->xdp_rxq into real before ice_setup_rx_ctx() > has succeeded. [...] > >> + >> + napi = &real->q_vector->napi; >> + >> + page_pool_enable_direct_recycling(real->pp, napi); >> + if (real->hdr_pp) >> + page_pool_enable_direct_recycling(real->hdr_pp, napi); >> + >> + ret = ice_alloc_rx_bufs(real, ICE_DESC_UNUSED(real)); >> + >> + return __ice_qp_ena(priv->vsi, idx, ret); > > ice_alloc_rx_bufs() is declared bool and returns !!cleaned_count, so it > yields 0 on full success and 1 on partial/failed allocation: > > bool ice_alloc_rx_bufs(struct ice_rx_ring *rx_ring, unsigned int cleaned_count) > { > ... > return !!cleaned_count; > } > > That bool is then passed straight into __ice_qp_ena()'s fail parameter, > which only overwrites fail via 'if (!fail) fail = err;', so a value of 1 > propagates unchanged to ice_queue_start()'s return value. > > netdev_rx_queue_reconfig() treats any non-zero return as failure and > propagates it back to userspace (netlink, ethtool, io_uring zcrx install), > where the callers expect a negative errno. > > Before this patch, ice_qp_ena() obtained its fail value from > ice_vsi_cfg_single_rxq(), which returns a signed errno. > > Should this be converted to a proper negative errno before being handed > to __ice_qp_ena(), for example: > > ret = ice_alloc_rx_bufs(real, ICE_DESC_UNUSED(real)) ? -ENOMEM : 0; > >> +} >> + >> +static int ice_queue_stop(struct net_device *dev, void *per_queue_mem, >> + int idx) >> +{ >> + const struct ice_netdev_priv *priv = netdev_priv(dev); >> + struct ice_rx_ring *real = priv->vsi->rx_rings[idx]; >> + int ret; >> + >> + ret = __ice_qp_dis(priv->vsi, idx); >> + if (ret) >> + return ret; >> + >> + page_pool_disable_direct_recycling(real->pp); >> + if (real->hdr_pp) >> + page_pool_disable_direct_recycling(real->hdr_pp); >> + >> + ice_zero_rx_ring(real); >> + memcpy(per_queue_mem, real, sizeof(*real)); >> + >> + return 0; >> +} > > Can this leak inflight page pool buffers? > > ice_zero_rx_ring(real) is called before the memcpy to per_queue_mem, and > ice_zero_rx_ring() resets both indices: > > void ice_zero_rx_ring(struct ice_rx_ring *rx_ring) > { > ... > rx_ring->next_to_clean = 0; > rx_ring->next_to_use = 0; > } > > So per_queue_mem captures a ring where next_to_clean == next_to_use == 0. > > The core then invokes ndo_queue_mem_free(dev, old_mem), and the recycle > loop in ice_queue_mem_free() is guarded by exactly those two indices: > > void ice_queue_mem_free(struct net_device *dev, void *per_queue_mem) > { > ... > for (u32 i = rx_ring->next_to_clean; i != rx_ring->next_to_use; ) { > libeth_rx_recycle_slow(rx_ring->rx_fqes[i].netmem); > > if (rx_ring->hdr_pp) > libeth_rx_recycle_slow(rx_ring->hdr_fqes[i].netmem); > > if (unlikely(++i == rx_ring->count)) > i = 0; > } > ... > ice_rxq_pp_destroy(rx_ring); > } > > With 0 != 0 false on entry, the loop never runs, so any buffers that were > in rx_fqes[old_ntc..old_ntu) (and hdr_fqes[] when header split is on) are > never returned via libeth_rx_recycle_slow(). ice_rxq_pp_destroy() then > kvfree()s the fqes arrays and calls page_pool_destroy() with outstanding > inflight references that are no longer tracked anywhere. > > The new ice_clean_rx_ring() wrapper keeps the original ordering: > > void ice_clean_rx_ring(struct ice_rx_ring *rx_ring) > { > ice_queue_mem_free(rx_ring->netdev, rx_ring); > ice_zero_rx_ring(rx_ring); > } > > Should ice_queue_stop() follow the same ordering and perform the memcpy > before ice_zero_rx_ring(real), so the recycle loop in ice_queue_mem_free() > sees the real ntc/ntu values? > >> + >> +const struct netdev_queue_mgmt_ops ice_queue_mgmt_ops = { >> + .ndo_queue_mem_alloc = ice_queue_mem_alloc, >> + .ndo_queue_mem_free = ice_queue_mem_free, >> + .ndo_queue_mem_size = sizeof(struct ice_rx_ring), >> + .ndo_queue_start = ice_queue_start, >> + .ndo_queue_stop = ice_queue_stop, >> +}; Those two are new to me, I'll double check. Thanks, Olek