git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/af_xdp: make UMEM configure more readable
[dpdk.git]
/
drivers
/
net
/
af_xdp
/
rte_eth_af_xdp.c
diff --git
a/drivers/net/af_xdp/rte_eth_af_xdp.c
b/drivers/net/af_xdp/rte_eth_af_xdp.c
index
1b6192f
..
802f912
100644
(file)
--- a/
drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/
drivers/net/af_xdp/rte_eth_af_xdp.c
@@
-1078,6
+1078,12
@@
xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,
__atomic_store_n(&umem->refcnt, 1, __ATOMIC_RELEASE);
}
__atomic_store_n(&umem->refcnt, 1, __ATOMIC_RELEASE);
}
+ return umem;
+
+err:
+ xdp_umem_destroy(umem);
+ return NULL;
+}
#else
static struct
xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,
#else
static struct
xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,
@@
-1138,13
+1144,13
@@
xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,
}
umem->mz = mz;
}
umem->mz = mz;
-#endif
return umem;
err:
xdp_umem_destroy(umem);
return NULL;
}
return umem;
err:
xdp_umem_destroy(umem);
return NULL;
}
+#endif
static int
load_custom_xdp_prog(const char *prog_path, int if_index, struct bpf_map **map)
static int
load_custom_xdp_prog(const char *prog_path, int if_index, struct bpf_map **map)