2 * Copyright (c) 2017-2021 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>
26 #include <hs_apps/vcl/vcl_test.h>
27 #include <sys/epoll.h>
28 #include <vppinfra/mem.h>
32 * XXX: Unfortunately libepoll-shim requires some hacks to work, one of these
33 * defines 'close' as a macro. This collides with vcl test callback 'close'.
34 * Undef the 'close' macro on FreeBSD if it exists.
40 #endif /* __FreeBSD__ */
49 } vcl_test_server_cfg_t;
53 vcl_test_session_t *conn_pool;
58 vcl_test_session_t listener;
59 pthread_t thread_handle;
60 } vcl_test_server_worker_t;
64 vcl_test_server_worker_t *workers;
65 vcl_test_session_t *ctrl;
66 vcl_test_server_cfg_t server_cfg;
68 struct sockaddr_storage servaddr;
69 volatile int worker_fails;
70 volatile int active_workers;
73 } vcl_test_server_main_t;
75 vcl_test_main_t vcl_test_main;
77 static vcl_test_server_main_t vcl_server_main;
80 conn_pool_expand (vcl_test_server_worker_t * wrk, size_t expand_size)
82 vcl_test_session_t *conn_pool;
83 size_t new_size = wrk->conn_pool_size + expand_size;
86 conn_pool = realloc (wrk->conn_pool, new_size * sizeof (*wrk->conn_pool));
89 for (i = wrk->conn_pool_size; i < new_size; i++)
91 vcl_test_session_t *conn = &conn_pool[i];
92 memset (conn, 0, sizeof (*conn));
95 wrk->conn_pool = conn_pool;
96 wrk->conn_pool_size = new_size;
100 vterr ("conn_pool_expand()", -errno);
104 static inline vcl_test_session_t *
105 conn_pool_alloc (vcl_test_server_worker_t *wrk)
107 vcl_test_session_t *conn;
111 for (i = 0; i < wrk->conn_pool_size; i++)
113 if (!wrk->conn_pool[i].is_alloc)
115 conn = &wrk->conn_pool[i];
116 memset (conn, 0, sizeof (*conn));
117 conn->endpt.ip = wrk->conn_pool[i].ip;
119 conn->session_index = i;
120 hs_test_cfg_init (&conn->cfg);
121 return (&wrk->conn_pool[i]);
127 conn_pool_expand (wrk, 2 * wrk->conn_pool_size);
131 vtwrn ("Failed to allocate connection even after expand");
136 conn_pool_free (vcl_test_session_t *ts)
140 vcl_test_session_buf_free (ts);
144 sync_config_and_reply (vcl_test_session_t *conn, hs_test_cfg_t *rx_cfg)
147 vcl_test_buf_alloc (&conn->cfg, 1 /* is_rxbuf */, (uint8_t **) &conn->rxbuf,
149 conn->cfg.txbuf_size = conn->cfg.rxbuf_size;
151 if (conn->cfg.verbose)
153 vtinf ("(fd %d): Replying to cfg message!\n", conn->fd);
154 hs_test_cfg_dump (&conn->cfg, 0 /* is_client */);
156 (void) vcl_test_write (conn, &conn->cfg, sizeof (conn->cfg));
160 vts_session_close (vcl_test_session_t *conn)
162 vcl_test_server_main_t *vsm = &vcl_server_main;
163 vcl_test_main_t *vt = &vcl_test_main;
168 if (vt->protos[vsm->server_cfg.proto]->close)
169 vt->protos[vsm->server_cfg.proto]->close (conn);
171 vppcom_session_close (conn->fd);
176 vts_session_cleanup (vcl_test_session_t *ts)
178 vts_session_close (ts);
183 vts_wrk_cleanup_all (vcl_test_server_worker_t *wrk)
185 vcl_test_session_t *conn;
188 for (i = 0; i < wrk->conn_pool_size; i++)
190 conn = &wrk->conn_pool[i];
191 vts_session_cleanup (conn);
198 vts_test_cmd (vcl_test_server_worker_t *wrk, vcl_test_session_t *conn,
199 hs_test_cfg_t *rx_cfg)
201 u8 is_bi = rx_cfg->test == HS_TEST_TYPE_BI;
202 vcl_test_session_t *tc;
206 if (rx_cfg->cmd == HS_TEST_CMD_STOP)
208 struct timespec stop;
209 clock_gettime (CLOCK_REALTIME, &stop);
211 /* Test session are not closed, e.g., connection-less or errors */
214 vtinf ("%u sessions are still open", wrk->nfds - 1);
215 stop.tv_sec -= VCL_TEST_DELAY_DISCONNECT;
216 conn->stats.stop = stop;
219 /* Accumulate stats over all of the worker's sessions */
220 for (i = 0; i < wrk->conn_pool_size; i++)
222 tc = &wrk->conn_pool[i];
226 vcl_test_stats_accumulate (&conn->stats, &tc->stats);
229 vts_session_cleanup (tc);
232 /* Only relevant if all connections previously closed */
233 if (vcl_comp_tspec (&conn->stats.stop, &tc->stats.stop) < 0)
234 conn->stats.stop = tc->stats.stop;
237 if (conn->cfg.verbose)
239 snprintf (buf, sizeof (buf), "SERVER (fd %d) RESULTS", conn->fd);
240 vcl_test_stats_dump (buf, &conn->stats, 1 /* show_rx */,
241 is_bi /* show tx */, conn->cfg.verbose);
244 vcl_test_stats_dump ("SERVER RESULTS", &conn->stats, 1 /* show_rx */ ,
245 is_bi /* show_tx */ , conn->cfg.verbose);
246 hs_test_cfg_dump (&conn->cfg, 0 /* is_client */);
247 if (conn->cfg.verbose)
249 vtinf (" vcl server main\n" HS_TEST_SEPARATOR_STRING
251 " buf size: %u (0x%08x)\n" HS_TEST_SEPARATOR_STRING,
252 conn->rxbuf, conn->rxbuf_size, conn->rxbuf_size);
255 sync_config_and_reply (conn, rx_cfg);
256 memset (&conn->stats, 0, sizeof (conn->stats));
258 else if (rx_cfg->cmd == HS_TEST_CMD_SYNC)
260 rx_cfg->ctrl_handle = conn->fd;
261 vtinf ("Set control fd %d for test!", conn->fd);
262 sync_config_and_reply (conn, rx_cfg);
264 else if (rx_cfg->cmd == HS_TEST_CMD_START)
266 vtinf ("Starting %s-directional Stream Test (fd %d)!",
267 is_bi ? "Bi" : "Uni", conn->fd);
268 rx_cfg->ctrl_handle = conn->fd;
269 sync_config_and_reply (conn, rx_cfg);
271 /* read the 1st chunk, record start time */
272 memset (&conn->stats, 0, sizeof (conn->stats));
273 clock_gettime (CLOCK_REALTIME, &conn->stats.start);
278 vts_server_process_rx (vcl_test_session_t *conn, int rx_bytes)
280 vcl_test_server_main_t *vsm = &vcl_server_main;
282 if (conn->cfg.test == HS_TEST_TYPE_BI)
286 (void) vcl_test_write (conn, conn->ds[0].data, conn->ds[0].len);
288 (void) vcl_test_write (conn, conn->ds[1].data, conn->ds[1].len);
291 (void) vcl_test_write (conn, conn->rxbuf, rx_bytes);
295 vppcom_session_free_segments (conn->fd, rx_bytes);
297 if (conn->stats.rx_bytes >= conn->cfg.total_bytes)
298 clock_gettime (CLOCK_REALTIME, &conn->stats.stop);
302 vts_server_echo (vcl_test_session_t *conn, int rx_bytes)
304 int tx_bytes, nbytes, pos;
306 /* If it looks vaguely like a string, make sure it's terminated */
307 pos = rx_bytes < conn->rxbuf_size ? rx_bytes : conn->rxbuf_size - 1;
308 ((char *) conn->rxbuf)[pos] = 0;
309 vtinf ("(fd %d): RX (%d bytes) - '%s'", conn->fd, rx_bytes, conn->rxbuf);
311 if (conn->cfg.verbose)
312 vtinf ("(fd %d): Echoing back", conn->fd);
314 nbytes = strlen ((const char *) conn->rxbuf) + 1;
315 tx_bytes = conn->write (conn, conn->rxbuf, nbytes);
317 vtinf ("(fd %d): TX (%d bytes) - '%s'", conn->fd, tx_bytes, conn->rxbuf);
320 static vcl_test_session_t *
321 vts_accept_ctrl (vcl_test_server_worker_t *wrk, int listen_fd)
323 vcl_test_server_main_t *vsm = &vcl_server_main;
324 const vcl_test_proto_vft_t *tp;
325 vcl_test_session_t *conn;
326 struct epoll_event ev;
329 conn = conn_pool_alloc (wrk);
332 vtwrn ("No free connections!");
337 conn->cfg = vsm->ctrl->cfg;
338 vcl_test_session_buf_alloc (conn);
339 clock_gettime (CLOCK_REALTIME, &conn->old_stats.stop);
341 tp = vcl_test_main.protos[VPPCOM_PROTO_TCP];
342 if (tp->accept (listen_fd, conn))
345 vtinf ("CTRL accepted fd = %d (0x%08x) on listener fd = %d (0x%08x)",
346 conn->fd, conn->fd, listen_fd, listen_fd);
348 ev.events = EPOLLET | EPOLLIN;
349 ev.data.u64 = conn - wrk->conn_pool;
350 rv = vppcom_epoll_ctl (wrk->epfd, EPOLL_CTL_ADD, conn->fd, &ev);
353 vterr ("vppcom_epoll_ctl()", rv);
362 static vcl_test_session_t *
363 vts_accept_client (vcl_test_server_worker_t *wrk, int listen_fd)
365 vcl_test_server_main_t *vsm = &vcl_server_main;
366 const vcl_test_proto_vft_t *tp;
367 vcl_test_session_t *conn;
368 struct epoll_event ev;
371 conn = conn_pool_alloc (wrk);
374 vtwrn ("No free connections!");
379 conn->cfg = vsm->ctrl->cfg;
380 vcl_test_session_buf_alloc (conn);
381 clock_gettime (CLOCK_REALTIME, &conn->old_stats.stop);
383 tp = vcl_test_main.protos[vsm->server_cfg.proto];
384 if (tp->accept (listen_fd, conn))
387 if (conn->cfg.num_test_sessions < VCL_TEST_CFG_MAX_SELECT_SESS)
388 vtinf ("Got a connection -- fd = %d (0x%08x) on listener fd = %d (0x%08x)",
389 conn->fd, conn->fd, listen_fd, listen_fd);
391 ev.events = EPOLLET | EPOLLIN;
392 ev.data.u64 = conn - wrk->conn_pool;
393 rv = vppcom_epoll_ctl (wrk->epfd, EPOLL_CTL_ADD, conn->fd, &ev);
396 vterr ("vppcom_epoll_ctl()", rv);
405 print_usage_and_exit (void)
407 fprintf (stderr, "vcl_test_server [OPTIONS] <port>\n"
409 " -h Print this message and exit.\n"
411 " -w <num> Number of workers\n"
412 " -p <PROTO> Use <PROTO> transport layer\n"
413 " -D Use UDP transport layer\n"
414 " -L Use TLS transport layer\n"
415 " -S Incremental stats\n");
420 vcl_test_init_endpoint_addr (vcl_test_server_main_t * vsm)
422 struct sockaddr_storage *servaddr = &vsm->servaddr;
423 memset (servaddr, 0, sizeof (*servaddr));
425 if (vsm->server_cfg.address_ip6)
427 struct sockaddr_in6 *server_addr = (struct sockaddr_in6 *) servaddr;
428 server_addr->sin6_family = AF_INET6;
429 server_addr->sin6_addr = in6addr_any;
430 server_addr->sin6_port = htons (vsm->server_cfg.port);
434 struct sockaddr_in *server_addr = (struct sockaddr_in *) servaddr;
435 server_addr->sin_family = AF_INET;
436 server_addr->sin_addr.s_addr = htonl (INADDR_ANY);
437 server_addr->sin_port = htons (vsm->server_cfg.port);
440 if (vsm->server_cfg.address_ip6)
442 struct sockaddr_in6 *server_addr = (struct sockaddr_in6 *) servaddr;
443 vsm->server_cfg.endpt.is_ip4 = 0;
444 vsm->server_cfg.endpt.ip = (uint8_t *) &server_addr->sin6_addr;
445 vsm->server_cfg.endpt.port = (uint16_t) server_addr->sin6_port;
449 struct sockaddr_in *server_addr = (struct sockaddr_in *) servaddr;
450 vsm->server_cfg.endpt.is_ip4 = 1;
451 vsm->server_cfg.endpt.ip = (uint8_t *) &server_addr->sin_addr;
452 vsm->server_cfg.endpt.port = (uint16_t) server_addr->sin_port;
457 vcl_test_server_process_opts (vcl_test_server_main_t * vsm, int argc,
462 vsm->server_cfg.proto = VPPCOM_PROTO_TCP;
465 while ((c = getopt (argc, argv, "6DLsw:hp:S")) != -1)
469 vsm->server_cfg.address_ip6 = 1;
473 if (vppcom_unformat_proto (&vsm->server_cfg.proto, optarg))
474 vtwrn ("Invalid vppcom protocol %s, defaulting to TCP", optarg);
478 vsm->server_cfg.proto = VPPCOM_PROTO_UDP;
482 vsm->server_cfg.proto = VPPCOM_PROTO_TLS;
488 vsm->server_cfg.workers = v;
490 vtwrn ("Invalid number of workers %d", v);
496 vsm->incremental_stats = 1;
503 vtwrn ("Option `-%c' requires an argument.", optopt);
506 if (isprint (optopt))
507 vtwrn ("Unknown option `-%c'.", optopt);
509 vtwrn ("Unknown option character `\\x%x'.", optopt);
514 print_usage_and_exit ();
517 if (argc > (optind + 1))
519 fprintf (stderr, "Incorrect number of arguments!\n");
520 print_usage_and_exit ();
522 else if (argc > 1 && argc == (optind + 1))
524 if (sscanf (argv[optind], "%d", &v) == 1)
525 vsm->server_cfg.port = (uint16_t) v;
528 fprintf (stderr, "Invalid port (%s)!\n", argv[optind]);
529 print_usage_and_exit ();
533 vcl_test_init_endpoint_addr (vsm);
537 vts_handle_ctrl_cfg (vcl_test_server_worker_t *wrk, hs_test_cfg_t *rx_cfg,
538 vcl_test_session_t *conn, int rx_bytes)
542 vtinf ("(fd %d): Received a cfg msg!", conn->fd);
543 hs_test_cfg_dump (rx_cfg, 0 /* is_client */);
546 if (rx_bytes != sizeof (*rx_cfg))
548 vtinf ("(fd %d): Invalid cfg msg size %d expected %lu!", conn->fd,
549 rx_bytes, sizeof (*rx_cfg));
550 conn->cfg.rxbuf_size = 0;
551 conn->cfg.num_writes = 0;
552 if (conn->cfg.verbose)
554 vtinf ("(fd %d): Replying to cfg msg", conn->fd);
555 hs_test_cfg_dump (rx_cfg, 0 /* is_client */);
557 conn->write (conn, &conn->cfg, sizeof (conn->cfg));
561 switch (rx_cfg->test)
563 case HS_TEST_TYPE_NONE:
564 case HS_TEST_TYPE_ECHO:
565 sync_config_and_reply (conn, rx_cfg);
568 case HS_TEST_TYPE_BI:
569 case HS_TEST_TYPE_UNI:
570 vts_test_cmd (wrk, conn, rx_cfg);
573 case HS_TEST_TYPE_EXIT:
574 vtinf ("Ctrl session fd %d closing!", conn->fd);
575 vts_session_cleanup (conn);
578 vts_wrk_cleanup_all (wrk);
579 vcl_server_main.ctrl = 0;
583 vtwrn ("Unknown test type %d", rx_cfg->test);
584 hs_test_cfg_dump (rx_cfg, 0 /* is_client */);
592 vts_worker_init (vcl_test_server_worker_t * wrk)
594 vcl_test_server_main_t *vsm = &vcl_server_main;
595 vcl_test_main_t *vt = &vcl_test_main;
596 const vcl_test_proto_vft_t *tp;
597 struct epoll_event listen_ev;
600 __wrk_index = wrk->wrk_index;
602 vtinf ("Initializing worker ...");
604 conn_pool_expand (wrk, VCL_TEST_CFG_INIT_TEST_SESS + 1);
606 if (vppcom_worker_register ())
607 vtfail ("vppcom_worker_register()", 1);
609 tp = vt->protos[vsm->server_cfg.proto];
610 if ((rv = tp->listen (&wrk->listener, &vsm->server_cfg.endpt)))
611 vtfail ("proto listen", rv);
613 /* First worker already has epoll fd */
616 wrk->epfd = vppcom_epoll_create ();
618 vtfail ("vppcom_epoll_create()", wrk->epfd);
621 listen_ev.events = EPOLLET | EPOLLIN;
622 listen_ev.data.u32 = VCL_TEST_DATA_LISTENER;
624 vppcom_epoll_ctl (wrk->epfd, EPOLL_CTL_ADD, wrk->listener.fd, &listen_ev);
626 vtfail ("vppcom_epoll_ctl", rv);
628 vsm->active_workers += 1;
629 vtinf ("Waiting for client data connections on port %d ...",
630 ntohs (vsm->server_cfg.endpt.port));
634 vts_conn_read (vcl_test_session_t *conn)
636 vcl_test_server_main_t *vsm = &vcl_server_main;
638 return vcl_test_read_ds (conn);
640 return conn->read (conn, conn->rxbuf, conn->rxbuf_size);
644 vts_inc_stats_check (vcl_test_session_t *ts)
646 /* Avoid checking time too often because of syscall cost */
647 if (ts->stats.rx_bytes - ts->old_stats.rx_bytes < 1 << 20)
650 clock_gettime (CLOCK_REALTIME, &ts->stats.stop);
651 if (vcl_test_time_diff (&ts->old_stats.stop, &ts->stats.stop) > 1)
653 vcl_test_stats_dump_inc (ts, 1 /* is_rx */);
654 ts->old_stats = ts->stats;
659 vts_worker_loop (void *arg)
661 struct epoll_event ep_evts[VCL_TEST_CFG_MAX_EPOLL_EVENTS];
662 vcl_test_server_main_t *vsm = &vcl_server_main;
663 vcl_test_server_worker_t *wrk = arg;
664 vcl_test_session_t *conn;
665 int i, rx_bytes, num_ev;
666 hs_test_cfg_t *rx_cfg;
669 vts_worker_init (wrk);
674 vppcom_epoll_wait (wrk->epfd, ep_evts, VCL_TEST_CFG_MAX_EPOLL_EVENTS,
675 0 /* poll session events */);
678 vterr ("vppcom_epoll_wait()", num_ev);
681 else if (num_ev == 0)
685 for (i = 0; i < num_ev; i++)
687 conn = &wrk->conn_pool[ep_evts[i].data.u32];
689 * Check for close events
691 if (ep_evts[i].events & (EPOLLHUP | EPOLLRDHUP))
693 if (conn == vsm->ctrl)
695 vtinf ("ctrl session went away");
698 vts_session_cleanup (conn);
704 * Check if new session needs to be accepted
707 if (!wrk->wrk_index && ep_evts[i].data.u32 == VCL_TEST_CTRL_LISTENER)
711 vtwrn ("ctrl already exists");
714 vsm->ctrl = vts_accept_ctrl (wrk, vsm->ctrl_listen_fd);
718 /* at this point ctrl session must be valid */
721 if (ep_evts[i].data.u32 == VCL_TEST_DATA_LISTENER)
723 conn = vts_accept_client (wrk, wrk->listener.fd);
724 conn->cfg = vsm->ctrl->cfg;
727 else if (vppcom_session_is_connectable_listener (conn->fd))
729 vts_accept_client (wrk, conn->fd);
734 * Message on control session
737 if (!wrk->wrk_index && conn->fd == vsm->ctrl->fd)
739 rx_bytes = conn->read (conn, conn->rxbuf, conn->rxbuf_size);
740 rx_cfg = (hs_test_cfg_t *) conn->rxbuf;
741 if (rx_cfg->magic == HS_TEST_CFG_CTRL_MAGIC)
743 vts_handle_ctrl_cfg (wrk, rx_cfg, conn, rx_bytes);
746 vtinf ("All client connections closed\n");
750 else if (isascii (conn->rxbuf[0]))
752 vts_server_echo (conn, rx_bytes);
756 vtwrn ("FIFO not drained! extra bytes %d", rx_bytes);
762 * Read perf test data
765 if (EPOLLIN & ep_evts[i].events)
768 rx_bytes = vts_conn_read (conn);
772 if (errno == ECONNRESET)
774 vtinf ("Connection reset by remote peer.\n");
780 vts_server_process_rx (conn, rx_bytes);
781 if (vppcom_session_attr (conn->fd, VPPCOM_ATTR_GET_NREAD, 0, 0) >
784 if (vsm->incremental_stats)
785 vts_inc_stats_check (conn);
790 vtwrn ("Unhandled event");
797 vsm->worker_fails -= 1;
800 vppcom_session_close (wrk->listener.fd);
802 free (wrk->conn_pool);
803 vsm->active_workers -= 1;
808 vts_ctrl_session_init (vcl_test_server_worker_t *wrk)
810 vcl_test_server_main_t *vsm = &vcl_server_main;
811 struct epoll_event listen_ev;
814 vtinf ("Initializing main ctrl session ...");
816 vsm->ctrl_listen_fd =
817 vppcom_session_create (VPPCOM_PROTO_TCP, 0 /* is_nonblocking */);
818 if (vsm->ctrl_listen_fd < 0)
819 vtfail ("vppcom_session_create()", vsm->ctrl_listen_fd);
821 rv = vppcom_session_bind (vsm->ctrl_listen_fd, &vsm->server_cfg.endpt);
823 vtfail ("vppcom_session_bind()", rv);
825 rv = vppcom_session_listen (vsm->ctrl_listen_fd, 10);
827 vtfail ("vppcom_session_listen()", rv);
829 wrk->epfd = vppcom_epoll_create ();
831 vtfail ("vppcom_epoll_create()", wrk->epfd);
833 listen_ev.events = EPOLLET | EPOLLIN;
834 listen_ev.data.u32 = VCL_TEST_CTRL_LISTENER;
835 rv = vppcom_epoll_ctl (wrk->epfd, EPOLL_CTL_ADD, vsm->ctrl_listen_fd,
838 vtfail ("vppcom_epoll_ctl", rv);
840 vtinf ("Waiting for client ctrl connection on port %d ...",
841 vsm->server_cfg.port);
845 main (int argc, char **argv)
847 vcl_test_server_main_t *vsm = &vcl_server_main;
848 vcl_test_main_t *vt = &vcl_test_main;
851 clib_mem_init_thread_safe (0, 64 << 20);
852 vsm->server_cfg.port = VCL_TEST_SERVER_PORT;
853 vsm->server_cfg.workers = 1;
854 vsm->active_workers = 0;
855 vcl_test_server_process_opts (vsm, argc, argv);
857 rv = vppcom_app_create ("vcl_test_server");
859 vtfail ("vppcom_app_create()", rv);
861 /* Protos like tls/dtls/quic need init */
862 if (vt->protos[vsm->server_cfg.proto]->init)
863 vt->protos[vsm->server_cfg.proto]->init (0);
865 vsm->workers = calloc (vsm->server_cfg.workers, sizeof (*vsm->workers));
866 vts_ctrl_session_init (&vsm->workers[0]);
868 /* Update ctrl port to data port */
869 vsm->server_cfg.endpt.port = hs_make_data_port (vsm->server_cfg.endpt.port);
870 vts_worker_init (&vsm->workers[0]);
871 for (i = 1; i < vsm->server_cfg.workers; i++)
873 vsm->workers[i].wrk_index = i;
874 rv = pthread_create (&vsm->workers[i].thread_handle, NULL,
875 vts_worker_loop, (void *) &vsm->workers[i]);
877 vtfail ("pthread_create()", rv);
880 vts_worker_loop (&vsm->workers[0]);
882 while (vsm->active_workers > 0)
885 vppcom_app_destroy ();
888 return vsm->worker_fails;
892 * fd.io coding-style-patch-verification: ON
895 * eval: (c-set-style "gnu")