qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net/eth: Have eth_pad_short_frame() take void* arguments
@ 2024-01-08 15:41 Philippe Mathieu-Daudé
  2024-01-09 12:10 ` Akihiko Odaki
  0 siblings, 1 reply; 2+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-01-08 15:41 UTC (permalink / raw)
  To: qemu-devel
  Cc: Dmitry Fleytman, Bin Meng, Jason Wang, Akihiko Odaki,
	Philippe Mathieu-Daudé

Any kind of buffer can hold an Ethernet frame, no just
arrays of unsigned chars.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 include/net/eth.h | 2 +-
 net/eth.c         | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/net/eth.h b/include/net/eth.h
index 3b80b6e07f..d73737f07d 100644
--- a/include/net/eth.h
+++ b/include/net/eth.h
@@ -434,7 +434,7 @@ eth_parse_ipv6_hdr(const struct iovec *pkt, int pkt_frags,
  * @pkt_size: size of the original Ethernet frame
  * @return true if the frame is padded, otherwise false
  */
-bool eth_pad_short_frame(uint8_t *padded_pkt, size_t *padded_buflen,
+bool eth_pad_short_frame(void *padded_pkt, size_t *padded_buflen,
                          const void *pkt, size_t pkt_size);
 
 #endif
diff --git a/net/eth.c b/net/eth.c
index 3f680cc033..25c6eb9b20 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -520,7 +520,7 @@ bool eth_parse_ipv6_hdr(const struct iovec *pkt, int pkt_frags,
     return true;
 }
 
-bool eth_pad_short_frame(uint8_t *padded_pkt, size_t *padded_buflen,
+bool eth_pad_short_frame(void *padded_pkt, size_t *padded_buflen,
                          const void *pkt, size_t pkt_size)
 {
     assert(padded_buflen && *padded_buflen >= ETH_ZLEN);
-- 
2.41.0



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

end of thread, other threads:[~2024-01-09 12:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-08 15:41 [PATCH] net/eth: Have eth_pad_short_frame() take void* arguments Philippe Mathieu-Daudé
2024-01-09 12:10 ` Akihiko Odaki

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