DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] i40e:fix MAC filter issues in i40e_ethdev.c
@ 2014-10-31  1:58 Jijiang Liu
  2014-10-31  3:28 ` [dpdk-dev] [PATCH v2] " Jijiang Liu
  0 siblings, 1 reply; 3+ messages in thread
From: Jijiang Liu @ 2014-10-31  1:58 UTC (permalink / raw)
  To: dev

This patch fixes two issues: one is to fix the log issue, the other is to set filter type when updating the default MAC filter. 

Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
---
 lib/librte_pmd_i40e/i40e_ethdev.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/lib/librte_pmd_i40e/i40e_ethdev.c b/lib/librte_pmd_i40e/i40e_ethdev.c
index d768a08..b35cdd2 100644
--- a/lib/librte_pmd_i40e/i40e_ethdev.c
+++ b/lib/librte_pmd_i40e/i40e_ethdev.c
@@ -1723,7 +1723,7 @@ i40e_mac_filter_handle(struct rte_eth_dev *dev, enum rte_filter_op filter_op,
 		i40e_pf_enable_irq0(hw);
 		break;
 	default:
-		PMD_DRV_LOG(ERR, "unknown operation %u\n", filter_op);
+		PMD_DRV_LOG(ERR, "unknown operation %u", filter_op);
 		ret = I40E_ERR_PARAM;
 		break;
 	}
@@ -2628,6 +2628,7 @@ i40e_update_default_filter_setting(struct i40e_vsi *vsi)
 		mac = &f->mac_info.mac_addr;
 		(void)rte_memcpy(&mac->addr_bytes, hw->mac.perm_addr,
 				ETH_ADDR_LEN);
+		f->mac_info.filter_type = RTE_MACVLAN_PERFECT_MATCH;
 		TAILQ_INSERT_TAIL(&vsi->mac_list, f, next);
 		vsi->mac_num++;
 
-- 
1.7.7.6

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [dpdk-dev] [PATCH v2] i40e:fix MAC filter issues in i40e_ethdev.c
  2014-10-31  1:58 [dpdk-dev] [PATCH] i40e:fix MAC filter issues in i40e_ethdev.c Jijiang Liu
@ 2014-10-31  3:28 ` Jijiang Liu
  2014-10-31  9:20   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Jijiang Liu @ 2014-10-31  3:28 UTC (permalink / raw)
  To: dev

This patch fixes two issues: one is to fix the log issues, the other is to set filter type when updating the default MAC filter.

v2 changes:
        Fix the remaining PMD log issues. 

Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
---
 lib/librte_pmd_i40e/i40e_ethdev.c |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/lib/librte_pmd_i40e/i40e_ethdev.c b/lib/librte_pmd_i40e/i40e_ethdev.c
index d768a08..a860af7 100644
--- a/lib/librte_pmd_i40e/i40e_ethdev.c
+++ b/lib/librte_pmd_i40e/i40e_ethdev.c
@@ -1633,33 +1633,33 @@ i40e_vf_mac_filter_set(struct i40e_pf *pf,
 	int ret;
 
 	if (pf == NULL) {
-		PMD_DRV_LOG(ERR, "Invalid PF argument\n");
+		PMD_DRV_LOG(ERR, "Invalid PF argument.");
 		return -EINVAL;
 	}
 	hw = I40E_PF_TO_HW(pf);
 
 	if (filter == NULL) {
-		PMD_DRV_LOG(ERR, "Invalid mac filter argument\n");
+		PMD_DRV_LOG(ERR, "Invalid mac filter argument.");
 		return -EINVAL;
 	}
 
 	new_mac = &filter->mac_addr;
 
 	if (is_zero_ether_addr(new_mac)) {
-		PMD_DRV_LOG(ERR, "Invalid ethernet address\n");
+		PMD_DRV_LOG(ERR, "Invalid ethernet address.");
 		return -EINVAL;
 	}
 
 	vf_id = filter->dst_id;
 
 	if (vf_id > pf->vf_num - 1 || !pf->vfs) {
-		PMD_DRV_LOG(ERR, "Invalid argument\n");
+		PMD_DRV_LOG(ERR, "Invalid argument.");
 		return -EINVAL;
 	}
 	vf = &pf->vfs[vf_id];
 
 	if (add && is_same_ether_addr(new_mac, &(pf->dev_addr))) {
-		PMD_DRV_LOG(INFO, "Ignore adding permanent MAC address\n");
+		PMD_DRV_LOG(INFO, "Ignore adding permanent MAC address.");
 		return -EINVAL;
 	}
 
@@ -1673,7 +1673,7 @@ i40e_vf_mac_filter_set(struct i40e_pf *pf,
 		mac_filter.filter_type = filter->filter_type;
 		ret = i40e_vsi_add_mac(vf->vsi, &mac_filter);
 		if (ret != I40E_SUCCESS) {
-			PMD_DRV_LOG(ERR, "Failed to add MAC filter\n");
+			PMD_DRV_LOG(ERR, "Failed to add MAC filter.");
 			return -1;
 		}
 		ether_addr_copy(new_mac, &pf->dev_addr);
@@ -1682,7 +1682,7 @@ i40e_vf_mac_filter_set(struct i40e_pf *pf,
 				ETHER_ADDR_LEN);
 		ret = i40e_vsi_delete_mac(vf->vsi, &filter->mac_addr);
 		if (ret != I40E_SUCCESS) {
-			PMD_DRV_LOG(ERR, "Failed to delete MAC filter\n");
+			PMD_DRV_LOG(ERR, "Failed to delete MAC filter.");
 			return -1;
 		}
 
@@ -1723,7 +1723,7 @@ i40e_mac_filter_handle(struct rte_eth_dev *dev, enum rte_filter_op filter_op,
 		i40e_pf_enable_irq0(hw);
 		break;
 	default:
-		PMD_DRV_LOG(ERR, "unknown operation %u\n", filter_op);
+		PMD_DRV_LOG(ERR, "unknown operation %u", filter_op);
 		ret = I40E_ERR_PARAM;
 		break;
 	}
@@ -2628,6 +2628,7 @@ i40e_update_default_filter_setting(struct i40e_vsi *vsi)
 		mac = &f->mac_info.mac_addr;
 		(void)rte_memcpy(&mac->addr_bytes, hw->mac.perm_addr,
 				ETH_ADDR_LEN);
+		f->mac_info.filter_type = RTE_MACVLAN_PERFECT_MATCH;
 		TAILQ_INSERT_TAIL(&vsi->mac_list, f, next);
 		vsi->mac_num++;
 
-- 
1.7.7.6

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH v2] i40e:fix MAC filter issues in i40e_ethdev.c
  2014-10-31  3:28 ` [dpdk-dev] [PATCH v2] " Jijiang Liu
@ 2014-10-31  9:20   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2014-10-31  9:20 UTC (permalink / raw)
  To: Jijiang Liu; +Cc: dev

2014-10-31 11:28, Jijiang Liu:
> This patch fixes two issues: one is to fix the log issues, the other is to set filter type when updating the default MAC filter.
> 
> v2 changes:
>         Fix the remaining PMD log issues. 
> 
> Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>

Lesson learned: patches are better reviewed when they are applied.
It's probably my fault: the macvlan patchset was 1 week old and had no review.
So I assumed that there was no problem.
To the i40e developers: please understand that we need more reviews to close
integration of the i40e features.

The good conclusion is that it's now fixed; acked and applied.

Thanks
-- 
Thomas

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-10-31  9:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-31  1:58 [dpdk-dev] [PATCH] i40e:fix MAC filter issues in i40e_ethdev.c Jijiang Liu
2014-10-31  3:28 ` [dpdk-dev] [PATCH v2] " Jijiang Liu
2014-10-31  9:20   ` Thomas Monjalon

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).