Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

cxgb4: use CLIP with LIP6 on T6 for TCAM filters

On T6, LIP compression is always enabled for IPv6 and uncompressed
IPv6 for LIP is not supported. So, for IPv6 TCAM filters on T6,
add LIP6 to CLIP on filter creation, and release the same on filter
deletion.

Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Ganesh Goudar and committed by
David S. Miller
a9add194 ef27e2cc

+11 -1
+11 -1
drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
··· 694 694 if (f->smt) 695 695 cxgb4_smt_release(f->smt); 696 696 697 - if (f->fs.hash && f->fs.type) 697 + if ((f->fs.hash || is_t6(adap->params.chip)) && f->fs.type) 698 698 cxgb4_clip_release(f->dev, (const u32 *)&f->fs.val.lip, 1); 699 699 700 700 /* The zeroing of the filter rule below clears the filter valid, ··· 1290 1290 */ 1291 1291 if (f->valid) 1292 1292 clear_filter(adapter, f); 1293 + 1294 + if (is_t6(adapter->params.chip) && fs->type && 1295 + ipv6_addr_type((const struct in6_addr *)fs->val.lip) != 1296 + IPV6_ADDR_ANY) { 1297 + ret = cxgb4_clip_get(dev, (const u32 *)&fs->val.lip, 1); 1298 + if (ret) { 1299 + cxgb4_clear_ftid(&adapter->tids, filter_id, PF_INET6); 1300 + return ret; 1301 + } 1302 + } 1293 1303 1294 1304 /* Convert the filter specification into our internal format. 1295 1305 * We copy the PF/VF specification into the Outer VLAN field