Commit affee5e1 authored by David S. Miller's avatar David S. Miller

Merge branch 'cxgb4-tc-flower-offload-fixes'

Daniel Borkmann says:

====================
pull-request: bpf 2018-01-18

The following pull-request contains BPF updates for your *net* tree.

The main changes are:

1) Fix a divide by zero due to wrong if (src_reg == 0) check in
   64-bit mode. Properly handle this in interpreter and mask it
   also generically in verifier to guard against similar checks
   in JITs, from Eric and Alexei.

2) Fix a bug in arm64 JIT when tail calls are involved and progs
   have different stack sizes, from Daniel.

3) Reject stores into BPF context that are not expected BPF_STX |
   BPF_MEM variant, from Daniel.

4) Mark dst reg as unknown on {s,u}bounds adjustments when the
   src reg has derived bounds from dead branches, from Daniel.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents e58edaa4 100d39af
...@@ -111,6 +111,9 @@ static void cxgb4_process_flow_match(struct net_device *dev, ...@@ -111,6 +111,9 @@ static void cxgb4_process_flow_match(struct net_device *dev,
ethtype_mask = 0; ethtype_mask = 0;
} }
if (ethtype_key == ETH_P_IPV6)
fs->type = 1;
fs->val.ethtype = ethtype_key; fs->val.ethtype = ethtype_key;
fs->mask.ethtype = ethtype_mask; fs->mask.ethtype = ethtype_mask;
fs->val.proto = key->ip_proto; fs->val.proto = key->ip_proto;
...@@ -205,8 +208,8 @@ static void cxgb4_process_flow_match(struct net_device *dev, ...@@ -205,8 +208,8 @@ static void cxgb4_process_flow_match(struct net_device *dev,
VLAN_PRIO_SHIFT); VLAN_PRIO_SHIFT);
vlan_tci_mask = mask->vlan_id | (mask->vlan_priority << vlan_tci_mask = mask->vlan_id | (mask->vlan_priority <<
VLAN_PRIO_SHIFT); VLAN_PRIO_SHIFT);
fs->val.ivlan = cpu_to_be16(vlan_tci); fs->val.ivlan = vlan_tci;
fs->mask.ivlan = cpu_to_be16(vlan_tci_mask); fs->mask.ivlan = vlan_tci_mask;
/* Chelsio adapters use ivlan_vld bit to match vlan packets /* Chelsio adapters use ivlan_vld bit to match vlan packets
* as 802.1Q. Also, when vlan tag is present in packets, * as 802.1Q. Also, when vlan tag is present in packets,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment