netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC net-next] strparser: Remove unused strp_process
@ 2025-05-01  0:31 linux
  0 siblings, 0 replies; only message in thread
From: linux @ 2025-05-01  0:31 UTC (permalink / raw)
  To: kuba, netdev; +Cc: linux-kernel, Dr. David Alan Gilbert

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

strp_process() was addded in 2017 in
commit bbb03029a899 ("strparser: Generalize strparser")

but never used.

Remove it.

....but, hmm I'm not sure how much other cleanup needs doing,
there's still a comment in strp_init() referencing strp_process
and it makes me think there might be other code handling the
'general mode' which strp_process seems to have been added for.

Suggestions?

Dave

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
---
 Documentation/networking/strparser.rst | 12 ------------
 include/net/strparser.h                |  3 ---
 net/strparser/strparser.c              | 13 -------------
 3 files changed, 28 deletions(-)

diff --git a/Documentation/networking/strparser.rst b/Documentation/networking/strparser.rst
index 8dc6bb04c710..e7729915d7a1 100644
--- a/Documentation/networking/strparser.rst
+++ b/Documentation/networking/strparser.rst
@@ -81,18 +81,6 @@ Functions
 
      ::
 
-	int strp_process(struct strparser *strp, struct sk_buff *orig_skb,
-			 unsigned int orig_offset, size_t orig_len,
-			 size_t max_msg_size, long timeo)
-
-    strp_process is called in general mode for a stream parser to
-    parse an sk_buff. The number of bytes processed or a negative
-    error number is returned. Note that strp_process does not
-    consume the sk_buff. max_msg_size is maximum size the stream
-    parser will parse. timeo is timeout for completing a message.
-
-    ::
-
 	void strp_data_ready(struct strparser *strp);
 
     The upper layer calls strp_tcp_data_ready when data is ready on
diff --git a/include/net/strparser.h b/include/net/strparser.h
index 0ed73e364faa..cc64e9d8c9e9 100644
--- a/include/net/strparser.h
+++ b/include/net/strparser.h
@@ -163,8 +163,5 @@ void strp_check_rcv(struct strparser *strp);
 int strp_init(struct strparser *strp, struct sock *sk,
 	      const struct strp_callbacks *cb);
 void strp_data_ready(struct strparser *strp);
-int strp_process(struct strparser *strp, struct sk_buff *orig_skb,
-		 unsigned int orig_offset, size_t orig_len,
-		 size_t max_msg_size, long timeo);
 
 #endif /* __NET_STRPARSER_H_ */
diff --git a/net/strparser/strparser.c b/net/strparser/strparser.c
index d946bfb424c7..2cd9c39910a5 100644
--- a/net/strparser/strparser.c
+++ b/net/strparser/strparser.c
@@ -314,19 +314,6 @@ static int __strp_recv(read_descriptor_t *desc, struct sk_buff *orig_skb,
 	return eaten;
 }
 
-int strp_process(struct strparser *strp, struct sk_buff *orig_skb,
-		 unsigned int orig_offset, size_t orig_len,
-		 size_t max_msg_size, long timeo)
-{
-	read_descriptor_t desc; /* Dummy arg to strp_recv */
-
-	desc.arg.data = strp;
-
-	return __strp_recv(&desc, orig_skb, orig_offset, orig_len,
-			   max_msg_size, timeo);
-}
-EXPORT_SYMBOL_GPL(strp_process);
-
 static int strp_recv(read_descriptor_t *desc, struct sk_buff *orig_skb,
 		     unsigned int orig_offset, size_t orig_len)
 {
-- 
2.49.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2025-05-01  0:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-01  0:31 [RFC net-next] strparser: Remove unused strp_process linux

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