diff mbox

[net-next,v2,24/27] bpf_test: prepare for VLAN_TAG_PRESENT removal

Message ID 58e4b5f61786ca36f7bbf96b1d55af24c5013996.1483475202.git.mirq-linux@rere.qmqm.pl
State Changes Requested, archived
Delegated to: David Miller
Headers show

Commit Message

Michał Mirosław Jan. 3, 2017, 8:52 p.m. UTC
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
---
 lib/test_bpf.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

Comments

Michał Mirosław Jan. 3, 2017, 9:16 p.m. UTC | #1
On Tue, Jan 03, 2017 at 09:52:40PM +0100, Michał Mirosław wrote:
> ---
>  lib/test_bpf.c | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
 
Please ignore - squashed with #25.

Best Regards,
Michał Mirosław
diff mbox

Patch

diff --git a/lib/test_bpf.c b/lib/test_bpf.c
index 0362da0b66c3..00d345006671 100644
--- a/lib/test_bpf.c
+++ b/lib/test_bpf.c
@@ -691,8 +691,13 @@  static struct bpf_test tests[] = {
 		CLASSIC,
 		{ },
 		{
+#ifdef VLAN_TAG_PRESENT
 			{ 1, SKB_VLAN_TCI & ~VLAN_TAG_PRESENT },
 			{ 10, SKB_VLAN_TCI & ~VLAN_TAG_PRESENT }
+#else
+			{ 1, SKB_VLAN_TCI },
+			{ 10, SKB_VLAN_TCI }
+#endif
 		},
 	},
 	{
@@ -705,8 +710,13 @@  static struct bpf_test tests[] = {
 		CLASSIC,
 		{ },
 		{
+#ifdef VLAN_TAG_PRESENT
 			{ 1, !!(SKB_VLAN_TCI & VLAN_TAG_PRESENT) },
 			{ 10, !!(SKB_VLAN_TCI & VLAN_TAG_PRESENT) }
+#else
+			{ 1, SKB_VLAN_PRESENT },
+			{ 10, SKB_VLAN_PRESENT }
+#endif
 		},
 	},
 	{
@@ -4773,8 +4783,13 @@  static struct bpf_test tests[] = {
 		CLASSIC,
 		{ },
 		{
+#ifdef VLAN_TAG_PRESENT
 			{  1, !!(SKB_VLAN_TCI & VLAN_TAG_PRESENT) },
 			{ 10, !!(SKB_VLAN_TCI & VLAN_TAG_PRESENT) }
+#else
+			{  1, SKB_VLAN_PRESENT },
+			{ 10, SKB_VLAN_PRESENT }
+#endif
 		},
 		.fill_helper = bpf_fill_maxinsns6,
 	},