Skip to content

Commit bc9db41

Browse files
committed
Merge branch 'bcm_sf2-Add-support-for-IPv6-CFP-rules'
Florian Fainelli says: ==================== net: dsa: bcm_sf2: Add support for IPv6 CFP rules This patch series adds support for matching IPv6 addresses to the existing CFP support code. Because IPv6 addresses are four times bigger than IPv4, we can fit them anymore in a single slice, so we need to chain two in order to have a complete match. This makes us require a second bitmap tracking unique rules so we don't over populate the TCAM. Finally, because the code had to be re-organized, it became a lot easier to support arbitrary prefix/mask lengths, so the last two patches do just that. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2 parents 33ad61d + dd8eff6 commit bc9db41

File tree

4 files changed

+935
-278
lines changed

4 files changed

+935
-278
lines changed

drivers/net/dsa/bcm_sf2.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,6 +1067,7 @@ static int bcm_sf2_sw_probe(struct platform_device *pdev)
10671067
* permanently used
10681068
*/
10691069
set_bit(0, priv->cfp.used);
1070+
set_bit(0, priv->cfp.unique);
10701071

10711072
bcm_sf2_identify_ports(priv, dn->child);
10721073

drivers/net/dsa/bcm_sf2.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ struct bcm_sf2_cfp_priv {
5454
/* Mutex protecting concurrent accesses to the CFP registers */
5555
struct mutex lock;
5656
DECLARE_BITMAP(used, CFP_NUM_RULES);
57+
DECLARE_BITMAP(unique, CFP_NUM_RULES);
5758
unsigned int rules_cnt;
5859
};
5960

0 commit comments

Comments
 (0)