netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] sctp: Remove unused sctp_assoc_del_peer and sctp_chunk_iif
@ 2025-05-01 23:38 linux
  2025-05-02 14:03 ` Xin Long
  2025-05-06  0:01 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: linux @ 2025-05-01 23:38 UTC (permalink / raw)
  To: marcelo.leitner, lucien.xin
  Cc: davem, edumazet, kuba, pabeni, horms, linux-sctp, netdev,
	linux-kernel, Dr. David Alan Gilbert

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

sctp_assoc_del_peer() last use was removed in 2015 by
commit 73e6742027f5 ("sctp: Do not try to search for the transport twice")
which now uses rm_peer instead of del_peer.

sctp_chunk_iif() last use was removed in 2016 by
commit 1f45f78f8e51 ("sctp: allow GSO frags to access the chunk too")

Remove them.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
---
 include/net/sctp/sm.h      |  1 -
 include/net/sctp/structs.h |  2 --
 net/sctp/associola.c       | 18 ------------------
 net/sctp/sm_make_chunk.c   |  8 --------
 4 files changed, 29 deletions(-)

diff --git a/include/net/sctp/sm.h b/include/net/sctp/sm.h
index 64c42bd56bb2..3bfd261a53cc 100644
--- a/include/net/sctp/sm.h
+++ b/include/net/sctp/sm.h
@@ -161,7 +161,6 @@ const struct sctp_sm_table_entry *sctp_sm_lookup_event(
 					enum sctp_event_type event_type,
 					enum sctp_state state,
 					union sctp_subtype event_subtype);
-int sctp_chunk_iif(const struct sctp_chunk *);
 struct sctp_association *sctp_make_temp_asoc(const struct sctp_endpoint *,
 					     struct sctp_chunk *,
 					     gfp_t gfp);
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index dcd288fa1bb6..1ad7ce71d0a7 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -2152,8 +2152,6 @@ struct sctp_transport *sctp_assoc_add_peer(struct sctp_association *,
 				     const union sctp_addr *address,
 				     const gfp_t gfp,
 				     const int peer_state);
-void sctp_assoc_del_peer(struct sctp_association *asoc,
-			 const union sctp_addr *addr);
 void sctp_assoc_rm_peer(struct sctp_association *asoc,
 			 struct sctp_transport *peer);
 void sctp_assoc_control_transport(struct sctp_association *asoc,
diff --git a/net/sctp/associola.c b/net/sctp/associola.c
index 760152e751c7..5793d71852b8 100644
--- a/net/sctp/associola.c
+++ b/net/sctp/associola.c
@@ -736,24 +736,6 @@ struct sctp_transport *sctp_assoc_add_peer(struct sctp_association *asoc,
 	return peer;
 }
 
-/* Delete a transport address from an association.  */
-void sctp_assoc_del_peer(struct sctp_association *asoc,
-			 const union sctp_addr *addr)
-{
-	struct list_head	*pos;
-	struct list_head	*temp;
-	struct sctp_transport	*transport;
-
-	list_for_each_safe(pos, temp, &asoc->peer.transport_addr_list) {
-		transport = list_entry(pos, struct sctp_transport, transports);
-		if (sctp_cmp_addr_exact(addr, &transport->ipaddr)) {
-			/* Do book keeping for removing the peer and free it. */
-			sctp_assoc_rm_peer(asoc, transport);
-			break;
-		}
-	}
-}
-
 /* Lookup a transport by address. */
 struct sctp_transport *sctp_assoc_lookup_paddr(
 					const struct sctp_association *asoc,
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index f80208edd6a5..3ead591c72fd 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -115,14 +115,6 @@ static void sctp_control_set_owner_w(struct sctp_chunk *chunk)
 	skb->destructor = sctp_control_release_owner;
 }
 
-/* What was the inbound interface for this chunk? */
-int sctp_chunk_iif(const struct sctp_chunk *chunk)
-{
-	struct sk_buff *skb = chunk->skb;
-
-	return SCTP_INPUT_CB(skb)->af->skb_iif(skb);
-}
-
 /* RFC 2960 3.3.2 Initiation (INIT) (1)
  *
  * Note 2: The ECN capable field is reserved for future use of
-- 
2.49.0


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

* Re: [PATCH net-next] sctp: Remove unused sctp_assoc_del_peer and sctp_chunk_iif
  2025-05-01 23:38 [PATCH net-next] sctp: Remove unused sctp_assoc_del_peer and sctp_chunk_iif linux
@ 2025-05-02 14:03 ` Xin Long
  2025-05-06  0:01 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Xin Long @ 2025-05-02 14:03 UTC (permalink / raw)
  To: linux
  Cc: marcelo.leitner, davem, edumazet, kuba, pabeni, horms, linux-sctp,
	netdev, linux-kernel

On Thu, May 1, 2025 at 7:38 PM <linux@treblig.org> wrote:
>
> From: "Dr. David Alan Gilbert" <linux@treblig.org>
>
> sctp_assoc_del_peer() last use was removed in 2015 by
> commit 73e6742027f5 ("sctp: Do not try to search for the transport twice")
> which now uses rm_peer instead of del_peer.
>
> sctp_chunk_iif() last use was removed in 2016 by
> commit 1f45f78f8e51 ("sctp: allow GSO frags to access the chunk too")
>
> Remove them.
>
> Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Acked-by: Xin Long <lucien.xin@gmail.com>

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

* Re: [PATCH net-next] sctp: Remove unused sctp_assoc_del_peer and sctp_chunk_iif
  2025-05-01 23:38 [PATCH net-next] sctp: Remove unused sctp_assoc_del_peer and sctp_chunk_iif linux
  2025-05-02 14:03 ` Xin Long
@ 2025-05-06  0:01 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-05-06  0:01 UTC (permalink / raw)
  To: Dr. David Alan Gilbert
  Cc: marcelo.leitner, lucien.xin, davem, edumazet, kuba, pabeni, horms,
	linux-sctp, netdev, linux-kernel

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Fri,  2 May 2025 00:38:15 +0100 you wrote:
> From: "Dr. David Alan Gilbert" <linux@treblig.org>
> 
> sctp_assoc_del_peer() last use was removed in 2015 by
> commit 73e6742027f5 ("sctp: Do not try to search for the transport twice")
> which now uses rm_peer instead of del_peer.
> 
> sctp_chunk_iif() last use was removed in 2016 by
> commit 1f45f78f8e51 ("sctp: allow GSO frags to access the chunk too")
> 
> [...]

Here is the summary with links:
  - [net-next] sctp: Remove unused sctp_assoc_del_peer and sctp_chunk_iif
    https://git.kernel.org/netdev/net-next/c/ac8f09b9210c

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2025-05-06  0:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-01 23:38 [PATCH net-next] sctp: Remove unused sctp_assoc_del_peer and sctp_chunk_iif linux
2025-05-02 14:03 ` Xin Long
2025-05-06  0:01 ` patchwork-bot+netdevbpf

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).