[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 6/6] net/eth: Remove the single use of udp_hdr struc
From: |
Philippe Mathieu-Daudé |
Subject: |
[Qemu-devel] [PATCH 6/6] net/eth: Remove the single use of udp_hdr structure |
Date: |
Thu, 8 Aug 2019 16:34:57 +0200 |
Commit 75020a70215 introduced 2 very equivalent structures:
udp_header and udp_hdr.
Replace the single use of udp_hdr by udp_header (which has few more
uses in the codebase) and remove the now unused structure.
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
hw/net/net_tx_pkt.c | 2 +-
include/net/eth.h | 7 -------
2 files changed, 1 insertion(+), 8 deletions(-)
diff --git a/hw/net/net_tx_pkt.c b/hw/net/net_tx_pkt.c
index fc4514416c..25148cf01b 100644
--- a/hw/net/net_tx_pkt.c
+++ b/hw/net/net_tx_pkt.c
@@ -349,7 +349,7 @@ void net_tx_pkt_build_vheader(struct NetTxPkt *pkt, bool
tso_enable,
case IP_PROTO_UDP:
pkt->virt_hdr.flags = VIRTIO_NET_HDR_F_NEEDS_CSUM;
pkt->virt_hdr.csum_start = pkt->hdr_len;
- pkt->virt_hdr.csum_offset = offsetof(struct udp_hdr, uh_sum);
+ pkt->virt_hdr.csum_offset = offsetof(struct udp_header, uh_sum);
break;
default:
break;
diff --git a/include/net/eth.h b/include/net/eth.h
index 0b2584328a..740ec225fb 100644
--- a/include/net/eth.h
+++ b/include/net/eth.h
@@ -153,13 +153,6 @@ struct ip6_option_hdr {
uint8_t len;
};
-struct udp_hdr {
- uint16_t uh_sport; /* source port */
- uint16_t uh_dport; /* destination port */
- uint16_t uh_ulen; /* udp length */
- uint16_t uh_sum; /* udp checksum */
-};
-
#define ip6_nxt ip6_ctlun.ip6_un1.ip6_un1_nxt
#define ip6_ecn_acc ip6_ctlun.ip6_un3.ip6_un3_ecn
--
2.20.1
- [Qemu-devel] [PATCH 0/6] net/eth: Remove duplicated tcp/udp_hdr structures, Philippe Mathieu-Daudé, 2019/08/08
- [Qemu-devel] [RFC PATCH 1/6] hw/net/virtio-net: Use TCP_HEADER_FLAGS/TCP_HEADER_DATA_OFFSET macros, Philippe Mathieu-Daudé, 2019/08/08
- [Qemu-devel] [RFC PATCH 2/6] net/colo-compare: Use the tcp_header structure, Philippe Mathieu-Daudé, 2019/08/08
- [Qemu-devel] [PATCH 3/6] net/filter-rewriter: Use the tcp_header structure, Philippe Mathieu-Daudé, 2019/08/08
- [Qemu-devel] [RFC PATCH 4/6] hw/net/vmxnet3: Use the tcp_header structure, Philippe Mathieu-Daudé, 2019/08/08
- [Qemu-devel] [PATCH 5/6] net/eth: Remove the unused tcp_hdr structure, Philippe Mathieu-Daudé, 2019/08/08
- [Qemu-devel] [PATCH 6/6] net/eth: Remove the single use of udp_hdr structure,
Philippe Mathieu-Daudé <=
- Re: [Qemu-devel] [PATCH 0/6] net/eth: Remove duplicated tcp/udp_hdr structures, Dmitry Fleytman, 2019/08/12
- Re: [Qemu-devel] [PATCH 0/6] net/eth: Remove duplicated tcp/udp_hdr structures, Philippe Mathieu-Daudé, 2019/08/18