提交 7c89e555 编写于 作者: K Kumar Sanghvi 提交者: 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: NKumar Sanghvi <kumaras@chelsio.com>
Signed-off-by: NHariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册