[dpdk-dev] [PATCH v2] examples/client_server_mp: add sigint handler to server
Bruce Richardson
bruce.richardson at intel.com
Thu Sep 27 14:30:53 CEST 2018
On Thu, Sep 27, 2018 at 01:36:06PM +0200, Thomas Monjalon wrote:
> 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.
>
Also, the norm in DPDK is to list all standard headers first, then the DPDK
headers and finally the local headers. "signal.h" therefore should be
further up in the file, with the first group.
> > +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