* [dpdk-stable] [DPDK 1/2] net/ice: code clean
@ 2019-04-12 4:57 Wang Ying A
2019-04-12 4:57 ` [dpdk-stable] [DPDK 2/2] net/ice: fix promiscuous mode Wang Ying A
0 siblings, 1 reply; 4+ messages in thread
From: Wang Ying A @ 2019-04-12 4:57 UTC (permalink / raw)
To: qabuild; +Cc: Wang Ying A, stable
Variable "status" should be difined as "int" instead of "uint_16t".
This patch fixes the issue.
Fixes: c945e4bf9063 ("net/ice: support promiscuous mode")
Cc: stable@dpdk.org
Signed-off-by: Wang Ying A <ying.a.wang@intel.com>
---
drivers/net/ice/ice_ethdev.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 9d01018..72831bb 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -2753,7 +2753,7 @@ static int ice_macaddr_set(struct rte_eth_dev *dev,
struct ice_hw *hw = ICE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
struct ice_vsi *vsi = pf->main_vsi;
uint8_t pmask;
- uint16_t status;
+ int status;
pmask = ICE_PROMISC_UCAST_RX | ICE_PROMISC_UCAST_TX |
ICE_PROMISC_MCAST_RX | ICE_PROMISC_MCAST_TX;
@@ -2769,7 +2769,7 @@ static int ice_macaddr_set(struct rte_eth_dev *dev,
struct ice_pf *pf = ICE_DEV_PRIVATE_TO_PF(dev->data->dev_private);
struct ice_hw *hw = ICE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
struct ice_vsi *vsi = pf->main_vsi;
- uint16_t status;
+ int status;
uint8_t pmask;
pmask = ICE_PROMISC_UCAST_RX | ICE_PROMISC_UCAST_TX |
@@ -2787,7 +2787,7 @@ static int ice_macaddr_set(struct rte_eth_dev *dev,
struct ice_hw *hw = ICE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
struct ice_vsi *vsi = pf->main_vsi;
uint8_t pmask;
- uint16_t status;
+ int status;
pmask = ICE_PROMISC_MCAST_RX | ICE_PROMISC_MCAST_TX;
@@ -2802,7 +2802,7 @@ static int ice_macaddr_set(struct rte_eth_dev *dev,
struct ice_pf *pf = ICE_DEV_PRIVATE_TO_PF(dev->data->dev_private);
struct ice_hw *hw = ICE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
struct ice_vsi *vsi = pf->main_vsi;
- uint16_t status;
+ int status;
uint8_t pmask;
if (dev->data->promiscuous == 1)
--
1.8.3.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dpdk-stable] [DPDK 2/2] net/ice: fix promiscuous mode
2019-04-12 4:57 [dpdk-stable] [DPDK 1/2] net/ice: code clean Wang Ying A
@ 2019-04-12 4:57 ` Wang Ying A
0 siblings, 0 replies; 4+ messages in thread
From: Wang Ying A @ 2019-04-12 4:57 UTC (permalink / raw)
To: qabuild; +Cc: Wang Ying A, stable
When device promiscuous mode has already been enabled,
"set promisc all on" in testpmd command line should
give the user a hint not a error print. This patch
fixes the issue.
Fixes: c945e4bf9063 ("net/ice: support promiscuous mode")
Cc: stable@dpdk.org
Signed-off-by: Wang Ying A <ying.a.wang@intel.com>
---
drivers/net/ice/ice_ethdev.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 72831bb..198da86 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -2760,7 +2760,12 @@ static int ice_macaddr_set(struct rte_eth_dev *dev,
status = ice_set_vsi_promisc(hw, vsi->idx, pmask, 0);
if (status != ICE_SUCCESS)
- PMD_DRV_LOG(ERR, "Failed to enable promisc, err=%d", status);
+ {
+ if(status == ICE_ERR_ALREADY_EXISTS)
+ PMD_DRV_LOG(INFO, "Promiscuous mode has already been enabled");
+ else
+ PMD_DRV_LOG(ERR, "Failed to enable promisc, err=%d", status);
+ }
}
static void
--
1.8.3.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dpdk-stable] [DPDK 1/2] net/ice: code clean
@ 2019-04-12 8:08 Wang Ying A
0 siblings, 0 replies; 4+ messages in thread
From: Wang Ying A @ 2019-04-12 8:08 UTC (permalink / raw)
To: qabuild; +Cc: Wang Ying A, stable
Variable "status" should be difined as "int" instead of "uint_16t".
This patch fixes the issue.
Fixes: c945e4bf9063 ("net/ice: support promiscuous mode")
Cc: stable@dpdk.org
Signed-off-by: Wang Ying A <ying.a.wang@intel.com>
---
drivers/net/ice/ice_ethdev.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 9d01018..72831bb 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -2753,7 +2753,7 @@ static int ice_macaddr_set(struct rte_eth_dev *dev,
struct ice_hw *hw = ICE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
struct ice_vsi *vsi = pf->main_vsi;
uint8_t pmask;
- uint16_t status;
+ int status;
pmask = ICE_PROMISC_UCAST_RX | ICE_PROMISC_UCAST_TX |
ICE_PROMISC_MCAST_RX | ICE_PROMISC_MCAST_TX;
@@ -2769,7 +2769,7 @@ static int ice_macaddr_set(struct rte_eth_dev *dev,
struct ice_pf *pf = ICE_DEV_PRIVATE_TO_PF(dev->data->dev_private);
struct ice_hw *hw = ICE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
struct ice_vsi *vsi = pf->main_vsi;
- uint16_t status;
+ int status;
uint8_t pmask;
pmask = ICE_PROMISC_UCAST_RX | ICE_PROMISC_UCAST_TX |
@@ -2787,7 +2787,7 @@ static int ice_macaddr_set(struct rte_eth_dev *dev,
struct ice_hw *hw = ICE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
struct ice_vsi *vsi = pf->main_vsi;
uint8_t pmask;
- uint16_t status;
+ int status;
pmask = ICE_PROMISC_MCAST_RX | ICE_PROMISC_MCAST_TX;
@@ -2802,7 +2802,7 @@ static int ice_macaddr_set(struct rte_eth_dev *dev,
struct ice_pf *pf = ICE_DEV_PRIVATE_TO_PF(dev->data->dev_private);
struct ice_hw *hw = ICE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
struct ice_vsi *vsi = pf->main_vsi;
- uint16_t status;
+ int status;
uint8_t pmask;
if (dev->data->promiscuous == 1)
--
1.8.3.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dpdk-stable] [DPDK 1/2] net/ice: code clean
@ 2019-04-11 1:38 Wang Ying A
0 siblings, 0 replies; 4+ messages in thread
From: Wang Ying A @ 2019-04-11 1:38 UTC (permalink / raw)
To: qabuild; +Cc: Wang Ying A, stable
Variable "status" should be difined as "int" instead of "uint_16t".
This patch fixes the issue.
Fixes: c945e4bf9063 ("net/ice: support promiscuous mode")
Cc: stable@dpdk.org
Signed-off-by: Wang Ying A <ying.a.wang@intel.com>
---
drivers/net/ice/ice_ethdev.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 9d01018..72831bb 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -2753,7 +2753,7 @@ static int ice_macaddr_set(struct rte_eth_dev *dev,
struct ice_hw *hw = ICE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
struct ice_vsi *vsi = pf->main_vsi;
uint8_t pmask;
- uint16_t status;
+ int status;
pmask = ICE_PROMISC_UCAST_RX | ICE_PROMISC_UCAST_TX |
ICE_PROMISC_MCAST_RX | ICE_PROMISC_MCAST_TX;
@@ -2769,7 +2769,7 @@ static int ice_macaddr_set(struct rte_eth_dev *dev,
struct ice_pf *pf = ICE_DEV_PRIVATE_TO_PF(dev->data->dev_private);
struct ice_hw *hw = ICE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
struct ice_vsi *vsi = pf->main_vsi;
- uint16_t status;
+ int status;
uint8_t pmask;
pmask = ICE_PROMISC_UCAST_RX | ICE_PROMISC_UCAST_TX |
@@ -2787,7 +2787,7 @@ static int ice_macaddr_set(struct rte_eth_dev *dev,
struct ice_hw *hw = ICE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
struct ice_vsi *vsi = pf->main_vsi;
uint8_t pmask;
- uint16_t status;
+ int status;
pmask = ICE_PROMISC_MCAST_RX | ICE_PROMISC_MCAST_TX;
@@ -2802,7 +2802,7 @@ static int ice_macaddr_set(struct rte_eth_dev *dev,
struct ice_pf *pf = ICE_DEV_PRIVATE_TO_PF(dev->data->dev_private);
struct ice_hw *hw = ICE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
struct ice_vsi *vsi = pf->main_vsi;
- uint16_t status;
+ int status;
uint8_t pmask;
if (dev->data->promiscuous == 1)
--
1.8.3.1
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-04-12 8:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-12 4:57 [dpdk-stable] [DPDK 1/2] net/ice: code clean Wang Ying A
2019-04-12 4:57 ` [dpdk-stable] [DPDK 2/2] net/ice: fix promiscuous mode Wang Ying A
-- strict thread matches above, loose matches on Subject: below --
2019-04-12 8:08 [dpdk-stable] [DPDK 1/2] net/ice: code clean Wang Ying A
2019-04-11 1:38 Wang Ying A
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).