qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hw/net/net_rx_pkt: Remove deadcode
@ 2024-09-18 22:51 dave
  2024-10-02 10:30 ` Thomas Huth
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: dave @ 2024-09-18 22:51 UTC (permalink / raw)
  To: dmitry.fleytman, akihiko.odaki, jasowang, qemu-devel
  Cc: Dr. David Alan Gilbert

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

net_rx_pkt_get_l3_hdr_offset and net_rx_pkt_get_iovec_len haven't
been used since they were added.

Remove them.

Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
---
 hw/net/net_rx_pkt.c | 13 -------------
 hw/net/net_rx_pkt.h |  9 ---------
 2 files changed, 22 deletions(-)

diff --git a/hw/net/net_rx_pkt.c b/hw/net/net_rx_pkt.c
index 32e5f3f9cf..cec1d0523d 100644
--- a/hw/net/net_rx_pkt.c
+++ b/hw/net/net_rx_pkt.c
@@ -209,12 +209,6 @@ void net_rx_pkt_get_protocols(struct NetRxPkt *pkt,
     *l4hdr_proto = pkt->l4hdr_info.proto;
 }
 
-size_t net_rx_pkt_get_l3_hdr_offset(struct NetRxPkt *pkt)
-{
-    assert(pkt);
-    return pkt->l3hdr_off;
-}
-
 size_t net_rx_pkt_get_l4_hdr_offset(struct NetRxPkt *pkt)
 {
     assert(pkt);
@@ -427,13 +421,6 @@ struct iovec *net_rx_pkt_get_iovec(struct NetRxPkt *pkt)
     return pkt->vec;
 }
 
-uint16_t net_rx_pkt_get_iovec_len(struct NetRxPkt *pkt)
-{
-    assert(pkt);
-
-    return pkt->vec_len;
-}
-
 void net_rx_pkt_set_vhdr(struct NetRxPkt *pkt,
                             struct virtio_net_hdr *vhdr)
 {
diff --git a/hw/net/net_rx_pkt.h b/hw/net/net_rx_pkt.h
index 55ec67a1a7..e8df9cfd52 100644
--- a/hw/net/net_rx_pkt.h
+++ b/hw/net/net_rx_pkt.h
@@ -267,15 +267,6 @@ net_rx_pkt_attach_data(struct NetRxPkt *pkt, const void *data,
  */
 struct iovec *net_rx_pkt_get_iovec(struct NetRxPkt *pkt);
 
-/**
-* returns io vector length that holds the attached data
-*
-* @pkt:            packet
-* @ret:            IOVec length
-*
-*/
-uint16_t net_rx_pkt_get_iovec_len(struct NetRxPkt *pkt);
-
 /**
  * prints rx packet data if debug is enabled
  *
-- 
2.46.0



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

* Re: [PATCH] hw/net/net_rx_pkt: Remove deadcode
  2024-09-18 22:51 [PATCH] hw/net/net_rx_pkt: Remove deadcode dave
@ 2024-10-02 10:30 ` Thomas Huth
  2024-10-03  4:53 ` Akihiko Odaki
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Thomas Huth @ 2024-10-02 10:30 UTC (permalink / raw)
  To: dave, dmitry.fleytman, akihiko.odaki, jasowang, qemu-devel,
	QEMU Trivial

On 19/09/2024 00.51, dave@treblig.org wrote:
> From: "Dr. David Alan Gilbert" <dave@treblig.org>
> 
> net_rx_pkt_get_l3_hdr_offset and net_rx_pkt_get_iovec_len haven't
> been used since they were added.
> 
> Remove them.
> 
> Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
> ---
>   hw/net/net_rx_pkt.c | 13 -------------
>   hw/net/net_rx_pkt.h |  9 ---------
>   2 files changed, 22 deletions(-)
> 
> diff --git a/hw/net/net_rx_pkt.c b/hw/net/net_rx_pkt.c
> index 32e5f3f9cf..cec1d0523d 100644
> --- a/hw/net/net_rx_pkt.c
> +++ b/hw/net/net_rx_pkt.c
> @@ -209,12 +209,6 @@ void net_rx_pkt_get_protocols(struct NetRxPkt *pkt,
>       *l4hdr_proto = pkt->l4hdr_info.proto;
>   }
>   
> -size_t net_rx_pkt_get_l3_hdr_offset(struct NetRxPkt *pkt)
> -{
> -    assert(pkt);
> -    return pkt->l3hdr_off;
> -}
> -
>   size_t net_rx_pkt_get_l4_hdr_offset(struct NetRxPkt *pkt)
>   {
>       assert(pkt);
> @@ -427,13 +421,6 @@ struct iovec *net_rx_pkt_get_iovec(struct NetRxPkt *pkt)
>       return pkt->vec;
>   }
>   
> -uint16_t net_rx_pkt_get_iovec_len(struct NetRxPkt *pkt)
> -{
> -    assert(pkt);
> -
> -    return pkt->vec_len;
> -}
> -
>   void net_rx_pkt_set_vhdr(struct NetRxPkt *pkt,
>                               struct virtio_net_hdr *vhdr)
>   {
> diff --git a/hw/net/net_rx_pkt.h b/hw/net/net_rx_pkt.h
> index 55ec67a1a7..e8df9cfd52 100644
> --- a/hw/net/net_rx_pkt.h
> +++ b/hw/net/net_rx_pkt.h
> @@ -267,15 +267,6 @@ net_rx_pkt_attach_data(struct NetRxPkt *pkt, const void *data,
>    */
>   struct iovec *net_rx_pkt_get_iovec(struct NetRxPkt *pkt);
>   
> -/**
> -* returns io vector length that holds the attached data
> -*
> -* @pkt:            packet
> -* @ret:            IOVec length
> -*
> -*/
> -uint16_t net_rx_pkt_get_iovec_len(struct NetRxPkt *pkt);
> -
>   /**
>    * prints rx packet data if debug is enabled
>    *

Reviewed-by: Thomas Huth <thuth@redhat.com>



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

* Re: [PATCH] hw/net/net_rx_pkt: Remove deadcode
  2024-09-18 22:51 [PATCH] hw/net/net_rx_pkt: Remove deadcode dave
  2024-10-02 10:30 ` Thomas Huth
@ 2024-10-03  4:53 ` Akihiko Odaki
  2024-10-03  8:27 ` Michael Tokarev
  2024-10-09  8:32 ` Jason Wang
  3 siblings, 0 replies; 7+ messages in thread
From: Akihiko Odaki @ 2024-10-03  4:53 UTC (permalink / raw)
  To: dave, dmitry.fleytman, jasowang, qemu-devel

On 2024/09/19 7:51, dave@treblig.org wrote:
> From: "Dr. David Alan Gilbert" <dave@treblig.org>
> 
> net_rx_pkt_get_l3_hdr_offset and net_rx_pkt_get_iovec_len haven't
> been used since they were added.

You forgot to remove net_rx_pkt_get_l3_hdr_offset() from: 
hw/net/net_rx_pkt.h
It looks good otherwise.

Regards,
Akihiko Odaki

> 
> Remove them.
> 
> Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
> ---
>   hw/net/net_rx_pkt.c | 13 -------------
>   hw/net/net_rx_pkt.h |  9 ---------
>   2 files changed, 22 deletions(-)
> 
> diff --git a/hw/net/net_rx_pkt.c b/hw/net/net_rx_pkt.c
> index 32e5f3f9cf..cec1d0523d 100644
> --- a/hw/net/net_rx_pkt.c
> +++ b/hw/net/net_rx_pkt.c
> @@ -209,12 +209,6 @@ void net_rx_pkt_get_protocols(struct NetRxPkt *pkt,
>       *l4hdr_proto = pkt->l4hdr_info.proto;
>   }
>   
> -size_t net_rx_pkt_get_l3_hdr_offset(struct NetRxPkt *pkt)
> -{
> -    assert(pkt);
> -    return pkt->l3hdr_off;
> -}
> -
>   size_t net_rx_pkt_get_l4_hdr_offset(struct NetRxPkt *pkt)
>   {
>       assert(pkt);
> @@ -427,13 +421,6 @@ struct iovec *net_rx_pkt_get_iovec(struct NetRxPkt *pkt)
>       return pkt->vec;
>   }
>   
> -uint16_t net_rx_pkt_get_iovec_len(struct NetRxPkt *pkt)
> -{
> -    assert(pkt);
> -
> -    return pkt->vec_len;
> -}
> -
>   void net_rx_pkt_set_vhdr(struct NetRxPkt *pkt,
>                               struct virtio_net_hdr *vhdr)
>   {
> diff --git a/hw/net/net_rx_pkt.h b/hw/net/net_rx_pkt.h
> index 55ec67a1a7..e8df9cfd52 100644
> --- a/hw/net/net_rx_pkt.h
> +++ b/hw/net/net_rx_pkt.h
> @@ -267,15 +267,6 @@ net_rx_pkt_attach_data(struct NetRxPkt *pkt, const void *data,
>    */
>   struct iovec *net_rx_pkt_get_iovec(struct NetRxPkt *pkt);
>   
> -/**
> -* returns io vector length that holds the attached data
> -*
> -* @pkt:            packet
> -* @ret:            IOVec length
> -*
> -*/
> -uint16_t net_rx_pkt_get_iovec_len(struct NetRxPkt *pkt);
> -
>   /**
>    * prints rx packet data if debug is enabled
>    *



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

* Re: [PATCH] hw/net/net_rx_pkt: Remove deadcode
  2024-09-18 22:51 [PATCH] hw/net/net_rx_pkt: Remove deadcode dave
  2024-10-02 10:30 ` Thomas Huth
  2024-10-03  4:53 ` Akihiko Odaki
@ 2024-10-03  8:27 ` Michael Tokarev
  2024-10-03 10:54   ` Dr. David Alan Gilbert
  2024-10-09  8:32 ` Jason Wang
  3 siblings, 1 reply; 7+ messages in thread
From: Michael Tokarev @ 2024-10-03  8:27 UTC (permalink / raw)
  To: dave, dmitry.fleytman, akihiko.odaki, jasowang, qemu-devel; +Cc: QEMU Trivial

19.09.2024 01:51, dave@treblig.org wrote:
> From: "Dr. David Alan Gilbert" <dave@treblig.org>
> 
> net_rx_pkt_get_l3_hdr_offset and net_rx_pkt_get_iovec_len haven't
> been used since they were added.
> 
> Remove them.

Applied to the trivial-patches tree, removing net_rx_pkt_get_l3_hdr_offset()
prototype from hw/net/net_rx_pkt.h in the process)

Thanks,

/mjt


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

* Re: [PATCH] hw/net/net_rx_pkt: Remove deadcode
  2024-10-03  8:27 ` Michael Tokarev
@ 2024-10-03 10:54   ` Dr. David Alan Gilbert
  0 siblings, 0 replies; 7+ messages in thread
From: Dr. David Alan Gilbert @ 2024-10-03 10:54 UTC (permalink / raw)
  To: Michael Tokarev
  Cc: dmitry.fleytman, akihiko.odaki, jasowang, qemu-devel,
	QEMU Trivial

* Michael Tokarev (mjt@tls.msk.ru) wrote:
> 19.09.2024 01:51, dave@treblig.org wrote:
> > From: "Dr. David Alan Gilbert" <dave@treblig.org>
> > 
> > net_rx_pkt_get_l3_hdr_offset and net_rx_pkt_get_iovec_len haven't
> > been used since they were added.
> > 
> > Remove them.
> 
> Applied to the trivial-patches tree, removing net_rx_pkt_get_l3_hdr_offset()
> prototype from hw/net/net_rx_pkt.h in the process)

Thanks, and to Akhiko for pointing out that header left over.

Dave

> Thanks,
> 
> /mjt
-- 
 -----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] 7+ messages in thread

* Re: [PATCH] hw/net/net_rx_pkt: Remove deadcode
  2024-09-18 22:51 [PATCH] hw/net/net_rx_pkt: Remove deadcode dave
                   ` (2 preceding siblings ...)
  2024-10-03  8:27 ` Michael Tokarev
@ 2024-10-09  8:32 ` Jason Wang
  2024-10-09  9:05   ` Michael Tokarev
  3 siblings, 1 reply; 7+ messages in thread
From: Jason Wang @ 2024-10-09  8:32 UTC (permalink / raw)
  To: dave; +Cc: dmitry.fleytman, akihiko.odaki, qemu-devel

On Thu, Sep 19, 2024 at 6:51 AM <dave@treblig.org> wrote:
>
> From: "Dr. David Alan Gilbert" <dave@treblig.org>
>
> net_rx_pkt_get_l3_hdr_offset and net_rx_pkt_get_iovec_len haven't
> been used since they were added.
>
> Remove them.
>
> Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
> ---

Queued.

Thanks



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

* Re: [PATCH] hw/net/net_rx_pkt: Remove deadcode
  2024-10-09  8:32 ` Jason Wang
@ 2024-10-09  9:05   ` Michael Tokarev
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Tokarev @ 2024-10-09  9:05 UTC (permalink / raw)
  To: Jason Wang, dave; +Cc: dmitry.fleytman, akihiko.odaki, qemu-devel

09.10.2024 11:32, Jason Wang wrote:

> Queued.

Jason, please do a git pull first ;)

/mjt


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

end of thread, other threads:[~2024-10-09  9:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-18 22:51 [PATCH] hw/net/net_rx_pkt: Remove deadcode dave
2024-10-02 10:30 ` Thomas Huth
2024-10-03  4:53 ` Akihiko Odaki
2024-10-03  8:27 ` Michael Tokarev
2024-10-03 10:54   ` Dr. David Alan Gilbert
2024-10-09  8:32 ` Jason Wang
2024-10-09  9:05   ` Michael Tokarev

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