2 * Copyright (c) 2017 Cisco and/or its affiliates.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at:
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
18 #include <sys/types.h>
19 #include <sys/socket.h>
24 #include <vcl/sock_test.h>
28 #define SOCK_SERVER_USE_EPOLL 1
29 #define VPPCOM_SESSION_ATTR_UNIT_TEST 0
31 #if SOCK_SERVER_USE_EPOLL
32 #include <sys/epoll.h>
33 #if !defined(VCL_TEST)
39 #if VPPCOM_SESSION_ATTR_UNIT_TEST
40 #define BUFLEN sizeof (uint64_t) * 16
42 uint32_t buflen = BUFLEN;
43 uint32_t *flags = (uint32_t *) buffer;
54 sock_test_stats_t stats;
61 #define SOCK_SERVER_MAX_TEST_CONN 10
62 #define SOCK_SERVER_MAX_EPOLL_EVENTS 10
66 #if SOCK_SERVER_USE_EPOLL
68 struct epoll_event listen_ev;
69 struct epoll_event wait_events[SOCK_SERVER_MAX_EPOLL_EVENTS];
70 #if !defined (VCL_TEST)
71 int af_unix_listen_fd;
73 struct epoll_event af_unix_listen_ev;
74 struct sockaddr_un serveraddr;
75 uint32_t af_unix_xacts;
79 size_t conn_pool_size;
80 sock_server_conn_t *conn_pool;
84 struct timeval timeout;
87 sock_server_main_t sock_server_main;
89 #if ! SOCK_SERVER_USE_EPOLL
93 sock_server_main_t *ssm = &sock_server_main;
96 for (nfds = i = 0; i < FD_SETSIZE; i++)
98 if (FD_ISSET (i, &ssm->rd_fdset) || FD_ISSET (i, &ssm->wr_fdset))
105 conn_fdset_set (sock_server_conn_t * conn, fd_set * fdset)
107 sock_server_main_t *ssm = &sock_server_main;
109 FD_SET (conn->fd, fdset);
110 ssm->nfds = get_nfds ();
114 conn_fdset_clr (sock_server_conn_t * conn, fd_set * fdset)
116 sock_server_main_t *ssm = &sock_server_main;
118 FD_CLR (conn->fd, fdset);
119 ssm->nfds = get_nfds ();
124 conn_pool_expand (size_t expand_size)
126 sock_server_main_t *ssm = &sock_server_main;
127 sock_server_conn_t *conn_pool;
128 size_t new_size = ssm->conn_pool_size + expand_size;
131 conn_pool = realloc (ssm->conn_pool, new_size * sizeof (*ssm->conn_pool));
134 for (i = ssm->conn_pool_size; i < new_size; i++)
136 sock_server_conn_t *conn = &conn_pool[i];
137 memset (conn, 0, sizeof (*conn));
138 sock_test_cfg_init (&conn->cfg);
139 sock_test_buf_alloc (&conn->cfg, 1 /* is_rxbuf */ ,
140 &conn->buf, &conn->buf_size);
141 conn->cfg.txbuf_size = conn->cfg.rxbuf_size;
144 ssm->conn_pool = conn_pool;
145 ssm->conn_pool_size = new_size;
149 int errno_val = errno;
150 perror ("ERROR in conn_pool_expand()");
151 fprintf (stderr, "SERVER: ERROR: Memory allocation "
152 "failed (errno = %d)!\n", errno_val);
156 static inline sock_server_conn_t *
157 conn_pool_alloc (void)
159 sock_server_main_t *ssm = &sock_server_main;
162 for (i = 0; i < ssm->conn_pool_size; i++)
164 if (!ssm->conn_pool[i].is_alloc)
167 ssm->conn_pool[i].endpt.ip = ssm->conn_pool[i].ip;
169 ssm->conn_pool[i].is_alloc = 1;
170 return (&ssm->conn_pool[i]);
178 conn_pool_free (sock_server_conn_t * conn)
180 #if ! SOCK_SERVER_USE_EPOLL
181 sock_server_main_t *ssm = &sock_server_main;
183 conn_fdset_clr (conn, &ssm->rd_fdset);
184 conn_fdset_clr (conn, &ssm->wr_fdset);
191 sync_config_and_reply (sock_server_conn_t * conn, sock_test_cfg_t * rx_cfg)
194 sock_test_buf_alloc (&conn->cfg, 1 /* is_rxbuf */ ,
195 &conn->buf, &conn->buf_size);
196 conn->cfg.txbuf_size = conn->cfg.rxbuf_size;
198 if (conn->cfg.verbose)
200 printf ("\nSERVER (fd %d): Replying to cfg message!\n", conn->fd);
201 sock_test_cfg_dump (&conn->cfg, 0 /* is_client */ );
203 (void) sock_test_write (conn->fd, (uint8_t *) & conn->cfg,
204 sizeof (conn->cfg), NULL, conn->cfg.verbose);
208 stream_test_server_start_stop (sock_server_conn_t * conn,
209 sock_test_cfg_t * rx_cfg)
211 sock_server_main_t *ssm = &sock_server_main;
212 int client_fd = conn->fd;
213 sock_test_t test = rx_cfg->test;
215 if (rx_cfg->ctrl_handle == conn->fd)
218 clock_gettime (CLOCK_REALTIME, &conn->stats.stop);
220 for (i = 0; i < ssm->conn_pool_size; i++)
222 sock_server_conn_t *tc = &ssm->conn_pool[i];
224 if (tc->cfg.ctrl_handle == conn->fd)
226 sock_test_stats_accumulate (&conn->stats, &tc->stats);
228 if (conn->cfg.verbose)
232 sprintf (buf, "SERVER (fd %d) RESULTS", tc->fd);
233 sock_test_stats_dump (buf, &tc->stats, 1 /* show_rx */ ,
234 test == SOCK_TEST_TYPE_BI
241 sock_test_stats_dump ("SERVER RESULTS", &conn->stats, 1 /* show_rx */ ,
242 (test == SOCK_TEST_TYPE_BI) /* show_tx */ ,
244 sock_test_cfg_dump (&conn->cfg, 0 /* is_client */ );
245 if (conn->cfg.verbose)
247 printf (" sock server main\n"
248 SOCK_TEST_SEPARATOR_STRING
250 " buf size: %u (0x%08x)\n"
251 SOCK_TEST_SEPARATOR_STRING,
252 conn->buf, conn->buf_size, conn->buf_size);
255 sync_config_and_reply (conn, rx_cfg);
256 printf ("\nSERVER (fd %d): %s-directional Stream Test Complete!\n"
257 SOCK_TEST_BANNER_STRING "\n", conn->fd,
258 test == SOCK_TEST_TYPE_BI ? "Bi" : "Uni");
262 printf ("\n" SOCK_TEST_BANNER_STRING
263 "SERVER (fd %d): %s-directional Stream Test!\n"
264 " Sending client the test cfg to start streaming data...\n",
265 client_fd, test == SOCK_TEST_TYPE_BI ? "Bi" : "Uni");
267 rx_cfg->ctrl_handle = (rx_cfg->ctrl_handle == ~0) ? conn->fd :
270 sync_config_and_reply (conn, rx_cfg);
272 /* read the 1st chunk, record start time */
273 memset (&conn->stats, 0, sizeof (conn->stats));
274 clock_gettime (CLOCK_REALTIME, &conn->stats.start);
280 stream_test_server (sock_server_conn_t * conn, int rx_bytes)
282 int client_fd = conn->fd;
283 sock_test_t test = conn->cfg.test;
285 if (test == SOCK_TEST_TYPE_BI)
286 (void) sock_test_write (client_fd, conn->buf, rx_bytes, &conn->stats,
289 if (conn->stats.rx_bytes >= conn->cfg.total_bytes)
291 clock_gettime (CLOCK_REALTIME, &conn->stats.stop);
295 #if SOCK_SERVER_USE_EPOLL && !defined (VCL_TEST)
299 sock_server_main_t *ssm = &sock_server_main;
300 int af_unix_client_fd;
304 size_t nbytes = strlen (SOCK_TEST_MIXED_EPOLL_DATA) + 1;
307 af_unix_client_fd = accept4 (ssm->af_unix_listen_fd,
308 (struct sockaddr *) NULL, NULL, NULL);
310 af_unix_client_fd = accept (ssm->af_unix_listen_fd,
311 (struct sockaddr *) NULL, NULL);
313 if (af_unix_client_fd < 0)
316 perror ("ERROR in af_unix_accept()");
317 fprintf (stderr, "SERVER: ERROR: accept failed "
318 "(errno = %d)!\n", errno_val);
322 printf ("SERVER: Got an AF_UNIX connection -- fd = %d (0x%08x)!\n",
323 af_unix_client_fd, af_unix_client_fd);
325 memset (buffer, 0, sizeof (buffer));
327 rv = read (af_unix_client_fd, buffer, nbytes);
331 perror ("ERROR in af_unix_echo(): read() failed");
332 fprintf (stderr, "SERVER: ERROR: read(af_unix_client_fd %d (0x%x), "
333 "\"%s\", nbytes %lu) failed (errno = %d)!\n",
334 af_unix_client_fd, af_unix_client_fd, buffer, nbytes,
339 printf ("SERVER (AF_UNIX): RX (%d bytes) - '%s'\n", rv, buffer);
341 if (!strncmp (SOCK_TEST_MIXED_EPOLL_DATA, (const char *) buffer, nbytes))
343 rv = write (af_unix_client_fd, buffer, nbytes);
347 perror ("ERROR in af_unix_echo(): write() failed");
349 "SERVER: ERROR: write(af_unix_client_fd %d (0x%x), "
350 "\"%s\", nbytes %ld) failed (errno = %d)!\n",
351 af_unix_client_fd, af_unix_client_fd, buffer, nbytes,
355 printf ("SERVER (AF_UNIX): TX (%d bytes) - '%s'\n", rv, buffer);
356 ssm->af_unix_xacts++;
359 close (af_unix_client_fd);
367 sock_server_main_t *ssm = &sock_server_main;
369 sock_server_conn_t *conn;
371 if (ssm->conn_pool_size < (ssm->num_conn + SOCK_SERVER_MAX_TEST_CONN + 1))
372 conn_pool_expand (SOCK_SERVER_MAX_TEST_CONN + 1);
374 conn = conn_pool_alloc ();
377 fprintf (stderr, "\nSERVER: ERROR: No free connections!\n");
382 client_fd = vppcom_session_accept (ssm->listen_fd, &conn->endpt, 0);
386 client_fd = accept4 (ssm->listen_fd, (struct sockaddr *) NULL, NULL, NULL);
388 client_fd = accept (ssm->listen_fd, (struct sockaddr *) NULL, NULL);
394 perror ("ERROR in new_client()");
395 fprintf (stderr, "SERVER: ERROR: accept failed "
396 "(errno = %d)!\n", errno_val);
400 printf ("SERVER: Got a connection -- fd = %d (0x%08x)!\n",
401 client_fd, client_fd);
403 conn->fd = client_fd;
405 #if ! SOCK_SERVER_USE_EPOLL
406 conn_fdset_set (conn, &ssm->rd_fdset);
410 struct epoll_event ev;
414 ev.data.u64 = conn - ssm->conn_pool;
416 rv = vppcom_epoll_ctl (ssm->epfd, EPOLL_CTL_ADD, client_fd, &ev);
420 rv = epoll_ctl (ssm->epfd, EPOLL_CTL_ADD, client_fd, &ev);
426 perror ("ERROR in new_client()");
427 fprintf (stderr, "SERVER: ERROR: epoll_ctl failed (errno = %d)!\n",
437 main (int argc, char **argv)
439 sock_server_main_t *ssm = &sock_server_main;
440 int client_fd, rv, main_rv = 0;
441 int tx_bytes, rx_bytes, nbytes;
442 sock_server_conn_t *conn;
443 sock_test_cfg_t *rx_cfg;
445 uint64_t xtra_bytes = 0;
446 struct sockaddr_in servaddr;
449 uint16_t port = SOCK_TEST_SERVER_PORT;
450 #if ! SOCK_SERVER_USE_EPOLL
451 fd_set _rfdset, *rfdset = &_rfdset;
454 vppcom_endpt_t endpt;
456 #if ! SOCK_SERVER_USE_EPOLL
457 fd_set _wfdset, *wfdset = &_wfdset;
461 if ((argc == 2) && (sscanf (argv[1], "%d", &v) == 1))
464 conn_pool_expand (SOCK_SERVER_MAX_TEST_CONN + 1);
467 rv = vppcom_app_create ("vcl_test_server");
476 vppcom_session_create (VPPCOM_PROTO_TCP, 0 /* is_nonblocking */ );
479 ssm->listen_fd = socket (AF_INET, SOCK_STREAM, 0);
480 #if SOCK_SERVER_USE_EPOLL && !defined (VCL_TEST)
481 unlink ((const char *) SOCK_TEST_AF_UNIX_FILENAME);
482 ssm->af_unix_listen_fd = socket (AF_UNIX, SOCK_STREAM, 0);
483 if (ssm->af_unix_listen_fd < 0)
486 perror ("ERROR in main(): socket(AF_UNIX) failed");
488 "SERVER: ERROR: socket(AF_UNIX, SOCK_STREAM, 0) failed "
489 "(errno = %d)!\n", errno_val);
490 return ssm->af_unix_listen_fd;
493 memset (&ssm->serveraddr, 0, sizeof (ssm->serveraddr));
494 ssm->serveraddr.sun_family = AF_UNIX;
495 strcpy (ssm->serveraddr.sun_path, SOCK_TEST_AF_UNIX_FILENAME);
497 rv = bind (ssm->af_unix_listen_fd, (struct sockaddr *) &ssm->serveraddr,
498 SUN_LEN (&ssm->serveraddr));
502 perror ("ERROR in main(): bind(SOCK_TEST_AF_UNIX_FILENAME) failed");
503 fprintf (stderr, "SERVER: ERROR: bind() fd %d, \"%s\": "
504 "failed (errno = %d)!\n", ssm->af_unix_listen_fd,
505 SOCK_TEST_AF_UNIX_FILENAME, errno_val);
506 close (ssm->af_unix_listen_fd);
507 unlink ((const char *) SOCK_TEST_AF_UNIX_FILENAME);
511 rv = listen (ssm->af_unix_listen_fd, 10);
515 perror ("ERROR in main(): listen(AF_UNIX) failed");
516 fprintf (stderr, "SERVER: ERROR: listen() fd %d, \"%s\": "
517 "failed (errno = %d)!\n", ssm->af_unix_listen_fd,
518 SOCK_TEST_AF_UNIX_FILENAME, errno_val);
519 close (ssm->af_unix_listen_fd);
520 unlink ((const char *) SOCK_TEST_AF_UNIX_FILENAME);
523 #endif /* SOCK_SERVER_USE_EPOLL */
525 if (ssm->listen_fd < 0)
528 perror ("ERROR in main()");
529 fprintf (stderr, "SERVER: ERROR: socket() failed "
530 "(errno = %d)!\n", errno_val);
531 return ssm->listen_fd;
534 memset (&servaddr, 0, sizeof (servaddr));
536 servaddr.sin_family = AF_INET;
537 servaddr.sin_addr.s_addr = htonl (INADDR_ANY);
538 servaddr.sin_port = htons (port);
541 endpt.is_ip4 = (servaddr.sin_family == AF_INET);
542 endpt.ip = (uint8_t *) & servaddr.sin_addr;
543 endpt.port = (uint16_t) servaddr.sin_port;
545 rv = vppcom_session_bind (ssm->listen_fd, &endpt);
553 bind (ssm->listen_fd, (struct sockaddr *) &servaddr, sizeof (servaddr));
558 perror ("ERROR in main()");
559 fprintf (stderr, "SERVER: ERROR: bind failed (errno = %d)!\n",
565 rv = vppcom_session_listen (ssm->listen_fd, 10);
572 rv = listen (ssm->listen_fd, 10);
577 perror ("ERROR in main()");
578 fprintf (stderr, "SERVER: ERROR: listen failed "
579 "(errno = %d)!\n", errno_val);
583 #if ! SOCK_SERVER_USE_EPOLL
585 FD_ZERO (&ssm->wr_fdset);
586 FD_ZERO (&ssm->rd_fdset);
588 FD_SET (ssm->listen_fd, &ssm->rd_fdset);
589 ssm->nfds = ssm->listen_fd + 1;
593 ssm->epfd = vppcom_epoll_create ();
597 ssm->epfd = epoll_create (1);
602 perror ("ERROR in main()");
603 fprintf (stderr, "SERVER: ERROR: epoll_create failed (errno = %d)!\n",
608 ssm->listen_ev.events = EPOLLIN;
609 ssm->listen_ev.data.u32 = ~0;
611 rv = vppcom_epoll_ctl (ssm->epfd, EPOLL_CTL_ADD, ssm->listen_fd,
616 ssm->af_unix_listen_ev.events = EPOLLIN;
617 ssm->af_unix_listen_ev.data.u32 = SOCK_TEST_AF_UNIX_ACCEPT_DATA;
618 rv = epoll_ctl (ssm->epfd, EPOLL_CTL_ADD, ssm->af_unix_listen_fd,
619 &ssm->af_unix_listen_ev);
623 perror ("ERROR in main(): mixed epoll_ctl(EPOLL_CTL_ADD)");
624 fprintf (stderr, "SERVER: ERROR: mixed epoll_ctl(epfd %d (0x%x), "
625 "EPOLL_CTL_ADD, af_unix_listen_fd %d (0x%x), EPOLLIN) failed "
626 "(errno = %d)!\n", ssm->epfd, ssm->epfd,
627 ssm->af_unix_listen_fd, ssm->af_unix_listen_fd, errno_val);
628 close (ssm->af_unix_listen_fd);
629 unlink ((const char *) SOCK_TEST_AF_UNIX_FILENAME);
633 rv = epoll_ctl (ssm->epfd, EPOLL_CTL_ADD, ssm->listen_fd, &ssm->listen_ev);
638 perror ("ERROR in main()");
639 fprintf (stderr, "SERVER: ERROR: epoll_ctl failed "
640 "(errno = %d)!\n", errno_val);
645 printf ("\nSERVER: Waiting for a client to connect on port %d...\n", port);
649 #if ! SOCK_SERVER_USE_EPOLL
650 _rfdset = ssm->rd_fdset;
653 rv = vppcom_select (ssm->nfds, (uint64_t *) rfdset, NULL, NULL, 0);
656 struct timeval timeout;
657 timeout = ssm->timeout;
658 _wfdset = ssm->wr_fdset;
659 rv = select (ssm->nfds, rfdset, wfdset, NULL, &timeout);
665 fprintf (stderr, "\nSERVER: ERROR: select() failed -- aborting!\n");
672 if (FD_ISSET (ssm->listen_fd, rfdset))
675 for (i = 0; i < ssm->conn_pool_size; i++)
677 if (!ssm->conn_pool[i].is_alloc)
680 conn = &ssm->conn_pool[i];
684 num_ev = vppcom_epoll_wait (ssm->epfd, ssm->wait_events,
685 SOCK_SERVER_MAX_EPOLL_EVENTS, 60.0);
689 num_ev = epoll_wait (ssm->epfd, ssm->wait_events,
690 SOCK_SERVER_MAX_EPOLL_EVENTS, 60000);
694 perror ("epoll_wait()");
695 fprintf (stderr, "\nSERVER: ERROR: epoll_wait() "
696 "failed -- aborting!\n");
702 fprintf (stderr, "\nSERVER: epoll_wait() timeout!\n");
705 for (i = 0; i < num_ev; i++)
707 if (ssm->wait_events[i].data.u32 == ~0)
712 #if !defined (VCL_TEST)
713 else if (ssm->wait_events[i].data.u32 ==
714 SOCK_TEST_AF_UNIX_ACCEPT_DATA)
720 conn = &ssm->conn_pool[ssm->wait_events[i].data.u32];
722 client_fd = conn->fd;
724 #if ! SOCK_SERVER_USE_EPOLL
725 if (FD_ISSET (client_fd, rfdset))
727 if (EPOLLIN & ssm->wait_events[i].events)
730 rx_bytes = sock_test_read (client_fd, conn->buf,
731 conn->buf_size, &conn->stats);
734 rx_cfg = (sock_test_cfg_t *) conn->buf;
735 if (rx_cfg->magic == SOCK_TEST_CFG_CTRL_MAGIC)
739 printf ("SERVER (fd %d): Received a cfg message!\n",
741 sock_test_cfg_dump (rx_cfg, 0 /* is_client */ );
744 if (rx_bytes != sizeof (*rx_cfg))
746 printf ("SERVER (fd %d): Invalid cfg message "
747 "size (%d)!\n Should be %lu bytes.\n",
748 client_fd, rx_bytes, sizeof (*rx_cfg));
749 conn->cfg.rxbuf_size = 0;
750 conn->cfg.num_writes = 0;
751 if (conn->cfg.verbose)
753 printf ("SERVER (fd %d): Replying to "
754 "cfg message!\n", client_fd);
755 sock_test_cfg_dump (rx_cfg, 0 /* is_client */ );
757 sock_test_write (client_fd, (uint8_t *) & conn->cfg,
758 sizeof (conn->cfg), NULL,
763 switch (rx_cfg->test)
765 case SOCK_TEST_TYPE_NONE:
766 case SOCK_TEST_TYPE_ECHO:
767 sync_config_and_reply (conn, rx_cfg);
770 case SOCK_TEST_TYPE_BI:
771 case SOCK_TEST_TYPE_UNI:
772 stream_test_server_start_stop (conn, rx_cfg);
775 case SOCK_TEST_TYPE_EXIT:
776 printf ("SERVER: Have a great day, "
777 "connection %d!\n", client_fd);
779 vppcom_session_close (client_fd);
783 conn_pool_free (conn);
784 printf ("SERVER: Closed client fd %d\n", client_fd);
785 #if ! SOCK_SERVER_USE_EPOLL
786 if (ssm->nfds == (ssm->listen_fd + 1))
792 printf ("SERVER: All client connections "
793 "closed.\n\nSERVER: "
794 "May the force be with you!\n\n");
801 "SERVER: ERROR: Unknown test type!\n");
802 sock_test_cfg_dump (rx_cfg, 0 /* is_client */ );
808 else if ((conn->cfg.test == SOCK_TEST_TYPE_UNI) ||
809 (conn->cfg.test == SOCK_TEST_TYPE_BI))
811 stream_test_server (conn, rx_bytes);
815 else if (isascii (conn->buf[0]))
817 // If it looks vaguely like a string, make sure it's terminated
818 ((char *) conn->buf)[rx_bytes <
819 conn->buf_size ? rx_bytes :
820 conn->buf_size - 1] = 0;
821 printf ("SERVER (fd %d): RX (%d bytes) - '%s'\n",
822 conn->fd, rx_bytes, conn->buf);
827 if (errno == ECONNRESET)
829 printf ("\nSERVER: Connection reset by remote peer.\n"
830 " Y'all have a great day now!\n\n");
837 if (isascii (conn->buf[0]))
839 /* If it looks vaguely like a string,
840 * make sure it's terminated
842 ((char *) conn->buf)[rx_bytes <
843 conn->buf_size ? rx_bytes :
844 conn->buf_size - 1] = 0;
846 fprintf (stderr, "SERVER: ERROR: "
847 "FIFO not drained in previous test!\n"
848 " extra chunks %u (0x%x)\n"
849 " extra bytes %lu (0x%lx)\n",
850 xtra, xtra, xtra_bytes, xtra_bytes);
855 if (conn->cfg.verbose)
856 printf ("SERVER (fd %d): Echoing back\n", client_fd);
858 nbytes = strlen ((const char *) conn->buf) + 1;
860 tx_bytes = sock_test_write (client_fd, conn->buf,
861 nbytes, &conn->stats,
864 printf ("SERVER (fd %d): TX (%d bytes) - '%s'\n",
865 conn->fd, tx_bytes, conn->buf);
868 else // Extraneous read data from non-echo tests???
871 xtra_bytes += rx_bytes;
879 vppcom_session_close (ssm->listen_fd);
880 vppcom_app_destroy ();
882 close (ssm->listen_fd);
884 #if SOCK_SERVER_USE_EPOLL && !defined (VCL_TEST)
885 close (ssm->af_unix_listen_fd);
886 unlink ((const char *) SOCK_TEST_AF_UNIX_FILENAME);
887 #endif /* SOCK_SERVER_USE_EPOLL */
891 free (ssm->conn_pool);
897 * fd.io coding-style-patch-verification: ON
900 * eval: (c-set-style "gnu")