Skip to content

Commit ba0696c

Browse files
ffainellidavem330
authored andcommitted
net: dsa: bcm_sf2: Add support for IPv6 CFP rules
Inserting IPv6 CFP rules complicates the code a little bit in that we need to insert two rules side by side and chain them to match a full IPv6 tuple (src, dst IPv6 + port + protocol). Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 4daa70c commit ba0696c

File tree

4 files changed

+534
-40
lines changed

4 files changed

+534
-40
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)