Misc: add "extern C" in public header files.

dev
logwang 2018-01-02 18:22:40 +08:00
parent 8740605f9d
commit 7f4229ea8b
4 changed files with 24 additions and 4 deletions

View File

@ -27,6 +27,10 @@
#ifndef __FSTACK_CONFIG_H
#define __FSTACK_CONFIG_H
#ifdef __cplusplus
extern "C" {
#endif
// dpdk argc, argv, max argc: 4, member of dpdk_config
#define DPDK_CONFIG_NUM 4
#define DPDK_CONFIG_MAXLEN 64
@ -119,4 +123,8 @@ extern struct ff_config ff_global_cfg;
int ff_load_config(int argc, char * const argv[]);
#ifdef __cplusplus
}
#endif
#endif /* ifndef __FSTACK_CONFIG_H */

View File

@ -629,10 +629,6 @@ init_port_start(void)
dev_info.default_txconf.txq_flags |= ETH_TXQ_FLAGS_NOVLANOFFL;
}
if (!(dev_info.tx_offload_capa & DEV_TX_OFFLOAD_VLAN_INSERT)) {
dev_info.default_txconf.txq_flags |= ETH_TXQ_FLAGS_NOVLANOFFL;
}
if (!(dev_info.tx_offload_capa & DEV_TX_OFFLOAD_TCP_TSO) &&
!(dev_info.tx_offload_capa & DEV_TX_OFFLOAD_UDP_TSO)) {
dev_info.default_txconf.txq_flags |= ETH_TXQ_FLAGS_NOMULTSEGS;

View File

@ -1,11 +1,19 @@
#ifndef _FF_EPOLL_H
#define _FF_EPOLL_H
#ifdef __cplusplus
extern "C" {
#endif
#include <sys/epoll.h>
int ff_epoll_create(int size);
int ff_epoll_ctl(int epfd, int op, int fd, struct epoll_event *event);
int ff_epoll_wait(int epfd, struct epoll_event *events, int maxevents, int timeout);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -27,6 +27,10 @@
#ifndef _FSTACK_EVENT_H
#define _FSTACK_EVENT_H
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _KERNEL
#include <stdint.h>
@ -146,6 +150,10 @@ struct knlist {
void *kl_lockarg; /* argument passed to kl_lockf() */
};
#endif
#ifdef __cplusplus
}
#endif
#endif