summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
diff options
context:
space:
mode:
authorKumar Sanghvi <kumaras@chelsio.com>2013-12-18 16:38:20 +0530
committerDavid S. Miller <davem@davemloft.net>2013-12-22 18:09:07 -0500
commit7c89e5550ccb2a3118854639d9525847e896c686 (patch)
treede3f741eb253821a442541a023af57b685abed42 /drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
parentb6f8eaece6d5f0247931b6dac140e6cf876f48de (diff)
downloadlwn-7c89e5550ccb2a3118854639d9525847e896c686.tar.gz
lwn-7c89e5550ccb2a3118854639d9525847e896c686.zip
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>
Diffstat (limited to 'drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c')
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
index f36f8e1a101c..df1d6b8334a1 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
@@ -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 */