]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit882eb66e9cc84fef8c4375433db00c5d5e5c4ed4
tree090fa046ecf1e60cf8b8a546355b91cbe7170fc4
parentd2068a692e3a9f1cb6af507ca614db7ebd5bfd5b
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