Commit 7c89e555 authored by Kumar Sanghvi's avatar Kumar Sanghvi Committed by David S. Miller

cxgb4: Include TCP as protocol when creating server filters

We were creating LE Workaround Server Filters without specifying
IPPROTO_TCP (6) in the filters (when F_PROTOCOL is set in TP_VLAN_PRI_MAP).
This meant that UDP packets with matching IP Addresses/Ports would get
caught up in the filter and be delivered to ULDs like iw_cxgb4.
So, include the protocol information in the server filter properly.

Based on original work by Casey Leedom <leedom@chelsio.com>
Signed-off-by: default avatarKumar Sanghvi <kumaras@chelsio.com>
Signed-off-by: default avatarHariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b6f8eaec
...@@ -4217,6 +4217,11 @@ int cxgb4_create_server_filter(const struct net_device *dev, unsigned int stid, ...@@ -4217,6 +4217,11 @@ int cxgb4_create_server_filter(const struct net_device *dev, unsigned int stid,
} }
} }
if (adap->filter_mode & F_PROTOCOL) {
f->fs.val.proto = IPPROTO_TCP;
f->fs.mask.proto = ~0;
}
f->fs.dirsteer = 1; f->fs.dirsteer = 1;
f->fs.iq = queue; f->fs.iq = queue;
/* Mark filter as locked */ /* Mark filter as locked */
......
...@@ -1171,6 +1171,10 @@ ...@@ -1171,6 +1171,10 @@
#define A_TP_TX_SCHED_PCMD 0x25 #define A_TP_TX_SCHED_PCMD 0x25
#define S_PROTOCOL 5
#define V_PROTOCOL(x) ((x) << S_PROTOCOL)
#define F_PROTOCOL V_PROTOCOL(1U)
#define S_PORT 1 #define S_PORT 1
#define V_PORT(x) ((x) << S_PORT) #define V_PORT(x) ((x) << S_PORT)
#define F_PORT V_PORT(1U) #define F_PORT V_PORT(1U)
......
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