bpf programs: switch from integers to #define'd bpfloader versions
(per request from Lorenzo) We do bump block/clatd/dscp_policy requirements from 0.12 to 0.13, but this effectively doesn't matter: - Beta2 is too old either way (pre-0.12) - Beta3 is new enough (0.13) - versions in between are simply obsolete / unused / not important - bpfloader 0.12 won't boot right anyway due to lack of netd maps/programs (which cause a netd startup failure) This allows us to have one less #define in the header files, with a hard to write explanation about what exactly v0.12 is (or was). Test: TreeHugger Signed-off-by: Maciej Żenczykowski <maze@google.com> Change-Id: I1ecf15f9d7abbb82ec6bd49848255fab6a41aed4
This commit is contained in:
parent
932ef5b220
commit
f769952212
|
@ -19,8 +19,8 @@
|
|||
#include <netinet/in.h>
|
||||
#include <stdint.h>
|
||||
|
||||
// The resulting .o needs to load on the Android T bpfloader v0.12+
|
||||
#define BPFLOADER_MIN_VER 12u
|
||||
// The resulting .o needs to load on the Android T beta 3 bpfloader
|
||||
#define BPFLOADER_MIN_VER BPFLOADER_T_BETA3_VERSION
|
||||
|
||||
#include "bpf_helpers.h"
|
||||
|
||||
|
|
|
@ -30,8 +30,8 @@
|
|||
#define __kernel_udphdr udphdr
|
||||
#include <linux/udp.h>
|
||||
|
||||
// The resulting .o needs to load on the Android T bpfloader v0.12+
|
||||
#define BPFLOADER_MIN_VER 12u
|
||||
// The resulting .o needs to load on the Android T beta 3 bpfloader
|
||||
#define BPFLOADER_MIN_VER BPFLOADER_T_BETA3_VERSION
|
||||
|
||||
#include "bpf_helpers.h"
|
||||
#include "bpf_net_helpers.h"
|
||||
|
|
|
@ -27,8 +27,8 @@
|
|||
#include <netinet/udp.h>
|
||||
#include <string.h>
|
||||
|
||||
// The resulting .o needs to load on the Android T bpfloader v0.12+
|
||||
#define BPFLOADER_MIN_VER 12u
|
||||
// The resulting .o needs to load on the Android T beta 3 bpfloader
|
||||
#define BPFLOADER_MIN_VER BPFLOADER_T_BETA3_VERSION
|
||||
|
||||
#include "bpf_helpers.h"
|
||||
#include "dscp_policy.h"
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
// The resulting .o needs to load on the Android T Beta 3 bpfloader v0.13+
|
||||
#define BPFLOADER_MIN_VER 13u
|
||||
// The resulting .o needs to load on the Android T Beta 3 bpfloader
|
||||
#define BPFLOADER_MIN_VER BPFLOADER_T_BETA3_VERSION
|
||||
|
||||
#include <bpf_helpers.h>
|
||||
#include <linux/bpf.h>
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
#define __kernel_udphdr udphdr
|
||||
#include <linux/udp.h>
|
||||
|
||||
// The resulting .o needs to load on the Android S bpfloader v0.2
|
||||
#define BPFLOADER_MIN_VER 2u
|
||||
// The resulting .o needs to load on the Android S bpfloader
|
||||
#define BPFLOADER_MIN_VER BPFLOADER_S_VERSION
|
||||
|
||||
#include "bpf_helpers.h"
|
||||
#include "bpf_net_helpers.h"
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
#include <linux/in.h>
|
||||
#include <linux/ip.h>
|
||||
|
||||
// The resulting .o needs to load on the Android S bpfloader v0.2
|
||||
#define BPFLOADER_MIN_VER 2u
|
||||
// The resulting .o needs to load on the Android S bpfloader
|
||||
#define BPFLOADER_MIN_VER BPFLOADER_S_VERSION
|
||||
|
||||
#include "bpf_helpers.h"
|
||||
#include "bpf_net_helpers.h"
|
||||
|
|
Loading…
Reference in New Issue