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: Kumar Sanghvi <kumaras@chelsio.com> Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
b6f8eaece6
commit
7c89e5550c
|
@ -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.iq = queue;
|
||||
/* Mark filter as locked */
|
||||
|
|
|
@ -1171,6 +1171,10 @@
|
|||
|
||||
#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 V_PORT(x) ((x) << S_PORT)
|
||||
#define F_PORT V_PORT(1U)
|
||||
|
|
Loading…
Reference in New Issue