lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20161025183639.69d2fa50@jkicinski-Precision-T1700>
Date:   Tue, 25 Oct 2016 18:36:39 +0100
From:   Jakub Kicinski <kubakici@...pl>
To:     Shrijeet Mukherjee <shrijeet@...il.com>
Cc:     mst@...hat.com, tom@...bertland.com, netdev@...r.kernel.org,
        shm@...ulusnetworks.com, roopa@...ulusnetworks.com,
        nikolay@...ulusnetworks.com
Subject: Re: [PATCH net-next RFC WIP] Patch for XDP support for virtio_net

On Sat, 22 Oct 2016 04:07:23 +0000, Shrijeet Mukherjee wrote:
> +		act = bpf_prog_run_xdp(xdp_prog, &xdp);
> +		switch (act) {
> +		case XDP_PASS:
> +			return XDP_PASS;
> +		case XDP_TX:
> +		case XDP_ABORTED:
> +		case XDP_DROP:
> +			return XDP_DROP;
> +		default:
> +			bpf_warn_invalid_xdp_action(act);
> +		}
> +	}
> +	return XDP_PASS;

FWIW you may want to move the default label before XDP_TX/XDP_ABORT,
to get the behaviour to be drop on unknown ret code.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ