drivers: net: ipq9574: Drop DA MAC rule

This patch adds DA MAC rule. This rule can be used
if we want to drop packets with a particular DA MAC
address.

Change-Id: I32ef53ada1518f6880faa7402ccaaedb5b32a90b
Signed-off-by: Selvam Sathappan Periakaruppan <quic_speriaka@quicinc.com>
This commit is contained in:
Selvam Sathappan Periakaruppan 2022-02-27 09:56:44 +05:30
parent 1cbcdb8fcb
commit d909c4b4ad
2 changed files with 8 additions and 0 deletions

View file

@ -116,6 +116,13 @@ void ipq9574_ppe_acl_set(int rule_id, int rule_type, int field0, int field1, int
hw_reg.bf.pri = 0x2;
/* bypass fdb lean and fdb freash */
hw_act.bf.bypass_bitmap_0 = 0x1800;
} else if (rule_type == ADPT_ACL_HPPE_MAC_DA_RULE) {
/* dest mac AC rule */
hw_reg.bf.rule_field_0 = field1;
hw_reg.bf.rule_field_1 = field0;
hw_mask.bf.maskfield_1 = 0xffff;
hw_act.bf.fwd_cmd = 1;/* drop */
hw_reg.bf.pri = 0x2;
}
/* bind port1-port6 */
hw_reg.bf.src_0 = 0x0;

View file

@ -70,6 +70,7 @@ enum {
#define ADPT_ACL_HPPE_IPV4_DIP_RULE 4
#define ADPT_ACL_HPPE_MAC_SA_RULE 1
#define ADPT_ACL_HPPE_MAC_DA_RULE 0
#define MAX_RULE 512
struct ipo_rule_reg {