[dpdk-dev] [PATCH v2] examples/client_server_mp: add sigint handler to server
Thomas Monjalon
thomas at monjalon.net
Thu Sep 27 13:36:06 CEST 2018
27/09/2018 13:26, Raslan Darawsheh:
> v2:
> - fix includes order
I'm afraid you will need a v3 to fix spacing :)
> --- a/examples/multi_process/client_server_mp/mp_server/main.c
> +++ b/examples/multi_process/client_server_mp/mp_server/main.c
> @@ -37,6 +37,7 @@
> #include "common.h"
> #include "args.h"
> #include "init.h"
> +#include<signal.h>
A space is missing here.
> +static void signal_handler(int signal)
> +{
> + uint16_t port_id;
> +
> + if (signal == SIGINT)
> + RTE_ETH_FOREACH_DEV(port_id) {
> + rte_eth_dev_stop(port_id);
> + rte_eth_dev_close(port_id);
> + }
> + exit(0);
> +}
> int
> main(int argc, char *argv[])
A blank line is missing between the functions.
More information about the dev
mailing list