[dpdk-dev] net/ixgbe: fix adding multiple mirror type in a rule
Checks
Commit Message
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")
Cc: stable@dpdk.org
Signed-off-by: Wei Dai <wei.dai@intel.com>
---
drivers/net/ixgbe/ixgbe_ethdev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
> -----Original Message-----
> From: Dai, Wei
> Sent: Tuesday, September 5, 2017 5:17 PM
> To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Ananyev, Konstantin
> <konstantin.ananyev@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>
> Cc: dev@dpdk.org; Dai, Wei <wei.dai@intel.com>; stable@dpdk.org
> 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.
>
> Fixes: 7ba29a76b196 ("ethdev: rename and extend the mirror type")
> Cc: stable@dpdk.org
>
> Signed-off-by: Wei Dai <wei.dai@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
On 9/8/2017 1:23 AM, Wu, Jingjing wrote:
>
>
>> -----Original Message-----
>> From: Dai, Wei
>> Sent: Tuesday, September 5, 2017 5:17 PM
>> To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Ananyev, Konstantin
>> <konstantin.ananyev@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>
>> Cc: dev@dpdk.org; Dai, Wei <wei.dai@intel.com>; stable@dpdk.org
>> 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.
>>
>> Fixes: 7ba29a76b196 ("ethdev: rename and extend the mirror type")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Wei Dai <wei.dai@intel.com>
> Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Applied to dpdk-next-net/master, thanks.
@@ -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);