All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 0/2] qed*: Fixes to "Allow unicast filtering"
@ 2016-10-31 20:26 Yuval Mintz
  2016-10-31 20:26 ` [PATCH net-next 1/2] qede: Don't override priv_flags Yuval Mintz
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Yuval Mintz @ 2016-10-31 20:26 UTC (permalink / raw)
  To: davem, netdev; +Cc: Yuval Mintz

Commit 7b7e70f979e3 ("qed*: Allow unicast filtering") introduced several
issues in driver. This series is intended to address and fix those.

Dave,

These are fixes but I believe the original commit hasn't reached net yet.
So please consider applying these to `net-next'.

Thanks,
Yuval

Yuval Mintz (2):
  qede: Don't override priv_flags
  qed: Correct VF mac number

 drivers/net/ethernet/qlogic/qed/qed_l2.c     |  2 ++
 drivers/net/ethernet/qlogic/qed/qed_vf.c     |  7 +++++++
 drivers/net/ethernet/qlogic/qed/qed_vf.h     | 13 +++++++++++++
 drivers/net/ethernet/qlogic/qede/qede_main.c |  2 +-
 4 files changed, 23 insertions(+), 1 deletion(-)

-- 
1.9.3

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

* [PATCH net-next 1/2] qede: Don't override priv_flags
  2016-10-31 20:26 [PATCH net-next 0/2] qed*: Fixes to "Allow unicast filtering" Yuval Mintz
@ 2016-10-31 20:26 ` Yuval Mintz
  2016-10-31 20:26 ` [PATCH net-next 2/2] qed: Correct VF mac number Yuval Mintz
  2016-11-01 15:00 ` [PATCH net-next 0/2] qed*: Fixes to "Allow unicast filtering" David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Yuval Mintz @ 2016-10-31 20:26 UTC (permalink / raw)
  To: davem, netdev; +Cc: Yuval Mintz

Driver is now setting the ndev's priv_flags instead of adding to it,
causing pktgen failure to utilize various features due to the loss
of the IFF_TX_SKB_SHARING indication.

Fixes: 7b7e70f979e3 ("qed*: Allow unicast filtering")
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
---
 drivers/net/ethernet/qlogic/qede/qede_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/qlogic/qede/qede_main.c b/drivers/net/ethernet/qlogic/qede/qede_main.c
index 873f2eb..df02c45 100644
--- a/drivers/net/ethernet/qlogic/qede/qede_main.c
+++ b/drivers/net/ethernet/qlogic/qede/qede_main.c
@@ -2366,7 +2366,7 @@ static void qede_init_ndev(struct qede_dev *edev)
 
 	qede_set_ethtool_ops(ndev);
 
-	ndev->priv_flags = IFF_UNICAST_FLT;
+	ndev->priv_flags |= IFF_UNICAST_FLT;
 
 	/* user-changeble features */
 	hw_features = NETIF_F_GRO | NETIF_F_SG |
-- 
1.9.3

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

* [PATCH net-next 2/2] qed: Correct VF mac number
  2016-10-31 20:26 [PATCH net-next 0/2] qed*: Fixes to "Allow unicast filtering" Yuval Mintz
  2016-10-31 20:26 ` [PATCH net-next 1/2] qede: Don't override priv_flags Yuval Mintz
@ 2016-10-31 20:26 ` Yuval Mintz
  2016-11-01 15:00 ` [PATCH net-next 0/2] qed*: Fixes to "Allow unicast filtering" David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Yuval Mintz @ 2016-10-31 20:26 UTC (permalink / raw)
  To: davem, netdev; +Cc: Yuval Mintz

When relaxing the limitation on the number of unicast MAC filters
an interface can configure, qed started passing the MAC quota to
qede. However, the value is initialized only for PFs, causing VFs
to always try and configure themselves as promiscuous
[as they believe they lack the resources to configure the rx-mode].

Fixes: 7b7e70f979e3 ("qed*: Allow unicast filtering")
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
---
 drivers/net/ethernet/qlogic/qed/qed_l2.c |  2 ++
 drivers/net/ethernet/qlogic/qed/qed_vf.c |  7 +++++++
 drivers/net/ethernet/qlogic/qed/qed_vf.h | 13 +++++++++++++
 3 files changed, 22 insertions(+)

diff --git a/drivers/net/ethernet/qlogic/qed/qed_l2.c b/drivers/net/ethernet/qlogic/qed/qed_l2.c
index 1e3a16e..900b253 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_l2.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_l2.c
@@ -1692,6 +1692,8 @@ static int qed_fill_eth_dev_info(struct qed_dev *cdev,
 
 		qed_vf_get_num_vlan_filters(&cdev->hwfns[0],
 					    (u8 *)&info->num_vlan_filters);
+		qed_vf_get_num_mac_filters(&cdev->hwfns[0],
+					   (u8 *)&info->num_mac_filters);
 		qed_vf_get_port_mac(&cdev->hwfns[0], info->port_mac);
 
 		info->is_legacy = !!cdev->hwfns[0].vf_iov_info->b_pre_fp_hsi;
diff --git a/drivers/net/ethernet/qlogic/qed/qed_vf.c b/drivers/net/ethernet/qlogic/qed/qed_vf.c
index f580bf4..3c06336 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_vf.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_vf.c
@@ -1171,6 +1171,13 @@ void qed_vf_get_num_vlan_filters(struct qed_hwfn *p_hwfn, u8 *num_vlan_filters)
 	*num_vlan_filters = p_vf->acquire_resp.resc.num_vlan_filters;
 }
 
+void qed_vf_get_num_mac_filters(struct qed_hwfn *p_hwfn, u8 *num_mac_filters)
+{
+	struct qed_vf_iov *p_vf = p_hwfn->vf_iov_info;
+
+	*num_mac_filters = p_vf->acquire_resp.resc.num_mac_filters;
+}
+
 bool qed_vf_check_mac(struct qed_hwfn *p_hwfn, u8 *mac)
 {
 	struct qed_bulletin_content *bulletin;
diff --git a/drivers/net/ethernet/qlogic/qed/qed_vf.h b/drivers/net/ethernet/qlogic/qed/qed_vf.h
index 944745b..325c250 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_vf.h
+++ b/drivers/net/ethernet/qlogic/qed/qed_vf.h
@@ -623,6 +623,14 @@ void qed_vf_get_num_vlan_filters(struct qed_hwfn *p_hwfn,
 				 u8 *num_vlan_filters);
 
 /**
+ * @brief Get number of MAC filters allocated for VF by qed
+ *
+ *  @param p_hwfn
+ *  @param num_rxqs - allocated MAC filters
+ */
+void qed_vf_get_num_mac_filters(struct qed_hwfn *p_hwfn, u8 *num_mac_filters);
+
+/**
  * @brief Check if VF can set a MAC address
  *
  * @param p_hwfn
@@ -872,6 +880,11 @@ static inline void qed_vf_get_num_vlan_filters(struct qed_hwfn *p_hwfn,
 {
 }
 
+static inline void qed_vf_get_num_mac_filters(struct qed_hwfn *p_hwfn,
+					      u8 *num_mac_filters)
+{
+}
+
 static inline bool qed_vf_check_mac(struct qed_hwfn *p_hwfn, u8 *mac)
 {
 	return false;
-- 
1.9.3

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

* Re: [PATCH net-next 0/2] qed*: Fixes to "Allow unicast filtering"
  2016-10-31 20:26 [PATCH net-next 0/2] qed*: Fixes to "Allow unicast filtering" Yuval Mintz
  2016-10-31 20:26 ` [PATCH net-next 1/2] qede: Don't override priv_flags Yuval Mintz
  2016-10-31 20:26 ` [PATCH net-next 2/2] qed: Correct VF mac number Yuval Mintz
@ 2016-11-01 15:00 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2016-11-01 15:00 UTC (permalink / raw)
  To: Yuval.Mintz; +Cc: netdev

From: Yuval Mintz <Yuval.Mintz@cavium.com>
Date: Mon, 31 Oct 2016 22:26:52 +0200

> Commit 7b7e70f979e3 ("qed*: Allow unicast filtering") introduced several
> issues in driver. This series is intended to address and fix those.

Series applied to net-next, thanks.

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

end of thread, other threads:[~2016-11-01 15:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-31 20:26 [PATCH net-next 0/2] qed*: Fixes to "Allow unicast filtering" Yuval Mintz
2016-10-31 20:26 ` [PATCH net-next 1/2] qede: Don't override priv_flags Yuval Mintz
2016-10-31 20:26 ` [PATCH net-next 2/2] qed: Correct VF mac number Yuval Mintz
2016-11-01 15:00 ` [PATCH net-next 0/2] qed*: Fixes to "Allow unicast filtering" David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.