Skip to content
Snippets Groups Projects
Commit 588e384d authored by Daniel Salzman's avatar Daniel Salzman
Browse files

xdp: remove KNOT_XDP_LOAD_BPF_NEVER mode, which is not used

parent 50672087
No related branches found
No related tags found
No related merge requests found
......@@ -226,14 +226,6 @@ int kxsk_iface_new(const char *if_name, int if_queue, knot_xdp_load_bpf_t load_b
int ret;
switch (load_bpf) {
case KNOT_XDP_LOAD_BPF_NEVER:
(void)0;
uint32_t prog_id = 0;
ret = bpf_get_link_xdp_id(iface->if_index, &prog_id, 0);
if (ret == 0 && prog_id != 0) {
ret = bpf_prog_get_fd_by_id(prog_id);
}
break;
case KNOT_XDP_LOAD_BPF_ALWAYS:
ret = ensure_prog(iface, true);
break;
......
......@@ -44,7 +44,6 @@ struct knot_xdp_msg {
* a compatible BPF program is loaded on the interface.
*/
typedef enum {
KNOT_XDP_LOAD_BPF_NEVER, /*!< Do not load; error out if not loaded already. */
KNOT_XDP_LOAD_BPF_ALWAYS, /*!< Always load a program (overwrite it). */
KNOT_XDP_LOAD_BPF_MAYBE, /*!< Try with present program or load if none. */
/* Implementation caveat: when re-using program in _MAYBE case, we get a message:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment