Skip to contentSkip to conversation

net/ixgbe: fix adding multiple mirror type in a rule

PATCH Applied Wei Dai 3 participants 3 messages Sep 5, 2017 – Sep 8, 2017 Network drivers

lore
Share & tools
lore

Wei Dai

author
#0 lore raw

PATCH 1/1 net/ixgbe: fix adding multiple mirror type in a rule

mirror rule_type can be a bit OR result of multiple mirror type of a rule. Before the commit which introduced this issue, the code supported adding multiple mirror type in a rule.

Fixes 7ba29a76b196 ("ethdev: rename and extend the mirror type")
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ixgbe/ixgbe_ethdev.c +2 -2
index 22171d8..858230d 100644
@@ -5450,13 +5450,13 @@ ixgbe_mirror_rule_set(struct rte_eth_dev *dev,
 	IXGBE_WRITE_REG(hw, IXGBE_MRCTL(rule_id), mr_ctl);
 
 	/* write pool mirrror control  register */
-	if (mirror_conf->rule_type == ETH_MIRROR_VIRTUAL_POOL_UP) {
+	if (mirror_conf->rule_type & ETH_MIRROR_VIRTUAL_POOL_UP) {
 		IXGBE_WRITE_REG(hw, IXGBE_VMRVM(rule_id), mp_lsb);
 		IXGBE_WRITE_REG(hw, IXGBE_VMRVM(rule_id + rule_mr_offset),
 				mp_msb);
 	}
 	/* write VLAN mirrror control  register */
-	if (mirror_conf->rule_type == ETH_MIRROR_VLAN) {
+	if (mirror_conf->rule_type & ETH_MIRROR_VLAN) {
 		IXGBE_WRITE_REG(hw, IXGBE_VMRVLAN(rule_id), mv_lsb);
 		IXGBE_WRITE_REG(hw, IXGBE_VMRVLAN(rule_id + rule_mr_offset),
 				mv_msb);
Signature · 1 line
2.7.5
Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines

-----Original Message-----
From: Dai, Wei
Sent: Tuesday, September 5, 2017 5:17 PM
To: Lu, Wenzhuo <[email protected]>; Ananyev, Konstantin <[email protected]>; Wu, Jingjing <[email protected]>
Cc: [email protected]; Dai, Wei <[email protected]>; [email protected]
Subject: [PATCH] net/ixgbe: fix adding multiple mirror type in a rule

Quoted 8 lines

mirror rule_type can be a bit OR result of multiple mirror type of a rule. Before the commit which introduced this issue, the code supported adding multiple mirror type in a rule.

Fixes 7ba29a76b196 ("ethdev: rename and extend the mirror type")
Applied
#2 lore raw
Quoted 14 lines · Jingjing
Quoted 14 lines

-----Original Message-----
From: Dai, Wei
Sent: Tuesday, September 5, 2017 5:17 PM
To: Lu, Wenzhuo <[email protected]>; Ananyev, Konstantin <[email protected]>; Wu, Jingjing <[email protected]>
Cc: [email protected]; Dai, Wei <[email protected]>; [email protected]
Subject: [PATCH] net/ixgbe: fix adding multiple mirror type in a rule

mirror rule_type can be a bit OR result of multiple mirror type of a rule. Before the commit which introduced this issue, the code supported adding multiple mirror type in a rule.

Quoted 5 lines
Quoted 4 lines
Fixes 7ba29a76b196 ("ethdev: rename and extend the mirror type")

Applied to dpdk-next-net/master, thanks.