public inbox for [email protected]
 help / color / mirror / Atom feed
From: Ammar Faizi <[email protected]>
To: Stefan Roesch <[email protected]>
Cc: Facebook Kernel Team <[email protected]>,
	Jens Axboe <[email protected]>,
	Olivier Langlois <[email protected]>,
	Jakub Kicinski <[email protected]>,
	netdev Mailing List <[email protected]>,
	io-uring Mailing List <[email protected]>
Subject: Re: [PATCH v5 3/4] liburing: add example programs for napi busy poll
Date: Sat, 26 Nov 2022 04:31:53 +0700	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

On 11/22/22 2:14 AM, Stefan Roesch wrote:
> This adds two example programs to test the napi busy poll functionality.
> It consists of a client program and a server program. To get a napi id,
> the client and the server program need to be run on different hosts.
> 
> To test the napi busy poll timeout, the -t needs to be specified. A
> reasonable value for the busy poll timeout is 100. By specifying the
> busy poll timeout on the server and the client the best results are
> accomplished.
> 
> Signed-off-by: Stefan Roesch <[email protected]>

Since commit:

     fd6b571b0b03aeeb529f235c5c9c0a7c3256340c ("github: Add -Wmissing-prototypes for GitHub CI bot")

liburing GitHub CI robot enforces functions and global variables that
are not used outside the translation unit to be marked as static.

This patch fails the build.

GitHub CI says:

   clang -Werror -D_GNU_SOURCE -I../src/include/ -g -O3 -Wall -Wextra -Werror -Wmissing-prototypes -o napi-busy-poll-client napi-busy-poll-client.c -L../src/ -luring
   clang -Werror -D_GNU_SOURCE -I../src/include/ -g -O3 -Wall -Wextra -Werror -Wmissing-prototypes -o napi-busy-poll-server napi-busy-poll-server.c -L../src/ -luring
   napi-busy-poll-client.c:78:6: error: no previous prototype for function 'printUsage' [-Werror,-Wmissing-prototypes]
   void printUsage(const char *name)
        ^
   napi-busy-poll-client.c:78:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void printUsage(const char *name)
   ^
   static
   napi-busy-poll-client.c:102:6: error: no previous prototype for function 'printError' [-Werror,-Wmissing-prototypes]
   void printError(const char *msg, int opt)
        ^
   napi-busy-poll-client.c:102:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void printError(const char *msg, int opt)
   ^
   static
   napi-busy-poll-client.c:108:6: error: no previous prototype for function 'setProcessScheduler' [-Werror,-Wmissing-prototypes]
   void setProcessScheduler(void)
        ^
   napi-busy-poll-client.c:108:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void setProcessScheduler(void)
   ^
   static
   napi-busy-poll-client.c:118:8: error: no previous prototype for function 'diffTimespec' [-Werror,-Wmissing-prototypes]
   double diffTimespec(const struct timespec *time1, const struct timespec *time0)
          ^
   napi-busy-poll-client.c:118:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   double diffTimespec(const struct timespec *time1, const struct timespec *time0)
   ^
   static
   napi-busy-poll-client.c:124:10: error: no previous prototype for function 'encodeUserData' [-Werror,-Wmissing-prototypes]
   uint64_t encodeUserData(char type, int fd)
            ^
   napi-busy-poll-client.c:124:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   uint64_t encodeUserData(char type, int fd)
   ^
   static
   napi-busy-poll-client.c:129:6: error: no previous prototype for function 'decodeUserData' [-Werror,-Wmissing-prototypes]
   void decodeUserData(uint64_t data, char *type, int *fd)
        ^
   napi-busy-poll-client.c:129:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void decodeUserData(uint64_t data, char *type, int *fd)
   ^
   static
   napi-busy-poll-client.c:135:13: error: no previous prototype for function 'opTypeToStr' [-Werror,-Wmissing-prototypes]
   const char *opTypeToStr(char type)
               ^
   napi-busy-poll-client.c:135:7: note: declare 'static' if the function is not intended to be used outside of this translation unit
   const char *opTypeToStr(char type)
         ^
   static
   napi-busy-poll-client.c:159:6: error: no previous prototype for function 'reportNapi' [-Werror,-Wmissing-prototypes]
   void reportNapi(struct ctx *ctx)
        ^
   napi-busy-poll-client.c:159:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void reportNapi(struct ctx *ctx)
   ^
   static
   napi-busy-poll-client.c:173:6: error: no previous prototype for function 'sendPing' [-Werror,-Wmissing-prototypes]
   void sendPing(struct ctx *ctx)
        ^
   napi-busy-poll-client.c:173:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void sendPing(struct ctx *ctx)
   ^
   static
   napi-busy-poll-client.c:183:6: error: no previous prototype for function 'receivePing' [-Werror,-Wmissing-prototypes]
   void receivePing(struct ctx *ctx)
        ^
   napi-busy-poll-client.c:183:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void receivePing(struct ctx *ctx)
   ^
   static
   napi-busy-poll-client.c:191:6: error: no previous prototype for function 'recordRTT' [-Werror,-Wmissing-prototypes]
   void recordRTT(struct ctx *ctx)
        ^
   napi-busy-poll-client.c:191:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void recordRTT(struct ctx *ctx)
   ^
   static
   napi-busy-poll-client.c:203:6: error: no previous prototype for function 'printStats' [-Werror,-Wmissing-prototypes]
   void printStats(struct ctx *ctx)
        ^
   napi-busy-poll-client.c:203:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void printStats(struct ctx *ctx)
   ^
   static
   napi-busy-poll-client.c:230:5: error: no previous prototype for function 'completion' [-Werror,-Wmissing-prototypes]
   int completion(struct ctx *ctx, struct io_uring_cqe *cqe)
       ^
   napi-busy-poll-client.c:230:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int completion(struct ctx *ctx, struct io_uring_cqe *cqe)
   ^
   static
   13 errors generated.
   make[1]: *** [Makefile:38: napi-busy-poll-client] Error 1
   make[1]: *** Waiting for unfinished jobs....
   napi-busy-poll-server.c:78:6: error: no previous prototype for function 'printUsage' [-Werror,-Wmissing-prototypes]
   void printUsage(const char *name)
        ^
   napi-busy-poll-server.c:78:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void printUsage(const char *name)
   ^
   static
   napi-busy-poll-server.c:104:6: error: no previous prototype for function 'printError' [-Werror,-Wmissing-prototypes]
   void printError(const char *msg, int opt)
        ^
   napi-busy-poll-server.c:104:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void printError(const char *msg, int opt)
   ^
   static
   napi-busy-poll-server.c:110:6: error: no previous prototype for function 'setProcessScheduler' [-Werror,-Wmissing-prototypes]
   void setProcessScheduler()
        ^
   napi-busy-poll-server.c:110:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void setProcessScheduler()
   ^
   static
   napi-busy-poll-server.c:120:10: error: no previous prototype for function 'encodeUserData' [-Werror,-Wmissing-prototypes]
   uint64_t encodeUserData(char type, int fd)
            ^
   napi-busy-poll-server.c:120:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   uint64_t encodeUserData(char type, int fd)
   ^
   static
   napi-busy-poll-server.c:125:6: error: no previous prototype for function 'decodeUserData' [-Werror,-Wmissing-prototypes]
   void decodeUserData(uint64_t data, char *type, int *fd)
        ^
   napi-busy-poll-server.c:125:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void decodeUserData(uint64_t data, char *type, int *fd)
   ^
   static
   napi-busy-poll-server.c:131:13: error: no previous prototype for function 'opTypeToStr' [-Werror,-Wmissing-prototypes]
   const char *opTypeToStr(char type)
               ^
   napi-busy-poll-server.c:131:7: note: declare 'static' if the function is not intended to be used outside of this translation unit
   const char *opTypeToStr(char type)
         ^
   static
   napi-busy-poll-server.c:155:6: error: no previous prototype for function 'reportNapi' [-Werror,-Wmissing-prototypes]
   void reportNapi(struct ctx *ctx)
        ^
   napi-busy-poll-server.c:155:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void reportNapi(struct ctx *ctx)
   ^
   static
   napi-busy-poll-server.c:169:6: error: no previous prototype for function 'sendPing' [-Werror,-Wmissing-prototypes]
   void sendPing(struct ctx *ctx)
        ^
   napi-busy-poll-server.c:169:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void sendPing(struct ctx *ctx)
   ^
   static
   napi-busy-poll-server.c:178:6: error: no previous prototype for function 'receivePing' [-Werror,-Wmissing-prototypes]
   void receivePing(struct ctx *ctx)
        ^
   napi-busy-poll-server.c:178:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void receivePing(struct ctx *ctx)
   ^
   static
   napi-busy-poll-server.c:193:6: error: no previous prototype for function 'completion' [-Werror,-Wmissing-prototypes]
   void completion(struct ctx *ctx, struct io_uring_cqe *cqe)
        ^
   napi-busy-poll-server.c:193:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void completion(struct ctx *ctx, struct io_uring_cqe *cqe)
   ^
   static
   10 errors generated.
   make[1]: *** [Makefile:38: napi-busy-poll-server] Error 1
   make: *** [Makefile:12: all] Error 2
   make[1]: Leaving directory '/home/runner/work/liburing/liburing/examples'
   Error: Process completed with exit code 2.

-- 
Ammar Faizi


  reply	other threads:[~2022-11-25 21:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-21 19:14 [PATCH v5 0/4] liburing: add api for napi busy poll Stefan Roesch
2022-11-21 19:14 ` [PATCH v5 1/4] liburing: add api to set napi busy poll settings Stefan Roesch
2022-11-21 19:14 ` [PATCH v5 2/4] liburing: add documentation for new napi busy polling Stefan Roesch
2022-11-21 19:14 ` [PATCH v5 3/4] liburing: add example programs for napi busy poll Stefan Roesch
2022-11-25 21:31   ` Ammar Faizi [this message]
2022-11-25 21:34   ` Ammar Faizi
2022-11-21 19:14 ` [PATCH v5 4/4] liburing: update changelog with new feature Stefan Roesch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox