[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 08/23] hw/net/net_rx_pkt: Remove deadcode
From: |
Michael Tokarev |
Subject: |
[PULL 08/23] hw/net/net_rx_pkt: Remove deadcode |
Date: |
Fri, 4 Oct 2024 19:03:16 +0300 |
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>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
(Mjt: also removed net_rx_pkt_get_l3_hdr_offset prototype from
hw/net/net_rx_pkt.h as suggested by Akihiko Odaki)
---
hw/net/net_rx_pkt.c | 13 -------------
hw/net/net_rx_pkt.h | 17 -----------------
2 files changed, 30 deletions(-)
diff --git a/hw/net/net_rx_pkt.c b/hw/net/net_rx_pkt.c
index 0ea8734474..f87b6f046c 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);
@@ -426,13 +420,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..ea077f5fdb 100644
--- a/hw/net/net_rx_pkt.h
+++ b/hw/net/net_rx_pkt.h
@@ -77,14 +77,6 @@ void net_rx_pkt_get_protocols(struct NetRxPkt *pkt,
bool *hasip4, bool *hasip6,
EthL4HdrProto *l4hdr_proto);
-/**
-* fetches L3 header offset
-*
-* @pkt: packet
-*
-*/
-size_t net_rx_pkt_get_l3_hdr_offset(struct NetRxPkt *pkt);
-
/**
* fetches L4 header offset
*
@@ -267,15 +259,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.39.5
- [PULL 00/23] Trivial patches for 2024-10-04, Michael Tokarev, 2024/10/04
- [PULL 01/23] hw/audio/virtio-snd: Remove unnecessary "exec/tswap.h" header, Michael Tokarev, 2024/10/04
- [PULL 02/23] qemu-keymap: Release local allocation references, Michael Tokarev, 2024/10/04
- [PULL 05/23] hw/xen: Remove deadcode, Michael Tokarev, 2024/10/04
- [PULL 07/23] net: Remove deadcode, Michael Tokarev, 2024/10/04
- [PULL 06/23] q35: Remove unused mch_mcfg_base, Michael Tokarev, 2024/10/04
- [PULL 08/23] hw/net/net_rx_pkt: Remove deadcode,
Michael Tokarev <=
- [PULL 03/23] vnc: fix crash when no console attached, Michael Tokarev, 2024/10/04
- [PULL 10/23] linux-user: Remove unused handle_vm86_fault, Michael Tokarev, 2024/10/04
- [PULL 04/23] MAINTAINERS: remove gensyscalls.sh from the linux-user section, Michael Tokarev, 2024/10/04
- [PULL 09/23] hw/char: Remove unused serial_set_frequency, Michael Tokarev, 2024/10/04
- [PULL 11/23] hw: Remove unused fw_cfg_init_io, Michael Tokarev, 2024/10/04
- [PULL 12/23] ui/cursor: remove cursor_get_mono_image, Michael Tokarev, 2024/10/04
- [PULL 13/23] vhost: Remove unused vhost_dev_{load|save}_inflight, Michael Tokarev, 2024/10/04
- [PULL 14/23] remote: Remove unused remote_iohub_finalize, Michael Tokarev, 2024/10/04