From patchwork Fri May 24 17:48:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673432 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 3BEF73B28F for ; Fri, 24 May 2024 17:48:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716572915; cv=none; b=UT/S/R7WBTQUCfEoECPC8vQptRyZvkuS48J4sdiaoTlCvy2g2XuWJpi65etJsCquUBbd5p32pt0g6MiAEYcwyP+tv9tfeZadGgqmBVlmPUbPVsvlkZm0hx4v08fcempvriEe5932mET4txotVRCK+UnWJzl5HVNcV6qsT3FTEzU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716572915; c=relaxed/simple; bh=rSO04xPxtkcKp4Y9ZOUU4PI1k1z4xjQb5dpT0QZt2Wo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=a5SUR9Ykj1UUmpVjA0Vr0c1hQDXLlmy03rn5W9HEE9uMGT6WtZjYX57le02+T4ZVLv20lJq/soqsSpQRB1AtQsYvWz3euF5LL9Xmqg8j7nUikcHeF00YomQmuhQXTwWkFl51SJ7yhfYW6Q9UB/s2mkY1EerXf9WAyOp1ElLM1PY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=KNHr+nJ1; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="KNHr+nJ1" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-To:Resent-Cc: Resent-Message-ID:In-Reply-To:References; bh=W8aPtXg/5Zdy2K03f98nZs2rFgEtQVgFfavMKkJRaN4=; t=1716572914; x=1717782514; b=KNHr+nJ1K7wpLypvRAIHGubU5eWTmWjMtjNC2ow8/t2DfI6V1shilaSJ7mE1M7JR2gex05GTzl7 qI9NQR0mxIr3YBO08J71J4g1TJo5zDhn1d4g+ybZ5riah8f6+JzM3L/F2t0cPj2EfkzijqeU411Vl LJbIOTdsX74hkr033JYBDmFUE7oMEjS/X9EFa7qsl0nBtWD+wR+rjxB2yetnA5OW07WR+yuvoQXGe ulO7EUtaFhiXgWbV5YkWJdkgywN3raF0l9sDN9P9a8p99f3riZQd+8o17xGlECLqgl+7mE/g+Noep YnX2NIkOmssgg8GQidlUPHZuUCnH8+FqIOqw==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAZ1r-00000008alk-2IzQ; Fri, 24 May 2024 19:48:31 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 1/3] backports: add list_count_nodes() Date: Fri, 24 May 2024 19:48:16 +0200 Message-ID: <20240524194829.f11312298857.I2921f495b9feefbfe464ffd71c7350c66be119a8@changeid> X-Mailer: git-send-email 2.45.1 Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Johannes Berg Signed-off-by: Johannes Berg --- backport/backport-include/linux/list.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 backport/backport-include/linux/list.h diff --git a/backport/backport-include/linux/list.h b/backport/backport-include/linux/list.h new file mode 100644 index 000000000000..8495fd419a95 --- /dev/null +++ b/backport/backport-include/linux/list.h @@ -0,0 +1,19 @@ +#ifndef __BP_LINUX_LIST_H +#define __BP_LINUX_LIST_H +#include_next + +#if LINUX_VERSION_IS_LESS(6,3,0) +#define list_count_nodes LINUX_BACKPORT(list_count_nodes) +static inline size_t list_count_nodes(struct list_head *head) +{ + struct list_head *pos; + size_t count = 0; + + list_for_each(pos, head) + count++; + + return count; +} +#endif + +#endif /* __BP_LINUX_LIST_H */ From patchwork Fri May 24 17:48:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673433 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 ADC833B290 for ; Fri, 24 May 2024 17:48:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716572916; cv=none; b=V4sHMPYPI4c6zAwUG/wqZVoj34akcOWIylOw3tF3uulsZpz+POElZc3t6XBb2xYs4EQNpr429mb1n8dkuoVSbcvyv0/tHYiY/Avc+mckilLOlp4MLQ2mWa/gcL+O+MH7xh74N5qEA2hHyJeZlbeIGpGYGdAgvK1ZVXCV1gXWevQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716572916; c=relaxed/simple; bh=9O5szq7boBszcSFM0DSZF2uDz9Aajmt+8hCMYUI/Ekc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=E3wmvZlsLC9jNqhQgyz+Ahv6wGNdAIP2/P9NJJj5JE8HgRVoXu+0bOpNdUEcOagDuC844mi7r6iJ6BZmREq96qvOe+P4W1YfDUHFaSCbiU2HK0hsEQjp/UU7SUPQkUQ39QfjWtfVHVeMlV/PMY+9/9YrwSdS9gvMZHh8itrQJCk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=r8JOsMLw; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="r8JOsMLw" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=dgs0KwQQZyBl4uTVuIzjAmAec56Q6Wp0ZZPc0CppPi8=; t=1716572914; x=1717782514; b=r8JOsMLwi2qJgHuAvzSv8lYFWBbHX8OAxnkmw8j5NrN4VDH cZJxFPok0c2IO1uOVDyQyBnCj6KhCO+aTysHKvi7jaloJX5l1FKUQW2LzZuPqsNJL6rh1vDqsmNNh Yx4LeW4hdsr7IgjeaIA9dy4of+aKUMVMoUw0+a8YrAz2JmQwPdS9JiTPWVPWVry+DBj5abXwd0sLm i4Eay8sO7ryD7FEzXqnn7Qf9c5qDpYBl2qZmJ1/HyYQP43fNIP2cv6gvYMTXAEdssuv5sa9UaqlNV kidz4q9JVTZeW17Ve0LEc/NmAVl05R/s66DKA1JTOb3EfY/3plrH7dOlr8KqZ2Dw==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAZ1s-00000008alk-0lqc; Fri, 24 May 2024 19:48:32 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 2/3] backports: add timer_delete_sync() Date: Fri, 24 May 2024 19:48:17 +0200 Message-ID: <20240524194829.ff76233b3f76.I5bacafcbce1f73629f1279043650962ad7573025@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524194829.f11312298857.I2921f495b9feefbfe464ffd71c7350c66be119a8@changeid> References: <20240524194829.f11312298857.I2921f495b9feefbfe464ffd71c7350c66be119a8@changeid> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Johannes Berg Signed-off-by: Johannes Berg --- backport/backport-include/linux/timer.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/backport/backport-include/linux/timer.h b/backport/backport-include/linux/timer.h index 69590bb71324..ab0e2e6adcf5 100644 --- a/backport/backport-include/linux/timer.h +++ b/backport/backport-include/linux/timer.h @@ -67,4 +67,12 @@ static inline void timer_setup(struct timer_list *timer, __TIMER_INITIALIZER(_function, 0, 0, 0) #endif +#if LINUX_VERSION_IS_LESS(6,2,0) +#define timer_delete_sync LINUX_BACKPORT(timer_delete_sync) +static inline int timer_delete_sync(struct timer_list *timer) +{ + return del_timer_sync(timer); +} +#endif + #endif /* _BACKPORT_TIMER_H */ From patchwork Fri May 24 17:48:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673434 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 AC3283B293 for ; Fri, 24 May 2024 17:48:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716572917; cv=none; b=ERum75VhsQktGVoFV+/ZYhPFtOltBO9WbZWc8gJqLxstdQkLqdVfnX30N2OVXv5FRI9EgCyqdf/KFUyGafa5PXzg2fIkwsmB76b0hJmt/iKaTrdW3HfVrzUplHbz3mCrqmmZB5AZwoIddKEhdOlZoEAtyXhD1DSetAznAksJR3o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716572917; c=relaxed/simple; bh=so91zDPWB+I4RVCrXRJTUr5Gwaxlrb02MfUoFCEZZOo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SUmxgeuiOPy1KrG1XDMTEN6S57OqVW6lBWWV2lIJzB0TZRRupNm9XowI2iP94iQ3K3bjGwaWMi3Wns30VD1H7FOkj3++b6WnYLEZYTuEJaz7GzqxVXr40NyUz0bNrrfgA8d1hp/OmbZ11PJrg6jz1vrHspRnX2p/Ying4kSVfmM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=VYhMuKeQ; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="VYhMuKeQ" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=Ndw4ZldrqeaMP2lQb/YkFj/Fc3fIj/nurumUNwjjd/k=; t=1716572915; x=1717782515; b=VYhMuKeQ0s06i8YkYx1dqgvIujNoJlspyUblE2DNT5yfGfm YNzUa0s/N4ZnUu6HdaRacyRyYwNfHjV/4AB2PFcsdAKqkPaOS0JcB4OHOwTHtpQ8oNRDQyaebDNvI v6Z3/Mpk7O3MrgpZa8LaSGnSBolyX9b2mIYFrODdwKzwi1BNsVhdmw/9OhAAsXpVQCbAU243lbQDa DGerTR2TNAzUjKfMmXtkGJsh8b7xngMACOpZZAMdJPHIDFgPD4ijm+NvDINiri3mfe5whgrMMajeh wg98cj1uVnEsy8v9NoWg568bmYuIquLq+OmjX4BIkd7GqpqWklhuDAOXREiH0WBQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAZ1s-00000008alk-3Oio; Fri, 24 May 2024 19:48:33 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 3/3] backports: add napi_is_scheduled() Date: Fri, 24 May 2024 19:48:18 +0200 Message-ID: <20240524194829.b59bcf51bf91.I27d58940522266d55eaf288bebd0981e393bfc7f@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524194829.f11312298857.I2921f495b9feefbfe464ffd71c7350c66be119a8@changeid> References: <20240524194829.f11312298857.I2921f495b9feefbfe464ffd71c7350c66be119a8@changeid> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Johannes Berg Signed-off-by: Johannes Berg --- backport/backport-include/linux/netdevice.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/backport/backport-include/linux/netdevice.h b/backport/backport-include/linux/netdevice.h index f720b7537f4b..7f72c3a8eb98 100644 --- a/backport/backport-include/linux/netdevice.h +++ b/backport/backport-include/linux/netdevice.h @@ -204,6 +204,12 @@ static inline bool LINUX_BACKPORT(napi_schedule)(struct napi_struct *n) return false; } #define napi_schedule LINUX_BACKPORT(napi_schedule) + +#define napi_is_scheduled LINUX_BACKPORT(napi_is_scheduled) +static inline bool napi_is_scheduled(struct napi_struct *n) +{ + return test_bit(NAPI_STATE_SCHED, &n->state); +} #endif /* < 6.7.0 */ #endif /* __BACKPORT_NETDEVICE_H */