Add ff_ipc_exit() to clean temp files in /var/ while run F-Stack tools arp/ifconfig/route/ipfw.
parent
c27efec2cd
commit
e10b9b93a8
|
@ -230,6 +230,10 @@ main(int argc, char *argv[])
|
||||||
if (ifnameindex != NULL)
|
if (ifnameindex != NULL)
|
||||||
if_freenameindex(ifnameindex);
|
if_freenameindex(ifnameindex);
|
||||||
|
|
||||||
|
#ifdef FSTACK
|
||||||
|
ff_ipc_exit();
|
||||||
|
#endif
|
||||||
|
|
||||||
return (rtn);
|
return (rtn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -735,6 +739,9 @@ usage(void)
|
||||||
" arp -p <f-stack proc_id> -s hostname ether_addr [temp] [reject | blackhole] [pub [only]]",
|
" arp -p <f-stack proc_id> -s hostname ether_addr [temp] [reject | blackhole] [pub [only]]",
|
||||||
" arp -p <f-stack proc_id> -S hostname ether_addr [temp] [reject | blackhole] [pub [only]]",
|
" arp -p <f-stack proc_id> -S hostname ether_addr [temp] [reject | blackhole] [pub [only]]",
|
||||||
" arp -p <f-stack proc_id> -f filename");
|
" arp -p <f-stack proc_id> -f filename");
|
||||||
|
#endif
|
||||||
|
#ifdef FSTACK
|
||||||
|
ff_ipc_exit();
|
||||||
#endif
|
#endif
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ ifneq (${MK_INET6_SUPPORT},"no")
|
||||||
CFLAGS+= -DINET6
|
CFLAGS+= -DINET6
|
||||||
endif
|
endif
|
||||||
|
|
||||||
DPDK_CFLAGS= -g -Wall -Werror -include ${FF_DPDK}/include/rte_config.h
|
DPDK_CFLAGS= -g -Wall -Werror -Wno-deprecated-declarations -include ${FF_DPDK}/include/rte_config.h
|
||||||
DPDK_CFLAGS+= -march=native -DRTE_MACHINE_CPUFLAG_SSE -DRTE_MACHINE_CPUFLAG_SSE2 -DRTE_MACHINE_CPUFLAG_SSE3
|
DPDK_CFLAGS+= -march=native -DRTE_MACHINE_CPUFLAG_SSE -DRTE_MACHINE_CPUFLAG_SSE2 -DRTE_MACHINE_CPUFLAG_SSE3
|
||||||
DPDK_CFLAGS+= -DRTE_MACHINE_CPUFLAG_SSSE3 -DRTE_MACHINE_CPUFLAG_SSE4_1 -DRTE_MACHINE_CPUFLAG_SSE4_2
|
DPDK_CFLAGS+= -DRTE_MACHINE_CPUFLAG_SSSE3 -DRTE_MACHINE_CPUFLAG_SSE4_1 -DRTE_MACHINE_CPUFLAG_SSE4_2
|
||||||
DPDK_CFLAGS+= -DRTE_COMPILE_TIME_CPUFLAGS=RTE_CPUFLAG_SSE,RTE_CPUFLAG_SSE2,RTE_CPUFLAG_SSE3,RTE_CPUFLAG_SSSE3,RTE_CPUFLAG_SSE4_1,RTE_CPUFLAG_SSE4_2
|
DPDK_CFLAGS+= -DRTE_COMPILE_TIME_CPUFLAGS=RTE_CPUFLAG_SSE,RTE_CPUFLAG_SSE2,RTE_CPUFLAG_SSE3,RTE_CPUFLAG_SSSE3,RTE_CPUFLAG_SSE4_1,RTE_CPUFLAG_SSE4_2
|
||||||
|
|
|
@ -80,6 +80,13 @@ ff_ipc_init(void)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ff_ipc_exit(void)
|
||||||
|
{
|
||||||
|
rte_eal_cleanup();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
struct ff_msg *
|
struct ff_msg *
|
||||||
ff_ipc_msg_alloc(void)
|
ff_ipc_msg_alloc(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
void ff_set_proc_id(int pid);
|
void ff_set_proc_id(int pid);
|
||||||
|
|
||||||
int ff_ipc_init(void);
|
int ff_ipc_init(void);
|
||||||
|
void ff_ipc_exit(void);
|
||||||
struct ff_msg *ff_ipc_msg_alloc(void);
|
struct ff_msg *ff_ipc_msg_alloc(void);
|
||||||
int ff_ipc_msg_free(struct ff_msg *msg);
|
int ff_ipc_msg_free(struct ff_msg *msg);
|
||||||
|
|
||||||
|
|
|
@ -212,6 +212,10 @@ usage(void)
|
||||||
" ifconfig -p <f-stack proc_id> %s[-d] [-m] [-u] [-v]\n",
|
" ifconfig -p <f-stack proc_id> %s[-d] [-m] [-u] [-v]\n",
|
||||||
#endif
|
#endif
|
||||||
options, options, options);
|
options, options, options);
|
||||||
|
|
||||||
|
#ifdef FSTACK
|
||||||
|
ff_ipc_exit();
|
||||||
|
#endif
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -555,6 +559,9 @@ main(int argc, char *argv[])
|
||||||
errx(1, "%s: cloning name too long",
|
errx(1, "%s: cloning name too long",
|
||||||
ifname);
|
ifname);
|
||||||
ifconfig(argc, argv, 1, NULL);
|
ifconfig(argc, argv, 1, NULL);
|
||||||
|
#ifdef FSTACK
|
||||||
|
ff_ipc_exit();
|
||||||
|
#endif
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
#ifdef JAIL
|
#ifdef JAIL
|
||||||
|
@ -569,6 +576,9 @@ main(int argc, char *argv[])
|
||||||
errx(1, "%s: interface name too long",
|
errx(1, "%s: interface name too long",
|
||||||
ifname);
|
ifname);
|
||||||
ifconfig(argc, argv, 0, NULL);
|
ifconfig(argc, argv, 0, NULL);
|
||||||
|
#ifdef FSTACK
|
||||||
|
ff_ipc_exit();
|
||||||
|
#endif
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -667,6 +677,10 @@ main(int argc, char *argv[])
|
||||||
freeifaddrs(ifap);
|
freeifaddrs(ifap);
|
||||||
|
|
||||||
freeformat();
|
freeformat();
|
||||||
|
|
||||||
|
#ifdef FSTACK
|
||||||
|
ff_ipc_exit();
|
||||||
|
#endif
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1103,6 +1117,9 @@ setifflags(const char *vname, int value, int s, const struct afswtch *afp)
|
||||||
|
|
||||||
if (ioctl(s, SIOCGIFFLAGS, (caddr_t)&my_ifr) < 0) {
|
if (ioctl(s, SIOCGIFFLAGS, (caddr_t)&my_ifr) < 0) {
|
||||||
Perror("ioctl (SIOCGIFFLAGS)");
|
Perror("ioctl (SIOCGIFFLAGS)");
|
||||||
|
#ifdef FSTACK
|
||||||
|
ff_ipc_exit();
|
||||||
|
#endif
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
flags = (my_ifr.ifr_flags & 0xffff) | (my_ifr.ifr_flagshigh << 16);
|
flags = (my_ifr.ifr_flags & 0xffff) | (my_ifr.ifr_flagshigh << 16);
|
||||||
|
@ -1125,6 +1142,9 @@ setifcap(const char *vname, int value, int s, const struct afswtch *afp)
|
||||||
|
|
||||||
if (ioctl(s, SIOCGIFCAP, (caddr_t)&ifr) < 0) {
|
if (ioctl(s, SIOCGIFCAP, (caddr_t)&ifr) < 0) {
|
||||||
Perror("ioctl (SIOCGIFCAP)");
|
Perror("ioctl (SIOCGIFCAP)");
|
||||||
|
#ifdef FSTACK
|
||||||
|
ff_ipc_exit();
|
||||||
|
#endif
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
flags = ifr.ifr_curcap;
|
flags = ifr.ifr_curcap;
|
||||||
|
|
|
@ -281,10 +281,16 @@ main(int argc, char **argv)
|
||||||
|
|
||||||
case K_FLUSH:
|
case K_FLUSH:
|
||||||
flushroutes(argc, argv);
|
flushroutes(argc, argv);
|
||||||
|
#ifdef FSTACK
|
||||||
|
ff_ipc_exit();
|
||||||
|
#endif
|
||||||
exit(0);
|
exit(0);
|
||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
}
|
}
|
||||||
usage(*argv);
|
usage(*argv);
|
||||||
|
#ifdef FSTACK
|
||||||
|
ff_ipc_exit();
|
||||||
|
#endif
|
||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1072,8 +1078,12 @@ newroute(int argc, char **argv)
|
||||||
fl->fl_errno = errno;
|
fl->fl_errno = errno;
|
||||||
error += fl->fl_error;
|
error += fl->fl_error;
|
||||||
}
|
}
|
||||||
if (*cmd == 'g' || *cmd == 's')
|
if (*cmd == 'g' || *cmd == 's'){
|
||||||
|
#ifdef FSTACK
|
||||||
|
ff_ipc_exit();
|
||||||
|
#endif
|
||||||
exit(error);
|
exit(error);
|
||||||
|
}
|
||||||
|
|
||||||
error = 0;
|
error = 0;
|
||||||
if (!qflag) {
|
if (!qflag) {
|
||||||
|
@ -1147,6 +1157,9 @@ newroute(int argc, char **argv)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#ifdef FSTACK
|
||||||
|
ff_ipc_exit();
|
||||||
|
#endif
|
||||||
exit(error);
|
exit(error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1553,6 +1566,9 @@ monitor(int argc, char *argv[])
|
||||||
verbose = 1;
|
verbose = 1;
|
||||||
if (debugonly) {
|
if (debugonly) {
|
||||||
interfaces();
|
interfaces();
|
||||||
|
#ifdef FSTACK
|
||||||
|
ff_ipc_exit();
|
||||||
|
#endif
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
for (;;) {
|
for (;;) {
|
||||||
|
|
Loading…
Reference in New Issue