* \param path the path of the eBPF file to load
* \param section the section in the eBPF file to load
* \param val a pointer to an integer that will be the file desc
- * \return -1 in case of error and 0 in case of success
+ * \return -1 in case of error, 0 in case of success, 1 if pinned maps is loaded
*/
int EBPFLoadFile(const char *iface, const char *path, const char * section,
int *val, struct ebpf_timeout_config *config)
if (livedev == NULL)
return -1;
- if (config->flags & EBPF_XDP_CODE) {
+ if (config->flags & EBPF_XDP_CODE && config->flags & EBPF_PINNED_MAPS) {
/* We try to get our flow table maps and if we have them we can simply return */
if (EBPFLoadPinnedMaps(livedev, config) == 0) {
- return 0;
+ return 1;
}
}