net: remove VLAN_TAG_PRESENT
Replace VLAN_TAG_PRESENT with single bit flag and free up VLAN.CFI overload. Now VLAN.CFI is visible in networking stack and can be passed around intact. Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
4b50d23179
commit
0c4b2d3705
@@ -39,6 +39,7 @@
|
||||
#define SKB_HASH 0x1234aaab
|
||||
#define SKB_QUEUE_MAP 123
|
||||
#define SKB_VLAN_TCI 0xffff
|
||||
#define SKB_VLAN_PRESENT 1
|
||||
#define SKB_DEV_IFINDEX 577
|
||||
#define SKB_DEV_TYPE 588
|
||||
|
||||
@@ -725,8 +726,8 @@ static struct bpf_test tests[] = {
|
||||
CLASSIC,
|
||||
{ },
|
||||
{
|
||||
{ 1, SKB_VLAN_TCI & ~VLAN_TAG_PRESENT },
|
||||
{ 10, SKB_VLAN_TCI & ~VLAN_TAG_PRESENT }
|
||||
{ 1, SKB_VLAN_TCI },
|
||||
{ 10, SKB_VLAN_TCI }
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -739,8 +740,8 @@ static struct bpf_test tests[] = {
|
||||
CLASSIC,
|
||||
{ },
|
||||
{
|
||||
{ 1, !!(SKB_VLAN_TCI & VLAN_TAG_PRESENT) },
|
||||
{ 10, !!(SKB_VLAN_TCI & VLAN_TAG_PRESENT) }
|
||||
{ 1, SKB_VLAN_PRESENT },
|
||||
{ 10, SKB_VLAN_PRESENT }
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -5289,8 +5290,8 @@ static struct bpf_test tests[] = {
|
||||
#endif
|
||||
{ },
|
||||
{
|
||||
{ 1, !!(SKB_VLAN_TCI & VLAN_TAG_PRESENT) },
|
||||
{ 10, !!(SKB_VLAN_TCI & VLAN_TAG_PRESENT) }
|
||||
{ 1, SKB_VLAN_PRESENT },
|
||||
{ 10, SKB_VLAN_PRESENT }
|
||||
},
|
||||
.fill_helper = bpf_fill_maxinsns6,
|
||||
.expected_errcode = -ENOTSUPP,
|
||||
@@ -6493,6 +6494,7 @@ static struct sk_buff *populate_skb(char *buf, int size)
|
||||
skb->hash = SKB_HASH;
|
||||
skb->queue_mapping = SKB_QUEUE_MAP;
|
||||
skb->vlan_tci = SKB_VLAN_TCI;
|
||||
skb->vlan_present = SKB_VLAN_PRESENT;
|
||||
skb->vlan_proto = htons(ETH_P_IP);
|
||||
dev_net_set(&dev, &init_net);
|
||||
skb->dev = &dev;
|
||||
|
Reference in New Issue
Block a user