netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] rxrpc: Remove deadcode
@ 2025-04-17 15:32 linux
  2025-04-22 18:22 ` Simon Horman
  0 siblings, 1 reply; 4+ messages in thread
From: linux @ 2025-04-17 15:32 UTC (permalink / raw)
  To: dhowells, marc.dionne
  Cc: davem, edumazet, kuba, pabeni, horms, corbet, linux-afs, netdev,
	linux-doc, linux-kernel, Dr. David Alan Gilbert

From: "Dr. David Alan Gilbert" <linux@treblig.org>

Remove three functions that are no longer used.

rxrpc_get_txbuf() last use was removed by 2020's
commit 5e6ef4f1017c ("rxrpc: Make the I/O thread take over the call and
local processor work")

rxrpc_kernel_get_epoch() last use was removed by 2020's
commit 44746355ccb1 ("afs: Don't get epoch from a server because it may be
ambiguous")

rxrpc_kernel_set_max_life() last use was removed by 2023's
commit db099c625b13 ("rxrpc: Fix timeout of a call that hasn't yet been
granted a channel")

Both of the rxrpc_kernel_* functions were documented.  Remove that
documentation as well as the code.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
---
 Documentation/networking/rxrpc.rst | 24 ------------------
 include/net/af_rxrpc.h             |  3 ---
 net/rxrpc/af_rxrpc.c               | 39 ------------------------------
 net/rxrpc/ar-internal.h            |  1 -
 net/rxrpc/txbuf.c                  |  8 ------
 5 files changed, 75 deletions(-)

diff --git a/Documentation/networking/rxrpc.rst b/Documentation/networking/rxrpc.rst
index e807e18ba32a..8227873963fe 100644
--- a/Documentation/networking/rxrpc.rst
+++ b/Documentation/networking/rxrpc.rst
@@ -1062,30 +1062,6 @@ The kernel interface functions are as follows:
      first function to change.  Note that this must be called in TASK_RUNNING
      state.
 
- (#) Get remote client epoch::
-
-	u32 rxrpc_kernel_get_epoch(struct socket *sock,
-				   struct rxrpc_call *call)
-
-     This allows the epoch that's contained in packets of an incoming client
-     call to be queried.  This value is returned.  The function always
-     successful if the call is still in progress.  It shouldn't be called once
-     the call has expired.  Note that calling this on a local client call only
-     returns the local epoch.
-
-     This value can be used to determine if the remote client has been
-     restarted as it shouldn't change otherwise.
-
- (#) Set the maximum lifespan on a call::
-
-	void rxrpc_kernel_set_max_life(struct socket *sock,
-				       struct rxrpc_call *call,
-				       unsigned long hard_timeout)
-
-     This sets the maximum lifespan on a call to hard_timeout (which is in
-     jiffies).  In the event of the timeout occurring, the call will be
-     aborted and -ETIME or -ETIMEDOUT will be returned.
-
  (#) Apply the RXRPC_MIN_SECURITY_LEVEL sockopt to a socket from within in the
      kernel::
 
diff --git a/include/net/af_rxrpc.h b/include/net/af_rxrpc.h
index cf793d18e5df..1cca647f368a 100644
--- a/include/net/af_rxrpc.h
+++ b/include/net/af_rxrpc.h
@@ -77,9 +77,6 @@ int rxrpc_kernel_charge_accept(struct socket *, rxrpc_notify_rx_t,
 			       unsigned int);
 void rxrpc_kernel_set_tx_length(struct socket *, struct rxrpc_call *, s64);
 bool rxrpc_kernel_check_life(const struct socket *, const struct rxrpc_call *);
-u32 rxrpc_kernel_get_epoch(struct socket *, struct rxrpc_call *);
-void rxrpc_kernel_set_max_life(struct socket *, struct rxrpc_call *,
-			       unsigned long);
 
 int rxrpc_sock_set_min_security_level(struct sock *sk, unsigned int val);
 int rxrpc_sock_set_security_keyring(struct sock *, struct key *);
diff --git a/net/rxrpc/af_rxrpc.c b/net/rxrpc/af_rxrpc.c
index 86873399f7d5..b2cffc1d362d 100644
--- a/net/rxrpc/af_rxrpc.c
+++ b/net/rxrpc/af_rxrpc.c
@@ -449,20 +449,6 @@ bool rxrpc_kernel_check_life(const struct socket *sock,
 }
 EXPORT_SYMBOL(rxrpc_kernel_check_life);
 
-/**
- * rxrpc_kernel_get_epoch - Retrieve the epoch value from a call.
- * @sock: The socket the call is on
- * @call: The call to query
- *
- * Allow a kernel service to retrieve the epoch value from a service call to
- * see if the client at the other end rebooted.
- */
-u32 rxrpc_kernel_get_epoch(struct socket *sock, struct rxrpc_call *call)
-{
-	return call->conn->proto.epoch;
-}
-EXPORT_SYMBOL(rxrpc_kernel_get_epoch);
-
 /**
  * rxrpc_kernel_new_call_notification - Get notifications of new calls
  * @sock: The socket to intercept received messages on
@@ -483,31 +469,6 @@ void rxrpc_kernel_new_call_notification(
 }
 EXPORT_SYMBOL(rxrpc_kernel_new_call_notification);
 
-/**
- * rxrpc_kernel_set_max_life - Set maximum lifespan on a call
- * @sock: The socket the call is on
- * @call: The call to configure
- * @hard_timeout: The maximum lifespan of the call in ms
- *
- * Set the maximum lifespan of a call.  The call will end with ETIME or
- * ETIMEDOUT if it takes longer than this.
- */
-void rxrpc_kernel_set_max_life(struct socket *sock, struct rxrpc_call *call,
-			       unsigned long hard_timeout)
-{
-	ktime_t delay = ms_to_ktime(hard_timeout), expect_term_by;
-
-	mutex_lock(&call->user_mutex);
-
-	expect_term_by = ktime_add(ktime_get_real(), delay);
-	WRITE_ONCE(call->expect_term_by, expect_term_by);
-	trace_rxrpc_timer_set(call, delay, rxrpc_timer_trace_hard);
-	rxrpc_poke_call(call, rxrpc_call_poke_set_timeout);
-
-	mutex_unlock(&call->user_mutex);
-}
-EXPORT_SYMBOL(rxrpc_kernel_set_max_life);
-
 /*
  * connect an RxRPC socket
  * - this just targets it at a specific destination; no actual connection
diff --git a/net/rxrpc/ar-internal.h b/net/rxrpc/ar-internal.h
index 3cc3af15086f..d7e16a84d970 100644
--- a/net/rxrpc/ar-internal.h
+++ b/net/rxrpc/ar-internal.h
@@ -1433,7 +1433,6 @@ static inline void rxrpc_sysctl_exit(void) {}
 extern atomic_t rxrpc_nr_txbuf;
 struct rxrpc_txbuf *rxrpc_alloc_data_txbuf(struct rxrpc_call *call, size_t data_size,
 					   size_t data_align, gfp_t gfp);
-void rxrpc_get_txbuf(struct rxrpc_txbuf *txb, enum rxrpc_txbuf_trace what);
 void rxrpc_see_txbuf(struct rxrpc_txbuf *txb, enum rxrpc_txbuf_trace what);
 void rxrpc_put_txbuf(struct rxrpc_txbuf *txb, enum rxrpc_txbuf_trace what);
 
diff --git a/net/rxrpc/txbuf.c b/net/rxrpc/txbuf.c
index c550991d48fa..29767038691a 100644
--- a/net/rxrpc/txbuf.c
+++ b/net/rxrpc/txbuf.c
@@ -60,14 +60,6 @@ struct rxrpc_txbuf *rxrpc_alloc_data_txbuf(struct rxrpc_call *call, size_t data_
 	return txb;
 }
 
-void rxrpc_get_txbuf(struct rxrpc_txbuf *txb, enum rxrpc_txbuf_trace what)
-{
-	int r;
-
-	__refcount_inc(&txb->ref, &r);
-	trace_rxrpc_txbuf(txb->debug_id, txb->call_debug_id, txb->seq, r + 1, what);
-}
-
 void rxrpc_see_txbuf(struct rxrpc_txbuf *txb, enum rxrpc_txbuf_trace what)
 {
 	int r = refcount_read(&txb->ref);
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] rxrpc: Remove deadcode
  2025-04-17 15:32 [PATCH net-next] rxrpc: Remove deadcode linux
@ 2025-04-22 18:22 ` Simon Horman
  2025-04-22 20:59   ` Dr. David Alan Gilbert
  0 siblings, 1 reply; 4+ messages in thread
From: Simon Horman @ 2025-04-22 18:22 UTC (permalink / raw)
  To: linux
  Cc: dhowells, marc.dionne, davem, edumazet, kuba, pabeni, corbet,
	linux-afs, netdev, linux-doc, linux-kernel

On Thu, Apr 17, 2025 at 04:32:32PM +0100, linux@treblig.org wrote:
> From: "Dr. David Alan Gilbert" <linux@treblig.org>
> 
> Remove three functions that are no longer used.
> 
> rxrpc_get_txbuf() last use was removed by 2020's
> commit 5e6ef4f1017c ("rxrpc: Make the I/O thread take over the call and
> local processor work")
> 
> rxrpc_kernel_get_epoch() last use was removed by 2020's
> commit 44746355ccb1 ("afs: Don't get epoch from a server because it may be
> ambiguous")
> 
> rxrpc_kernel_set_max_life() last use was removed by 2023's
> commit db099c625b13 ("rxrpc: Fix timeout of a call that hasn't yet been
> granted a channel")
> 
> Both of the rxrpc_kernel_* functions were documented.  Remove that
> documentation as well as the code.
> 
> Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>

Hi David,

This patch doesn't apply to net-next.  Probably because of commit
23738cc80483 ("rxrpc: Pull out certain app callback funcs into an ops
table"). So please rebase and repost.

But other than that, this patch looks good to me.

Reviewed-by: Simon Horman <horms@kernel.org>

...

-- 
pw-bot: changes-requested

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] rxrpc: Remove deadcode
  2025-04-22 18:22 ` Simon Horman
@ 2025-04-22 20:59   ` Dr. David Alan Gilbert
  2025-04-22 23:52     ` Dr. David Alan Gilbert
  0 siblings, 1 reply; 4+ messages in thread
From: Dr. David Alan Gilbert @ 2025-04-22 20:59 UTC (permalink / raw)
  To: Simon Horman
  Cc: dhowells, marc.dionne, davem, edumazet, kuba, pabeni, corbet,
	linux-afs, netdev, linux-doc, linux-kernel

* Simon Horman (horms@kernel.org) wrote:
> On Thu, Apr 17, 2025 at 04:32:32PM +0100, linux@treblig.org wrote:
> > From: "Dr. David Alan Gilbert" <linux@treblig.org>
> > 
> > Remove three functions that are no longer used.
> > 
> > rxrpc_get_txbuf() last use was removed by 2020's
> > commit 5e6ef4f1017c ("rxrpc: Make the I/O thread take over the call and
> > local processor work")
> > 
> > rxrpc_kernel_get_epoch() last use was removed by 2020's
> > commit 44746355ccb1 ("afs: Don't get epoch from a server because it may be
> > ambiguous")
> > 
> > rxrpc_kernel_set_max_life() last use was removed by 2023's
> > commit db099c625b13 ("rxrpc: Fix timeout of a call that hasn't yet been
> > granted a channel")
> > 
> > Both of the rxrpc_kernel_* functions were documented.  Remove that
> > documentation as well as the code.
> > 
> > Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
> 
> Hi David,

Hi Simon,

> This patch doesn't apply to net-next.  Probably because of commit
> 23738cc80483 ("rxrpc: Pull out certain app callback funcs into an ops
> table"). So please rebase and repost.

Yeh no problem.

> But other than that, this patch looks good to me.

> Reviewed-by: Simon Horman <horms@kernel.org>

Thanks!

Dave
> 
> ...
> 
> -- 
> pw-bot: changes-requested
-- 
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
\        dave @ treblig.org |                               | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] rxrpc: Remove deadcode
  2025-04-22 20:59   ` Dr. David Alan Gilbert
@ 2025-04-22 23:52     ` Dr. David Alan Gilbert
  0 siblings, 0 replies; 4+ messages in thread
From: Dr. David Alan Gilbert @ 2025-04-22 23:52 UTC (permalink / raw)
  To: Simon Horman
  Cc: dhowells, marc.dionne, davem, edumazet, kuba, pabeni, corbet,
	linux-afs, netdev, linux-doc, linux-kernel

* Dr. David Alan Gilbert (linux@treblig.org) wrote:
> * Simon Horman (horms@kernel.org) wrote:
> > On Thu, Apr 17, 2025 at 04:32:32PM +0100, linux@treblig.org wrote:
> > > From: "Dr. David Alan Gilbert" <linux@treblig.org>
> > > 
> > > Remove three functions that are no longer used.
> > > 
> > > rxrpc_get_txbuf() last use was removed by 2020's
> > > commit 5e6ef4f1017c ("rxrpc: Make the I/O thread take over the call and
> > > local processor work")
> > > 
> > > rxrpc_kernel_get_epoch() last use was removed by 2020's
> > > commit 44746355ccb1 ("afs: Don't get epoch from a server because it may be
> > > ambiguous")
> > > 
> > > rxrpc_kernel_set_max_life() last use was removed by 2023's
> > > commit db099c625b13 ("rxrpc: Fix timeout of a call that hasn't yet been
> > > granted a channel")
> > > 
> > > Both of the rxrpc_kernel_* functions were documented.  Remove that
> > > documentation as well as the code.
> > > 
> > > Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
> > 
> > Hi David,
> 
> Hi Simon,
> 
> > This patch doesn't apply to net-next.  Probably because of commit
> > 23738cc80483 ("rxrpc: Pull out certain app callback funcs into an ops
> > table"). So please rebase and repost.
> 
> Yeh no problem.

v2 sent, see message 20250422235147.146460-1-linux@treblig.org
(I left off your Reviewed-by since it deserves a recheck!)

Dave

> > But other than that, this patch looks good to me.
> 
> > Reviewed-by: Simon Horman <horms@kernel.org>
> 
> Thanks!
> 
> Dave
> > 
> > ...
> > 
> > -- 
> > pw-bot: changes-requested
> -- 
>  -----Open up your eyes, open up your mind, open up your code -------   
> / Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
> \        dave @ treblig.org |                               | In Hex /
>  \ _________________________|_____ http://www.treblig.org   |_______/
> 
-- 
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
\        dave @ treblig.org |                               | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-04-22 23:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-17 15:32 [PATCH net-next] rxrpc: Remove deadcode linux
2025-04-22 18:22 ` Simon Horman
2025-04-22 20:59   ` Dr. David Alan Gilbert
2025-04-22 23:52     ` Dr. David Alan Gilbert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).