During MAC address insertion to MPS TCAM, add a default mask when
the mask is not explicitly specified. Otherwise, driver misses the
mask comparison and ends up inserting duplicate entries in the
MPS TCAM.
Fixes:
6fda3f0ddda9 ("net/cxgbe: add API to program hardware MPS table")
Cc: stable@dpdk.org
Signed-off-by: Karra Satwik <kaara.satwik@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
/* idx can now be different from what user provided */
entry = &mpstcam->entry[idx];
memcpy(entry->eth_addr, addr, RTE_ETHER_ADDR_LEN);
+ memset(entry->mask, ~0, RTE_ETHER_ADDR_LEN);
/* NOTE: we have considered the case that idx returned by t4_change_mac
* will be different from the user provided value only if user
* provided value is -1