mirror of https://github.com/F-Stack/f-stack.git
Misc: add "extern C" in public header files.
This commit is contained in:
parent
23742d21d9
commit
b844e8f80a
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue