2 // Copyright (c) 2010-2017 Intel Corporation
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://www.apache.org/licenses/LICENSE-2.0
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
21 #include <sys/types.h>
24 #include <rte_debug.h>
29 /* PROX_PANIC for checks that are possibly hit due to configuration or
30 when feature is not implemented. */
31 /* Restore tty and abort if there is a problem */
32 #define PROX_PANIC(cond, ...) do { \
34 plog_info(__VA_ARGS__); \
36 if (prox_cfg.flags & DSF_DAEMON) { \
37 pid_t ppid = getppid(); \
38 plog_info("sending SIGUSR2 to %d\n", ppid);\
39 kill(ppid, SIGUSR2); \
41 rte_panic("PANIC at %s:%u, callstack:\n", \
42 __FILE__, __LINE__); \