Skip to content

Commit

Permalink
net: dsa: bcm_sf2: Add support for IPv6 CFP rules
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Florian Fainelli authored and David S. Miller committed Oct 23, 2017
1 parent 4daa70c commit ba0696c
Show file tree
Hide file tree
Showing 4 changed files with 534 additions and 40 deletions.
1 change: 1 addition & 0 deletions drivers/net/dsa/bcm_sf2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1067,6 +1067,7 @@ static int bcm_sf2_sw_probe(struct platform_device *pdev)
* permanently used
*/
set_bit(0, priv->cfp.used);
set_bit(0, priv->cfp.unique);

bcm_sf2_identify_ports(priv, dn->child);

Expand Down
1 change: 1 addition & 0 deletions drivers/net/dsa/bcm_sf2.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ struct bcm_sf2_cfp_priv {
/* Mutex protecting concurrent accesses to the CFP registers */
struct mutex lock;
DECLARE_BITMAP(used, CFP_NUM_RULES);
DECLARE_BITMAP(unique, CFP_NUM_RULES);
unsigned int rules_cnt;
};

Expand Down
Loading

0 comments on commit ba0696c

Please sign in to comment.