diff options
author | Casey Leedom <leedom@chelsio.com> | 2018-09-07 13:29:33 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-09-08 09:06:07 +0300 |
commit | a89cdd8e7c741eee80b105acddb04cda9f40ef49 (patch) | |
tree | 8bbd0d0ec4544f4130518010d39f2a62946ea2a5 /drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | |
parent | be7e1b334be4566926322db7bfc30ad3a805f9bd (diff) | |
download | linux-a89cdd8e7c741eee80b105acddb04cda9f40ef49.tar.xz |
cxgb4: impose mandatory VLAN usage when non-zero TAG ID
When a non-zero VLAN Tag ID is passed to t4_set_vlan_acl()
then impose mandatory VLAN Usage with that VLAN ID.
I.e any other VLAN ID should result in packets getting
dropped.
Signed-off-by: Casey Leedom <leedom@chelsio.com>
Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/chelsio/cxgb4/t4_hw.c')
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c index 5fe5d16dee72..6f1bd7bf1a11 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c +++ b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c @@ -10210,6 +10210,9 @@ int t4_set_vlan_acl(struct adapter *adap, unsigned int mbox, unsigned int vf, vlan_cmd.en_to_len16 = cpu_to_be32(enable | FW_LEN16(vlan_cmd)); /* Drop all packets that donot match vlan id */ vlan_cmd.dropnovlan_fm = FW_ACL_VLAN_CMD_FM_F; + vlan_cmd.dropnovlan_fm = (enable + ? (FW_ACL_VLAN_CMD_DROPNOVLAN_F | + FW_ACL_VLAN_CMD_FM_F) : 0); if (enable != 0) { vlan_cmd.nvlan = 1; vlan_cmd.vlanid[0] = cpu_to_be16(vlan); |