mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2026-03-05 08:51:31 +01:00
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:
parent
1cbcdb8fcb
commit
d909c4b4ad
2 changed files with 8 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue