cxgb4: Account for stid entries properly in case of IPv6
authorKumar Sanghvi <kumaras@chelsio.com>
Wed, 18 Dec 2013 11:08:22 +0000 (16:38 +0530)
committerDavid S. Miller <davem@davemloft.net>
Sun, 22 Dec 2013 23:09:08 +0000 (18:09 -0500)
commit15f63b74c25797f9246b1738f0cfabd5febe226e
tree090fa046ecf1e60cf8b8a546355b91cbe7170fc4
parent470c60c47a03f74f0ec1a83576eb6000025634a9
cxgb4: Account for stid entries properly in case of IPv6

IPv6 uses 2 TIDs with CLIP enabled and 4 TIDs without CLIP.
Currently we are incrementing STIDs in use by 1 for both IPv4 and IPv6 which
is wrong.

Further, driver currently does not have interface to query if CLIP is programmed
for particular IPv6 address. So, in this patch we increment/decrement TIDs in use
by 4 for IPv6 assuming absence of CLIP. Such assumption keeps us on safe side and
we don't end up allocating more stids for IPv6 than actually supported.

Based on original work by Santosh Rastapur <santosh@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>
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c