public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
* [PATCH 0/3] RFC: Allow C11 extensions in the passt/pasta code
@ 2023-08-01  3:36 David Gibson
  2023-08-01  3:36 ` [PATCH 1/3] Allow C11 code, not just C99 code David Gibson
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: David Gibson @ 2023-08-01  3:36 UTC (permalink / raw)
  To: Stefano Brivio, passt-dev; +Cc: David Gibson

As discussed on our recent calls, the C11 standard introduces
anonymous structure and union members and static assertions, amongst
other things.  Both of these could be useful in a few places in
passt/pasta to make the code more readable and safer.

However, at the moment, the compiler flags we use only allow C99 code.
This series allows C11 code, and makes some fairly obvious cleanups by
using it.

It would be nice to get an opinion on this reasonably quickly, because
I have other patches in the works that will look different depending
on whether or not they can use C11 features.

David Gibson (3):
  Allow C11 code, not just C99 code
  Use C11 anonymous members to make poll refs less verbose to use
  Use static assertion to verify that union epoll_ref is the right size

 Makefile     |  4 ++--
 icmp.c       | 22 +++++++++++-----------
 icmp.h       |  2 +-
 passt.c      |  8 ++++----
 passt.h      |  8 ++++++--
 tcp.c        | 46 +++++++++++++++++++++++-----------------------
 tcp.h        |  2 +-
 tcp_splice.c | 11 +++++------
 udp.c        | 50 +++++++++++++++++++++++---------------------------
 udp.h        |  2 +-
 util.c       |  4 ++--
 11 files changed, 79 insertions(+), 80 deletions(-)

-- 
2.41.0


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

end of thread, other threads:[~2023-08-04  7:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-01  3:36 [PATCH 0/3] RFC: Allow C11 extensions in the passt/pasta code David Gibson
2023-08-01  3:36 ` [PATCH 1/3] Allow C11 code, not just C99 code David Gibson
2023-08-01  3:36 ` [PATCH 2/3] Use C11 anonymous members to make poll refs less verbose to use David Gibson
2023-08-01  3:36 ` [PATCH 3/3] Use static assertion to verify that union epoll_ref is the right size David Gibson
2023-08-01  8:15 ` [PATCH 0/3] RFC: Allow C11 extensions in the passt/pasta code Stefano Brivio
2023-08-02  4:47   ` David Gibson
2023-08-02  8:19     ` Stefano Brivio
2023-08-04  7:03 ` Stefano Brivio

Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

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 IMAP folder(s).