LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 1/3] ixgbe, ixgbevf: Add new mbox API to enable MC promiscuous mode
@ 2015-01-30 11:37 Hiroshi Shimamoto
  2015-01-30 22:13 ` Skidmore, Donald C
  2015-02-04 12:57 ` [E1000-devel] " Jeff Kirsher
  0 siblings, 2 replies; 15+ messages in thread
From: Hiroshi Shimamoto @ 2015-01-30 11:37 UTC (permalink / raw)
  To: Alexander Duyck, Skidmore, Donald C, Bjørn Mork
  Cc: e1000-devel, netdev, Choi, Sy Jong, linux-kernel, David Laight,
	Hayato Momma

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 12966 bytes --]

From: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>

The limitation of the number of multicast address for VF is not enough
for the large scale server with SR-IOV feature.
IPv6 requires the multicast MAC address for each IP address to handle
the Neighbor Solicitation message.
We couldn't assign over 30 IPv6 addresses to a single VF interface.

The easy way to solve this is enabling multicast promiscuous mode.
It is good to have a functionality to enable multicast promiscuous mode
for each VF from VF driver.

This patch introduces the new mbox API, IXGBE_VF_SET_MC_PROMISC, to
enable/disable multicast promiscuous mode in VF. If multicast promiscuous
mode is enabled the VF can receive all multicast packets.

With this patch, the ixgbevf driver automatically enable multicast
promiscuous mode when the number of multicast addresses is over than 30
if possible.

This also bump the API version up to 1.2 to check whether the API,
IXGBE_VF_SET_MC_PROMISC is available.

Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Reviewed-by: Hayato Momma <h-momma@ce.jp.nec.com>
CC: Choi, Sy Jong <sy.jong.choi@intel.com>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe.h          |  1 +
 drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h      |  4 +
 drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c    | 89 ++++++++++++++++++++++-
 drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 13 +++-
 drivers/net/ethernet/intel/ixgbevf/mbx.h          |  4 +
 drivers/net/ethernet/intel/ixgbevf/vf.c           | 29 +++++++-
 drivers/net/ethernet/intel/ixgbevf/vf.h           |  1 +
 7 files changed, 137 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe.h b/drivers/net/ethernet/intel/ixgbe/ixgbe.h
index b6137be..bf3333e 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe.h
@@ -144,6 +144,7 @@ struct vf_data_storage {
 	u16 vlans_enabled;
 	bool clear_to_send;
 	bool pf_set_mac;
+	bool mc_promisc;
 	u16 pf_vlan; /* When set, guest VLAN config not allowed. */
 	u16 pf_qos;
 	u16 tx_rate;
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h
index a5cb755..2963557 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h
@@ -73,6 +73,7 @@ enum ixgbe_pfvf_api_rev {
 	ixgbe_mbox_api_10,	/* API version 1.0, linux/freebsd VF driver */
 	ixgbe_mbox_api_20,	/* API version 2.0, solaris Phase1 VF driver */
 	ixgbe_mbox_api_11,	/* API version 1.1, linux/freebsd VF driver */
+	ixgbe_mbox_api_12,	/* API version 1.2, linux/freebsd VF driver */
 	/* This value should always be last */
 	ixgbe_mbox_api_unknown,	/* indicates that API version is not known */
 };
@@ -91,6 +92,9 @@ enum ixgbe_pfvf_api_rev {
 /* mailbox API, version 1.1 VF requests */
 #define IXGBE_VF_GET_QUEUES	0x09 /* get queue configuration */
 
+/* mailbox API, version 1.2 VF requests */
+#define IXGBE_VF_SET_MC_PROMISC	0x0a /* VF requests PF to set MC promiscuous */
+
 /* GET_QUEUES return data indices within the mailbox */
 #define IXGBE_VF_TX_QUEUES	1	/* number of Tx queues supported */
 #define IXGBE_VF_RX_QUEUES	2	/* number of Rx queues supported */
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
index c76ba90..c19b7b8 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
@@ -108,9 +108,12 @@ static int __ixgbe_enable_sriov(struct ixgbe_adapter *adapter)
 		adapter->flags2 &= ~(IXGBE_FLAG2_RSC_CAPABLE |
 				     IXGBE_FLAG2_RSC_ENABLED);
 
-		/* enable spoof checking for all VFs */
-		for (i = 0; i < adapter->num_vfs; i++)
+		for (i = 0; i < adapter->num_vfs; i++) {
+			/* Enable spoof checking for all VFs */
 			adapter->vfinfo[i].spoofchk_enabled = true;
+			/* Turn multicast promiscuous mode off for all VFs */
+			adapter->vfinfo[i].mc_promisc = false;
+		}
 		return 0;
 	}
 
@@ -311,6 +314,40 @@ int ixgbe_pci_sriov_configure(struct pci_dev *dev, int num_vfs)
 		return ixgbe_pci_sriov_enable(dev, num_vfs);
 }
 
+static int ixgbe_enable_vf_mc_promisc(struct ixgbe_adapter *adapter, u32 vf)
+{
+	struct ixgbe_hw *hw;
+	u32 vmolr;
+
+	hw = &adapter->hw;
+	vmolr = IXGBE_READ_REG(hw, IXGBE_VMOLR(vf));
+
+	e_info(drv, "VF %u: enabling multicast promiscuous\n", vf);
+
+	vmolr |= IXGBE_VMOLR_MPE;
+
+	IXGBE_WRITE_REG(hw, IXGBE_VMOLR(vf), vmolr);
+
+	return 0;
+}
+
+static int ixgbe_disable_vf_mc_promisc(struct ixgbe_adapter *adapter, u32 vf)
+{
+	struct ixgbe_hw *hw;
+	u32 vmolr;
+
+	hw = &adapter->hw;
+	vmolr = IXGBE_READ_REG(hw, IXGBE_VMOLR(vf));
+
+	e_info(drv, "VF %u: disabling multicast promiscuous\n", vf);
+
+	vmolr &= ~IXGBE_VMOLR_MPE;
+
+	IXGBE_WRITE_REG(hw, IXGBE_VMOLR(vf), vmolr);
+
+	return 0;
+}
+
 static int ixgbe_set_vf_multicasts(struct ixgbe_adapter *adapter,
 				   u32 *msgbuf, u32 vf)
 {
@@ -325,6 +362,12 @@ static int ixgbe_set_vf_multicasts(struct ixgbe_adapter *adapter,
 	u32 mta_reg;
 	u32 vmolr = IXGBE_READ_REG(hw, IXGBE_VMOLR(vf));
 
+	/* Disable multicast promiscuous first */
+	if (adapter->vfinfo[vf].mc_promisc) {
+		ixgbe_disable_vf_mc_promisc(adapter, vf);
+		adapter->vfinfo[vf].mc_promisc = false;
+	}
+
 	/* only so many hash values supported */
 	entries = min(entries, IXGBE_MAX_VF_MC_ENTRIES);
 
@@ -427,6 +470,7 @@ static s32 ixgbe_set_vf_lpe(struct ixgbe_adapter *adapter, u32 *msgbuf, u32 vf)
 #endif /* CONFIG_FCOE */
 		switch (adapter->vfinfo[vf].vf_api) {
 		case ixgbe_mbox_api_11:
+		case ixgbe_mbox_api_12:
 			/*
 			 * Version 1.1 supports jumbo frames on VFs if PF has
 			 * jumbo frames enabled which means legacy VFs are
@@ -710,6 +754,12 @@ static int ixgbe_vf_reset_msg(struct ixgbe_adapter *adapter, u32 vf)
 		IXGBE_WRITE_REG(hw, IXGBE_PVFTDWBALn(q_per_pool, vf, i), 0);
 	}
 
+	/* Disable multicast promiscuous at reset */
+	if (adapter->vfinfo[vf].mc_promisc) {
+		ixgbe_disable_vf_mc_promisc(adapter, vf);
+		adapter->vfinfo[vf].mc_promisc = false;
+	}
+
 	/* reply to reset with ack and vf mac address */
 	msgbuf[0] = IXGBE_VF_RESET;
 	if (!is_zero_ether_addr(vf_mac)) {
@@ -894,6 +944,12 @@ static int ixgbe_negotiate_vf_api(struct ixgbe_adapter *adapter,
 	switch (api) {
 	case ixgbe_mbox_api_10:
 	case ixgbe_mbox_api_11:
+	case ixgbe_mbox_api_12:
+		e_info(drv, "VF %d requested api_version %s\n", vf,
+			(api == ixgbe_mbox_api_12) ? "ixgbe_mbox_api_12" :
+			(api == ixgbe_mbox_api_11) ? "ixgbe_mbox_api_11" :
+			(api == ixgbe_mbox_api_10) ? "ixgbe_mbox_api_10" :
+			"unknown");
 		adapter->vfinfo[vf].vf_api = api;
 		return 0;
 	default:
@@ -917,6 +973,7 @@ static int ixgbe_get_vf_queues(struct ixgbe_adapter *adapter,
 	switch (adapter->vfinfo[vf].vf_api) {
 	case ixgbe_mbox_api_20:
 	case ixgbe_mbox_api_11:
+	case ixgbe_mbox_api_12:
 		break;
 	default:
 		return -1;
@@ -944,6 +1001,31 @@ static int ixgbe_get_vf_queues(struct ixgbe_adapter *adapter,
 	return 0;
 }
 
+static int ixgbe_set_vf_mc_promisc(struct ixgbe_adapter *adapter,
+				   u32 *msgbuf, u32 vf)
+{
+	bool enable = !!msgbuf[1];	/* msgbuf contains the flag to enable */
+
+	switch (adapter->vfinfo[vf].vf_api) {
+	case ixgbe_mbox_api_12:
+		break;
+	default:
+		return -1;
+	}
+
+	/* nothing to do */
+	if (adapter->vfinfo[vf].mc_promisc == enable)
+		return 0;
+
+	adapter->vfinfo[vf].mc_promisc = enable;
+
+	if (enable)
+		return ixgbe_enable_vf_mc_promisc(adapter, vf);
+	else
+		return ixgbe_disable_vf_mc_promisc(adapter, vf);
+}
+
+
 static int ixgbe_rcv_msg_from_vf(struct ixgbe_adapter *adapter, u32 vf)
 {
 	u32 mbx_size = IXGBE_VFMAILBOX_SIZE;
@@ -1000,6 +1082,9 @@ static int ixgbe_rcv_msg_from_vf(struct ixgbe_adapter *adapter, u32 vf)
 	case IXGBE_VF_GET_QUEUES:
 		retval = ixgbe_get_vf_queues(adapter, msgbuf, vf);
 		break;
+	case IXGBE_VF_SET_MC_PROMISC:
+		retval = ixgbe_set_vf_mc_promisc(adapter, msgbuf, vf);
+		break;
 	default:
 		e_err(drv, "Unhandled Msg %8.8x\n", msgbuf[0]);
 		retval = IXGBE_ERR_MBX;
diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
index 62a0d8e..0403e1d 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
@@ -1880,7 +1880,8 @@ static void ixgbevf_init_last_counter_stats(struct ixgbevf_adapter *adapter)
 static void ixgbevf_negotiate_api(struct ixgbevf_adapter *adapter)
 {
 	struct ixgbe_hw *hw = &adapter->hw;
-	int api[] = { ixgbe_mbox_api_11,
+	int api[] = { ixgbe_mbox_api_12,
+		      ixgbe_mbox_api_11,
 		      ixgbe_mbox_api_10,
 		      ixgbe_mbox_api_unknown };
 	int err = 0, idx = 0;
@@ -1894,6 +1895,12 @@ static void ixgbevf_negotiate_api(struct ixgbevf_adapter *adapter)
 		idx++;
 	}
 
+	dev_info(&adapter->pdev->dev, "mbox api_version = %s\n",
+		(hw->api_version == ixgbe_mbox_api_12) ? "ixgbe_mbox_api_12" :
+		(hw->api_version == ixgbe_mbox_api_11) ? "ixgbe_mbox_api_11" :
+		(hw->api_version == ixgbe_mbox_api_10) ? "ixgbe_mbox_api_10" :
+		"unknown");
+
 	spin_unlock_bh(&adapter->mbx_lock);
 }
 
@@ -2072,6 +2079,9 @@ void ixgbevf_down(struct ixgbevf_adapter *adapter)
 
 	netif_carrier_off(netdev);
 
+	/* drop multicast promiscuous mode flag */
+	adapter->hw.mac.mc_promisc = false;
+
 	if (!pci_channel_offline(adapter->pdev))
 		ixgbevf_reset(adapter);
 
@@ -3525,6 +3535,7 @@ static int ixgbevf_change_mtu(struct net_device *netdev, int new_mtu)
 
 	switch (adapter->hw.api_version) {
 	case ixgbe_mbox_api_11:
+	case ixgbe_mbox_api_12:
 		max_possible_frame = IXGBE_MAX_JUMBO_FRAME_SIZE;
 		break;
 	default:
diff --git a/drivers/net/ethernet/intel/ixgbevf/mbx.h b/drivers/net/ethernet/intel/ixgbevf/mbx.h
index 0bc3005..62ef0d8 100644
--- a/drivers/net/ethernet/intel/ixgbevf/mbx.h
+++ b/drivers/net/ethernet/intel/ixgbevf/mbx.h
@@ -86,6 +86,7 @@ enum ixgbe_pfvf_api_rev {
 	ixgbe_mbox_api_10,	/* API version 1.0, linux/freebsd VF driver */
 	ixgbe_mbox_api_20,	/* API version 2.0, solaris Phase1 VF driver */
 	ixgbe_mbox_api_11,	/* API version 1.1, linux/freebsd VF driver */
+	ixgbe_mbox_api_12,	/* API version 1.2, linux/freebsd VF driver */
 	/* This value should always be last */
 	ixgbe_mbox_api_unknown,	/* indicates that API version is not known */
 };
@@ -104,6 +105,9 @@ enum ixgbe_pfvf_api_rev {
 /* mailbox API, version 1.1 VF requests */
 #define IXGBE_VF_GET_QUEUE	0x09 /* get queue configuration */
 
+/* mailbox API, version 1.2 VF requests */
+#define IXGBE_VF_SET_MC_PROMISC	0x0a /* VF requests PF to set MC promiscuous */
+
 /* GET_QUEUES return data indices within the mailbox */
 #define IXGBE_VF_TX_QUEUES	1	/* number of Tx queues supported */
 #define IXGBE_VF_RX_QUEUES	2	/* number of Rx queues supported */
diff --git a/drivers/net/ethernet/intel/ixgbevf/vf.c b/drivers/net/ethernet/intel/ixgbevf/vf.c
index cdb53be..dfc87b0 100644
--- a/drivers/net/ethernet/intel/ixgbevf/vf.c
+++ b/drivers/net/ethernet/intel/ixgbevf/vf.c
@@ -120,6 +120,9 @@ static s32 ixgbevf_reset_hw_vf(struct ixgbe_hw *hw)
 	memcpy(hw->mac.perm_addr, addr, ETH_ALEN);
 	hw->mac.mc_filter_type = msgbuf[IXGBE_VF_MC_TYPE_WORD];
 
+	/* after reset, MC promiscuous mode is disabled */
+	hw->mac.mc_promisc = false;
+
 	return 0;
 }
 
@@ -327,8 +330,29 @@ static s32 ixgbevf_update_mc_addr_list_vf(struct ixgbe_hw *hw,
 	 */
 
 	cnt = netdev_mc_count(netdev);
-	if (cnt > 30)
+	if (cnt > 30) {
+		/*
+		 * If the API has the capability to handle MC promiscuous
+		 * mode, turn it on.
+		 */
+		if (hw->api_version == ixgbe_mbox_api_12) {
+			if (!hw->mac.mc_promisc) {
+				struct ixgbevf_adapter *adapter = hw->back;
+
+				dev_info(&adapter->pdev->dev, "Request MC PROMISC\n");
+
+				/* enabling multicast promiscuous */
+				msgbuf[0] = IXGBE_VF_SET_MC_PROMISC;
+				msgbuf[1] = 1;
+				ixgbevf_write_msg_read_ack(hw, msgbuf, 2);
+
+				hw->mac.mc_promisc = true;
+			}
+
+			return 0;
+		}
 		cnt = 30;
+	}
 	msgbuf[0] = IXGBE_VF_SET_MULTICAST;
 	msgbuf[0] |= cnt << IXGBE_VT_MSGINFO_SHIFT;
 
@@ -344,6 +368,8 @@ static s32 ixgbevf_update_mc_addr_list_vf(struct ixgbe_hw *hw,
 
 	ixgbevf_write_msg_read_ack(hw, msgbuf, IXGBE_VFMAILBOX_SIZE);
 
+	hw->mac.mc_promisc = false;
+
 	return 0;
 }
 
@@ -545,6 +571,7 @@ int ixgbevf_get_queues(struct ixgbe_hw *hw, unsigned int *num_tcs,
 	/* do nothing if API doesn't support ixgbevf_get_queues */
 	switch (hw->api_version) {
 	case ixgbe_mbox_api_11:
+	case ixgbe_mbox_api_12:
 		break;
 	default:
 		return 0;
diff --git a/drivers/net/ethernet/intel/ixgbevf/vf.h b/drivers/net/ethernet/intel/ixgbevf/vf.h
index 5b17242..97790db 100644
--- a/drivers/net/ethernet/intel/ixgbevf/vf.h
+++ b/drivers/net/ethernet/intel/ixgbevf/vf.h
@@ -87,6 +87,7 @@ struct ixgbe_mac_info {
 	enum ixgbe_mac_type type;
 
 	s32  mc_filter_type;
+	bool mc_promisc;
 
 	bool get_link_status;
 	u32  max_tx_queues;
-- 
1.9.0

ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

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

* RE: [PATCH 1/3] ixgbe, ixgbevf: Add new mbox API to enable MC promiscuous mode
  2015-01-30 11:37 [PATCH 1/3] ixgbe, ixgbevf: Add new mbox API to enable MC promiscuous mode Hiroshi Shimamoto
@ 2015-01-30 22:13 ` Skidmore, Donald C
  2015-02-04 12:57 ` [E1000-devel] " Jeff Kirsher
  1 sibling, 0 replies; 15+ messages in thread
From: Skidmore, Donald C @ 2015-01-30 22:13 UTC (permalink / raw)
  To: Hiroshi Shimamoto, Alexander Duyck, Bjørn Mork
  Cc: e1000-devel, netdev, Choi, Sy Jong, linux-kernel, David Laight,
	Hayato Momma

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 14331 bytes --]

> -----Original Message-----
> From: Hiroshi Shimamoto [mailto:h-shimamoto@ct.jp.nec.com]
> Sent: Friday, January 30, 2015 3:37 AM
> To: Alexander Duyck; Skidmore, Donald C; Bjørn Mork
> Cc: e1000-devel@lists.sourceforge.net; netdev@vger.kernel.org; Choi, Sy
> Jong; linux-kernel@vger.kernel.org; David Laight; Hayato Momma
> Subject: [PATCH 1/3] ixgbe, ixgbevf: Add new mbox API to enable MC
> promiscuous mode
> 
> From: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
> 
> The limitation of the number of multicast address for VF is not enough for
> the large scale server with SR-IOV feature.
> IPv6 requires the multicast MAC address for each IP address to handle the
> Neighbor Solicitation message.
> We couldn't assign over 30 IPv6 addresses to a single VF interface.
> 
> The easy way to solve this is enabling multicast promiscuous mode.
> It is good to have a functionality to enable multicast promiscuous mode for
> each VF from VF driver.
> 
> This patch introduces the new mbox API, IXGBE_VF_SET_MC_PROMISC, to
> enable/disable multicast promiscuous mode in VF. If multicast promiscuous
> mode is enabled the VF can receive all multicast packets.
> 
> With this patch, the ixgbevf driver automatically enable multicast
> promiscuous mode when the number of multicast addresses is over than 30
> if possible.
> 
> This also bump the API version up to 1.2 to check whether the API,
> IXGBE_VF_SET_MC_PROMISC is available.
> 
> Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
> Reviewed-by: Hayato Momma <h-momma@ce.jp.nec.com>
> CC: Choi, Sy Jong <sy.jong.choi@intel.com>
> ---
>  drivers/net/ethernet/intel/ixgbe/ixgbe.h          |  1 +
>  drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h      |  4 +
>  drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c    | 89
> ++++++++++++++++++++++-
>  drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 13 +++-
>  drivers/net/ethernet/intel/ixgbevf/mbx.h          |  4 +
>  drivers/net/ethernet/intel/ixgbevf/vf.c           | 29 +++++++-
>  drivers/net/ethernet/intel/ixgbevf/vf.h           |  1 +
>  7 files changed, 137 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe.h
> b/drivers/net/ethernet/intel/ixgbe/ixgbe.h
> index b6137be..bf3333e 100644
> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe.h
> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe.h
> @@ -144,6 +144,7 @@ struct vf_data_storage {
>  	u16 vlans_enabled;
>  	bool clear_to_send;
>  	bool pf_set_mac;
> +	bool mc_promisc;
>  	u16 pf_vlan; /* When set, guest VLAN config not allowed. */
>  	u16 pf_qos;
>  	u16 tx_rate;
> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h
> b/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h
> index a5cb755..2963557 100644
> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h
> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h
> @@ -73,6 +73,7 @@ enum ixgbe_pfvf_api_rev {
>  	ixgbe_mbox_api_10,	/* API version 1.0, linux/freebsd VF driver */
>  	ixgbe_mbox_api_20,	/* API version 2.0, solaris Phase1 VF driver */
>  	ixgbe_mbox_api_11,	/* API version 1.1, linux/freebsd VF driver */
> +	ixgbe_mbox_api_12,	/* API version 1.2, linux/freebsd VF driver */
>  	/* This value should always be last */
>  	ixgbe_mbox_api_unknown,	/* indicates that API version is not
> known */
>  };
> @@ -91,6 +92,9 @@ enum ixgbe_pfvf_api_rev {
>  /* mailbox API, version 1.1 VF requests */
>  #define IXGBE_VF_GET_QUEUES	0x09 /* get queue configuration */
> 
> +/* mailbox API, version 1.2 VF requests */
> +#define IXGBE_VF_SET_MC_PROMISC	0x0a /* VF requests PF to set
> MC promiscuous */
> +
>  /* GET_QUEUES return data indices within the mailbox */
>  #define IXGBE_VF_TX_QUEUES	1	/* number of Tx queues
> supported */
>  #define IXGBE_VF_RX_QUEUES	2	/* number of Rx queues
> supported */
> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
> b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
> index c76ba90..c19b7b8 100644
> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
> @@ -108,9 +108,12 @@ static int __ixgbe_enable_sriov(struct ixgbe_adapter
> *adapter)
>  		adapter->flags2 &= ~(IXGBE_FLAG2_RSC_CAPABLE |
>  				     IXGBE_FLAG2_RSC_ENABLED);
> 
> -		/* enable spoof checking for all VFs */
> -		for (i = 0; i < adapter->num_vfs; i++)
> +		for (i = 0; i < adapter->num_vfs; i++) {
> +			/* Enable spoof checking for all VFs */
>  			adapter->vfinfo[i].spoofchk_enabled = true;
> +			/* Turn multicast promiscuous mode off for all VFs */
> +			adapter->vfinfo[i].mc_promisc = false;
> +		}
>  		return 0;
>  	}
> 
> @@ -311,6 +314,40 @@ int ixgbe_pci_sriov_configure(struct pci_dev *dev,
> int num_vfs)
>  		return ixgbe_pci_sriov_enable(dev, num_vfs);  }
> 
> +static int ixgbe_enable_vf_mc_promisc(struct ixgbe_adapter *adapter,
> +u32 vf) {
> +	struct ixgbe_hw *hw;
> +	u32 vmolr;
> +
> +	hw = &adapter->hw;
> +	vmolr = IXGBE_READ_REG(hw, IXGBE_VMOLR(vf));
> +
> +	e_info(drv, "VF %u: enabling multicast promiscuous\n", vf);
> +
> +	vmolr |= IXGBE_VMOLR_MPE;
> +
> +	IXGBE_WRITE_REG(hw, IXGBE_VMOLR(vf), vmolr);
> +
> +	return 0;
> +}
> +
> +static int ixgbe_disable_vf_mc_promisc(struct ixgbe_adapter *adapter,
> +u32 vf) {
> +	struct ixgbe_hw *hw;
> +	u32 vmolr;
> +
> +	hw = &adapter->hw;
> +	vmolr = IXGBE_READ_REG(hw, IXGBE_VMOLR(vf));
> +
> +	e_info(drv, "VF %u: disabling multicast promiscuous\n", vf);
> +
> +	vmolr &= ~IXGBE_VMOLR_MPE;
> +
> +	IXGBE_WRITE_REG(hw, IXGBE_VMOLR(vf), vmolr);
> +
> +	return 0;
> +}
> +
>  static int ixgbe_set_vf_multicasts(struct ixgbe_adapter *adapter,
>  				   u32 *msgbuf, u32 vf)
>  {
> @@ -325,6 +362,12 @@ static int ixgbe_set_vf_multicasts(struct
> ixgbe_adapter *adapter,
>  	u32 mta_reg;
>  	u32 vmolr = IXGBE_READ_REG(hw, IXGBE_VMOLR(vf));
> 
> +	/* Disable multicast promiscuous first */
> +	if (adapter->vfinfo[vf].mc_promisc) {
> +		ixgbe_disable_vf_mc_promisc(adapter, vf);
> +		adapter->vfinfo[vf].mc_promisc = false;
> +	}
> +
>  	/* only so many hash values supported */
>  	entries = min(entries, IXGBE_MAX_VF_MC_ENTRIES);
> 
> @@ -427,6 +470,7 @@ static s32 ixgbe_set_vf_lpe(struct ixgbe_adapter
> *adapter, u32 *msgbuf, u32 vf)  #endif /* CONFIG_FCOE */
>  		switch (adapter->vfinfo[vf].vf_api) {
>  		case ixgbe_mbox_api_11:
> +		case ixgbe_mbox_api_12:
>  			/*
>  			 * Version 1.1 supports jumbo frames on VFs if PF has
>  			 * jumbo frames enabled which means legacy VFs are
> @@ -710,6 +754,12 @@ static int ixgbe_vf_reset_msg(struct ixgbe_adapter
> *adapter, u32 vf)
>  		IXGBE_WRITE_REG(hw, IXGBE_PVFTDWBALn(q_per_pool,
> vf, i), 0);
>  	}
> 
> +	/* Disable multicast promiscuous at reset */
> +	if (adapter->vfinfo[vf].mc_promisc) {
> +		ixgbe_disable_vf_mc_promisc(adapter, vf);
> +		adapter->vfinfo[vf].mc_promisc = false;
> +	}
> +
>  	/* reply to reset with ack and vf mac address */
>  	msgbuf[0] = IXGBE_VF_RESET;
>  	if (!is_zero_ether_addr(vf_mac)) {
> @@ -894,6 +944,12 @@ static int ixgbe_negotiate_vf_api(struct
> ixgbe_adapter *adapter,
>  	switch (api) {
>  	case ixgbe_mbox_api_10:
>  	case ixgbe_mbox_api_11:
> +	case ixgbe_mbox_api_12:
> +		e_info(drv, "VF %d requested api_version %s\n", vf,
> +			(api == ixgbe_mbox_api_12) ? "ixgbe_mbox_api_12"
> :
> +			(api == ixgbe_mbox_api_11) ? "ixgbe_mbox_api_11"
> :
> +			(api == ixgbe_mbox_api_10) ? "ixgbe_mbox_api_10"
> :
> +			"unknown");
>  		adapter->vfinfo[vf].vf_api = api;
>  		return 0;
>  	default:
> @@ -917,6 +973,7 @@ static int ixgbe_get_vf_queues(struct ixgbe_adapter
> *adapter,
>  	switch (adapter->vfinfo[vf].vf_api) {
>  	case ixgbe_mbox_api_20:
>  	case ixgbe_mbox_api_11:
> +	case ixgbe_mbox_api_12:
>  		break;
>  	default:
>  		return -1;
> @@ -944,6 +1001,31 @@ static int ixgbe_get_vf_queues(struct
> ixgbe_adapter *adapter,
>  	return 0;
>  }
> 
> +static int ixgbe_set_vf_mc_promisc(struct ixgbe_adapter *adapter,
> +				   u32 *msgbuf, u32 vf)
> +{
> +	bool enable = !!msgbuf[1];	/* msgbuf contains the flag to enable
> */
> +
> +	switch (adapter->vfinfo[vf].vf_api) {
> +	case ixgbe_mbox_api_12:
> +		break;
> +	default:
> +		return -1;
> +	}
> +
> +	/* nothing to do */
> +	if (adapter->vfinfo[vf].mc_promisc == enable)
> +		return 0;
> +
> +	adapter->vfinfo[vf].mc_promisc = enable;
> +
> +	if (enable)
> +		return ixgbe_enable_vf_mc_promisc(adapter, vf);
> +	else
> +		return ixgbe_disable_vf_mc_promisc(adapter, vf); }
> +
> +
>  static int ixgbe_rcv_msg_from_vf(struct ixgbe_adapter *adapter, u32 vf)  {
>  	u32 mbx_size = IXGBE_VFMAILBOX_SIZE;
> @@ -1000,6 +1082,9 @@ static int ixgbe_rcv_msg_from_vf(struct
> ixgbe_adapter *adapter, u32 vf)
>  	case IXGBE_VF_GET_QUEUES:
>  		retval = ixgbe_get_vf_queues(adapter, msgbuf, vf);
>  		break;
> +	case IXGBE_VF_SET_MC_PROMISC:
> +		retval = ixgbe_set_vf_mc_promisc(adapter, msgbuf, vf);
> +		break;
>  	default:
>  		e_err(drv, "Unhandled Msg %8.8x\n", msgbuf[0]);
>  		retval = IXGBE_ERR_MBX;
> diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
> b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
> index 62a0d8e..0403e1d 100644
> --- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
> +++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
> @@ -1880,7 +1880,8 @@ static void ixgbevf_init_last_counter_stats(struct
> ixgbevf_adapter *adapter)  static void ixgbevf_negotiate_api(struct
> ixgbevf_adapter *adapter)  {
>  	struct ixgbe_hw *hw = &adapter->hw;
> -	int api[] = { ixgbe_mbox_api_11,
> +	int api[] = { ixgbe_mbox_api_12,
> +		      ixgbe_mbox_api_11,
>  		      ixgbe_mbox_api_10,
>  		      ixgbe_mbox_api_unknown };
>  	int err = 0, idx = 0;
> @@ -1894,6 +1895,12 @@ static void ixgbevf_negotiate_api(struct
> ixgbevf_adapter *adapter)
>  		idx++;
>  	}
> 
> +	dev_info(&adapter->pdev->dev, "mbox api_version = %s\n",
> +		(hw->api_version == ixgbe_mbox_api_12) ?
> "ixgbe_mbox_api_12" :
> +		(hw->api_version == ixgbe_mbox_api_11) ?
> "ixgbe_mbox_api_11" :
> +		(hw->api_version == ixgbe_mbox_api_10) ?
> "ixgbe_mbox_api_10" :
> +		"unknown");
> +
>  	spin_unlock_bh(&adapter->mbx_lock);
>  }
> 
> @@ -2072,6 +2079,9 @@ void ixgbevf_down(struct ixgbevf_adapter
> *adapter)
> 
>  	netif_carrier_off(netdev);
> 
> +	/* drop multicast promiscuous mode flag */
> +	adapter->hw.mac.mc_promisc = false;
> +
>  	if (!pci_channel_offline(adapter->pdev))
>  		ixgbevf_reset(adapter);
> 
> @@ -3525,6 +3535,7 @@ static int ixgbevf_change_mtu(struct net_device
> *netdev, int new_mtu)
> 
>  	switch (adapter->hw.api_version) {
>  	case ixgbe_mbox_api_11:
> +	case ixgbe_mbox_api_12:
>  		max_possible_frame = IXGBE_MAX_JUMBO_FRAME_SIZE;
>  		break;
>  	default:
> diff --git a/drivers/net/ethernet/intel/ixgbevf/mbx.h
> b/drivers/net/ethernet/intel/ixgbevf/mbx.h
> index 0bc3005..62ef0d8 100644
> --- a/drivers/net/ethernet/intel/ixgbevf/mbx.h
> +++ b/drivers/net/ethernet/intel/ixgbevf/mbx.h
> @@ -86,6 +86,7 @@ enum ixgbe_pfvf_api_rev {
>  	ixgbe_mbox_api_10,	/* API version 1.0, linux/freebsd VF driver */
>  	ixgbe_mbox_api_20,	/* API version 2.0, solaris Phase1 VF driver */
>  	ixgbe_mbox_api_11,	/* API version 1.1, linux/freebsd VF driver */
> +	ixgbe_mbox_api_12,	/* API version 1.2, linux/freebsd VF driver */
>  	/* This value should always be last */
>  	ixgbe_mbox_api_unknown,	/* indicates that API version is not
> known */
>  };
> @@ -104,6 +105,9 @@ enum ixgbe_pfvf_api_rev {
>  /* mailbox API, version 1.1 VF requests */
>  #define IXGBE_VF_GET_QUEUE	0x09 /* get queue configuration */
> 
> +/* mailbox API, version 1.2 VF requests */
> +#define IXGBE_VF_SET_MC_PROMISC	0x0a /* VF requests PF to set
> MC promiscuous */
> +
>  /* GET_QUEUES return data indices within the mailbox */
>  #define IXGBE_VF_TX_QUEUES	1	/* number of Tx queues
> supported */
>  #define IXGBE_VF_RX_QUEUES	2	/* number of Rx queues
> supported */
> diff --git a/drivers/net/ethernet/intel/ixgbevf/vf.c
> b/drivers/net/ethernet/intel/ixgbevf/vf.c
> index cdb53be..dfc87b0 100644
> --- a/drivers/net/ethernet/intel/ixgbevf/vf.c
> +++ b/drivers/net/ethernet/intel/ixgbevf/vf.c
> @@ -120,6 +120,9 @@ static s32 ixgbevf_reset_hw_vf(struct ixgbe_hw *hw)
>  	memcpy(hw->mac.perm_addr, addr, ETH_ALEN);
>  	hw->mac.mc_filter_type = msgbuf[IXGBE_VF_MC_TYPE_WORD];
> 
> +	/* after reset, MC promiscuous mode is disabled */
> +	hw->mac.mc_promisc = false;
> +
>  	return 0;
>  }
> 
> @@ -327,8 +330,29 @@ static s32 ixgbevf_update_mc_addr_list_vf(struct
> ixgbe_hw *hw,
>  	 */
> 
>  	cnt = netdev_mc_count(netdev);
> -	if (cnt > 30)
> +	if (cnt > 30) {
> +		/*
> +		 * If the API has the capability to handle MC promiscuous
> +		 * mode, turn it on.
> +		 */
> +		if (hw->api_version == ixgbe_mbox_api_12) {
> +			if (!hw->mac.mc_promisc) {
> +				struct ixgbevf_adapter *adapter = hw->back;
> +
> +				dev_info(&adapter->pdev->dev, "Request
> MC PROMISC\n");
> +
> +				/* enabling multicast promiscuous */
> +				msgbuf[0] = IXGBE_VF_SET_MC_PROMISC;
> +				msgbuf[1] = 1;
> +				ixgbevf_write_msg_read_ack(hw, msgbuf,
> 2);
> +
> +				hw->mac.mc_promisc = true;
> +			}
> +
> +			return 0;
> +		}
>  		cnt = 30;
> +	}
>  	msgbuf[0] = IXGBE_VF_SET_MULTICAST;
>  	msgbuf[0] |= cnt << IXGBE_VT_MSGINFO_SHIFT;
> 
> @@ -344,6 +368,8 @@ static s32 ixgbevf_update_mc_addr_list_vf(struct
> ixgbe_hw *hw,
> 
>  	ixgbevf_write_msg_read_ack(hw, msgbuf,
> IXGBE_VFMAILBOX_SIZE);
> 
> +	hw->mac.mc_promisc = false;
> +
>  	return 0;
>  }
> 
> @@ -545,6 +571,7 @@ int ixgbevf_get_queues(struct ixgbe_hw *hw,
> unsigned int *num_tcs,
>  	/* do nothing if API doesn't support ixgbevf_get_queues */
>  	switch (hw->api_version) {
>  	case ixgbe_mbox_api_11:
> +	case ixgbe_mbox_api_12:
>  		break;
>  	default:
>  		return 0;
> diff --git a/drivers/net/ethernet/intel/ixgbevf/vf.h
> b/drivers/net/ethernet/intel/ixgbevf/vf.h
> index 5b17242..97790db 100644
> --- a/drivers/net/ethernet/intel/ixgbevf/vf.h
> +++ b/drivers/net/ethernet/intel/ixgbevf/vf.h
> @@ -87,6 +87,7 @@ struct ixgbe_mac_info {
>  	enum ixgbe_mac_type type;
> 
>  	s32  mc_filter_type;
> +	bool mc_promisc;
> 
>  	bool get_link_status;
>  	u32  max_tx_queues;
> --
> 1.9.0

Thanks Hiroshi,

>From a quick glance this looks good.  Jeff will pull this into his queue so we can test it out.

-Don Skidmore <donald.c.skidmore@intel.com>
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

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

* Re: [E1000-devel] [PATCH 1/3] ixgbe, ixgbevf: Add new mbox API to enable MC promiscuous mode
  2015-01-30 11:37 [PATCH 1/3] ixgbe, ixgbevf: Add new mbox API to enable MC promiscuous mode Hiroshi Shimamoto
  2015-01-30 22:13 ` Skidmore, Donald C
@ 2015-02-04 12:57 ` Jeff Kirsher
  2015-02-05  6:10   ` Hiroshi Shimamoto
  2015-02-09  6:59   ` Hiroshi Shimamoto
  1 sibling, 2 replies; 15+ messages in thread
From: Jeff Kirsher @ 2015-02-04 12:57 UTC (permalink / raw)
  To: Hiroshi Shimamoto
  Cc: Alexander Duyck, Skidmore, Donald C, Bjørn Mork,
	e1000-devel, netdev, Choi, Sy Jong, linux-kernel, David Laight,
	Hayato Momma

[-- Attachment #1: Type: text/plain, Size: 2305 bytes --]

On Fri, 2015-01-30 at 11:37 +0000, Hiroshi Shimamoto wrote:
> From: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
> 
> The limitation of the number of multicast address for VF is not enough
> for the large scale server with SR-IOV feature.
> IPv6 requires the multicast MAC address for each IP address to handle
> the Neighbor Solicitation message.
> We couldn't assign over 30 IPv6 addresses to a single VF interface.
> 
> The easy way to solve this is enabling multicast promiscuous mode.
> It is good to have a functionality to enable multicast promiscuous
> mode
> for each VF from VF driver.
> 
> This patch introduces the new mbox API, IXGBE_VF_SET_MC_PROMISC, to
> enable/disable multicast promiscuous mode in VF. If multicast
> promiscuous
> mode is enabled the VF can receive all multicast packets.
> 
> With this patch, the ixgbevf driver automatically enable multicast
> promiscuous mode when the number of multicast addresses is over than
> 30
> if possible.
> 
> This also bump the API version up to 1.2 to check whether the API,
> IXGBE_VF_SET_MC_PROMISC is available.
> 
> Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
> Reviewed-by: Hayato Momma <h-momma@ce.jp.nec.com>
> CC: Choi, Sy Jong <sy.jong.choi@intel.com>
> ---
>  drivers/net/ethernet/intel/ixgbe/ixgbe.h          |  1 +
>  drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h      |  4 +
>  drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c    | 89
> ++++++++++++++++++++++-
>  drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 13 +++-
>  drivers/net/ethernet/intel/ixgbevf/mbx.h          |  4 +
>  drivers/net/ethernet/intel/ixgbevf/vf.c           | 29 +++++++-
>  drivers/net/ethernet/intel/ixgbevf/vf.h           |  1 +
>  7 files changed, 137 insertions(+), 4 deletions(-)

Hiroshi, I tried to apply your patches to my queue but they do not apply
cleanly and they are in a DOS file format, not UNIX.  I also noted
several checkpatch.pl issues with your patches, so please fix those up
as well.

Can you please fix up your patches based on my tree:
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/queue.git

This my queue of all community patches against the Intel LAN drivers and
will be where I queue up your patches while they are under review and
testing.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* RE: [E1000-devel] [PATCH 1/3] ixgbe, ixgbevf: Add new mbox API to enable MC promiscuous mode
  2015-02-04 12:57 ` [E1000-devel] " Jeff Kirsher
@ 2015-02-05  6:10   ` Hiroshi Shimamoto
  2015-02-09  6:59   ` Hiroshi Shimamoto
  1 sibling, 0 replies; 15+ messages in thread
From: Hiroshi Shimamoto @ 2015-02-05  6:10 UTC (permalink / raw)
  To: Jeff Kirsher
  Cc: Alexander Duyck, Skidmore, Donald C, Bjørn Mork,
	e1000-devel, netdev, Choi, Sy Jong, linux-kernel, David Laight,
	Hayato Momma

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 2740 bytes --]

> Subject: Re: [E1000-devel] [PATCH 1/3] ixgbe, ixgbevf: Add new mbox API to enable MC promiscuous mode
> 
> On Fri, 2015-01-30 at 11:37 +0000, Hiroshi Shimamoto wrote:
> > From: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
> >
> > The limitation of the number of multicast address for VF is not enough
> > for the large scale server with SR-IOV feature.
> > IPv6 requires the multicast MAC address for each IP address to handle
> > the Neighbor Solicitation message.
> > We couldn't assign over 30 IPv6 addresses to a single VF interface.
> >
> > The easy way to solve this is enabling multicast promiscuous mode.
> > It is good to have a functionality to enable multicast promiscuous
> > mode
> > for each VF from VF driver.
> >
> > This patch introduces the new mbox API, IXGBE_VF_SET_MC_PROMISC, to
> > enable/disable multicast promiscuous mode in VF. If multicast
> > promiscuous
> > mode is enabled the VF can receive all multicast packets.
> >
> > With this patch, the ixgbevf driver automatically enable multicast
> > promiscuous mode when the number of multicast addresses is over than
> > 30
> > if possible.
> >
> > This also bump the API version up to 1.2 to check whether the API,
> > IXGBE_VF_SET_MC_PROMISC is available.
> >
> > Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
> > Reviewed-by: Hayato Momma <h-momma@ce.jp.nec.com>
> > CC: Choi, Sy Jong <sy.jong.choi@intel.com>
> > ---
> >  drivers/net/ethernet/intel/ixgbe/ixgbe.h          |  1 +
> >  drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h      |  4 +
> >  drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c    | 89
> > ++++++++++++++++++++++-
> >  drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 13 +++-
> >  drivers/net/ethernet/intel/ixgbevf/mbx.h          |  4 +
> >  drivers/net/ethernet/intel/ixgbevf/vf.c           | 29 +++++++-
> >  drivers/net/ethernet/intel/ixgbevf/vf.h           |  1 +
> >  7 files changed, 137 insertions(+), 4 deletions(-)
> 
> Hiroshi, I tried to apply your patches to my queue but they do not apply
> cleanly and they are in a DOS file format, not UNIX.  I also noted
> several checkpatch.pl issues with your patches, so please fix those up
> as well.

I'm sorry to bother you.
Will fix.

> 
> Can you please fix up your patches based on my tree:
> git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/queue.git

Yes. I haven't noticed your tree.
Will resend patches against it.

thanks,
Hiroshi

> 
> This my queue of all community patches against the Intel LAN drivers and
> will be where I queue up your patches while they are under review and
> testing.
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

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

* RE: [E1000-devel] [PATCH 1/3] ixgbe, ixgbevf: Add new mbox API to enable MC promiscuous mode
  2015-02-04 12:57 ` [E1000-devel] " Jeff Kirsher
  2015-02-05  6:10   ` Hiroshi Shimamoto
@ 2015-02-09  6:59   ` Hiroshi Shimamoto
  2015-02-09  8:20     ` Jeff Kirsher
  1 sibling, 1 reply; 15+ messages in thread
From: Hiroshi Shimamoto @ 2015-02-09  6:59 UTC (permalink / raw)
  To: Jeff Kirsher
  Cc: Alexander Duyck, Skidmore, Donald C, Bjørn Mork,
	e1000-devel, netdev, Choi, Sy Jong, linux-kernel, David Laight,
	Hayato Momma

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 3646 bytes --]

> > Subject: Re: [E1000-devel] [PATCH 1/3] ixgbe, ixgbevf: Add new mbox API to enable MC promiscuous mode
> >
> > On Fri, 2015-01-30 at 11:37 +0000, Hiroshi Shimamoto wrote:
> > > From: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
> > >
> > > The limitation of the number of multicast address for VF is not enough
> > > for the large scale server with SR-IOV feature.
> > > IPv6 requires the multicast MAC address for each IP address to handle
> > > the Neighbor Solicitation message.
> > > We couldn't assign over 30 IPv6 addresses to a single VF interface.
> > >
> > > The easy way to solve this is enabling multicast promiscuous mode.
> > > It is good to have a functionality to enable multicast promiscuous
> > > mode
> > > for each VF from VF driver.
> > >
> > > This patch introduces the new mbox API, IXGBE_VF_SET_MC_PROMISC, to
> > > enable/disable multicast promiscuous mode in VF. If multicast
> > > promiscuous
> > > mode is enabled the VF can receive all multicast packets.
> > >
> > > With this patch, the ixgbevf driver automatically enable multicast
> > > promiscuous mode when the number of multicast addresses is over than
> > > 30
> > > if possible.
> > >
> > > This also bump the API version up to 1.2 to check whether the API,
> > > IXGBE_VF_SET_MC_PROMISC is available.
> > >
> > > Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
> > > Reviewed-by: Hayato Momma <h-momma@ce.jp.nec.com>
> > > CC: Choi, Sy Jong <sy.jong.choi@intel.com>
> > > ---
> > >  drivers/net/ethernet/intel/ixgbe/ixgbe.h          |  1 +
> > >  drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h      |  4 +
> > >  drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c    | 89
> > > ++++++++++++++++++++++-
> > >  drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 13 +++-
> > >  drivers/net/ethernet/intel/ixgbevf/mbx.h          |  4 +
> > >  drivers/net/ethernet/intel/ixgbevf/vf.c           | 29 +++++++-
> > >  drivers/net/ethernet/intel/ixgbevf/vf.h           |  1 +
> > >  7 files changed, 137 insertions(+), 4 deletions(-)
> >
> > Hiroshi, I tried to apply your patches to my queue but they do not apply
> > cleanly and they are in a DOS file format, not UNIX.  I also noted
> > several checkpatch.pl issues with your patches, so please fix those up
> > as well.
> 
> I'm sorry to bother you.
> Will fix.
> 
> >
> > Can you please fix up your patches based on my tree:
> > git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/queue.git
> 
> Yes. I haven't noticed your tree.
> Will resend patches against it.
> 

I encountered an issue with your tree, the commit id is below.

$ git log | head
commit e6f1649780f8f5a87299bf6af04453f93d1e3d5e
Author: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Date:   Fri Jan 23 20:43:14 2015 -0800

    ethernet: fm10k: Actually drop 4 bits

    The comment explains the intention, but vid has type u16. Before the
    inner shift, it is promoted to int, which has plenty of space for all
    vid's bits, so nothing is dropped. Use a simple mask instead.


I use the kernel from your tree in both host and guest.

Assign an IPv6 for VF in guest.
# ip -6 addr add 2001:db8::18:1/64 dev ens0

Send ping packet from other server to the VM.
# ping6  2001:db8::18:1 -I eth0

The following message was shown.
ixgbevf 0000:00:08.0: partial checksum but l4 proto=3a!

If I did the same operation in the host, I saw the same error message in host too.
ixgbe 0000:2d:00.0: partial checksum but l4 proto=3a!

Do you have any idea about that?

thanks,
Hiroshi
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

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

* Re: [E1000-devel] [PATCH 1/3] ixgbe, ixgbevf: Add new mbox API to enable MC promiscuous mode
  2015-02-09  6:59   ` Hiroshi Shimamoto
@ 2015-02-09  8:20     ` Jeff Kirsher
  2015-02-10  2:28       ` Hiroshi Shimamoto
  0 siblings, 1 reply; 15+ messages in thread
From: Jeff Kirsher @ 2015-02-09  8:20 UTC (permalink / raw)
  To: Hiroshi Shimamoto
  Cc: Alexander Duyck, Skidmore, Donald C, Bjørn Mork,
	e1000-devel, netdev, Choi, Sy Jong, linux-kernel, David Laight,
	Hayato Momma

[-- Attachment #1: Type: text/plain, Size: 4096 bytes --]

On Mon, 2015-02-09 at 06:59 +0000, Hiroshi Shimamoto wrote:
> > > Subject: Re: [E1000-devel] [PATCH 1/3] ixgbe, ixgbevf: Add new mbox API to enable MC promiscuous mode
> > >
> > > On Fri, 2015-01-30 at 11:37 +0000, Hiroshi Shimamoto wrote:
> > > > From: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
> > > >
> > > > The limitation of the number of multicast address for VF is not enough
> > > > for the large scale server with SR-IOV feature.
> > > > IPv6 requires the multicast MAC address for each IP address to handle
> > > > the Neighbor Solicitation message.
> > > > We couldn't assign over 30 IPv6 addresses to a single VF interface.
> > > >
> > > > The easy way to solve this is enabling multicast promiscuous mode.
> > > > It is good to have a functionality to enable multicast promiscuous
> > > > mode
> > > > for each VF from VF driver.
> > > >
> > > > This patch introduces the new mbox API, IXGBE_VF_SET_MC_PROMISC, to
> > > > enable/disable multicast promiscuous mode in VF. If multicast
> > > > promiscuous
> > > > mode is enabled the VF can receive all multicast packets.
> > > >
> > > > With this patch, the ixgbevf driver automatically enable multicast
> > > > promiscuous mode when the number of multicast addresses is over than
> > > > 30
> > > > if possible.
> > > >
> > > > This also bump the API version up to 1.2 to check whether the API,
> > > > IXGBE_VF_SET_MC_PROMISC is available.
> > > >
> > > > Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
> > > > Reviewed-by: Hayato Momma <h-momma@ce.jp.nec.com>
> > > > CC: Choi, Sy Jong <sy.jong.choi@intel.com>
> > > > ---
> > > >  drivers/net/ethernet/intel/ixgbe/ixgbe.h          |  1 +
> > > >  drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h      |  4 +
> > > >  drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c    | 89
> > > > ++++++++++++++++++++++-
> > > >  drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 13 +++-
> > > >  drivers/net/ethernet/intel/ixgbevf/mbx.h          |  4 +
> > > >  drivers/net/ethernet/intel/ixgbevf/vf.c           | 29 +++++++-
> > > >  drivers/net/ethernet/intel/ixgbevf/vf.h           |  1 +
> > > >  7 files changed, 137 insertions(+), 4 deletions(-)
> > >
> > > Hiroshi, I tried to apply your patches to my queue but they do not apply
> > > cleanly and they are in a DOS file format, not UNIX.  I also noted
> > > several checkpatch.pl issues with your patches, so please fix those up
> > > as well.
> > 
> > I'm sorry to bother you.
> > Will fix.
> > 
> > >
> > > Can you please fix up your patches based on my tree:
> > > git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/queue.git
> > 
> > Yes. I haven't noticed your tree.
> > Will resend patches against it.
> > 
> 
> I encountered an issue with your tree, the commit id is below.
> 
> $ git log | head
> commit e6f1649780f8f5a87299bf6af04453f93d1e3d5e
> Author: Rasmus Villemoes <linux@rasmusvillemoes.dk>
> Date:   Fri Jan 23 20:43:14 2015 -0800
> 
>     ethernet: fm10k: Actually drop 4 bits
> 
>     The comment explains the intention, but vid has type u16. Before the
>     inner shift, it is promoted to int, which has plenty of space for all
>     vid's bits, so nothing is dropped. Use a simple mask instead.
> 
> 
> I use the kernel from your tree in both host and guest.
> 
> Assign an IPv6 for VF in guest.
> # ip -6 addr add 2001:db8::18:1/64 dev ens0
> 
> Send ping packet from other server to the VM.
> # ping6  2001:db8::18:1 -I eth0
> 
> The following message was shown.
> ixgbevf 0000:00:08.0: partial checksum but l4 proto=3a!
> 
> If I did the same operation in the host, I saw the same error message in host too.
> ixgbe 0000:2d:00.0: partial checksum but l4 proto=3a!
> 
> Do you have any idea about that?

Ah, sorry about that, try this tree again:
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/queue.git

That patch was dropped for favor of a patch that Matthew Vick put
together (and recently got pushed upstream).  So my queue no longer has
that patch in the queue, since it got dropped.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* RE: [E1000-devel] [PATCH 1/3] ixgbe, ixgbevf: Add new mbox API to enable MC promiscuous mode
  2015-02-09  8:20     ` Jeff Kirsher
@ 2015-02-10  2:28       ` Hiroshi Shimamoto
  2015-02-11 22:59         ` Skidmore, Donald C
  0 siblings, 1 reply; 15+ messages in thread
From: Hiroshi Shimamoto @ 2015-02-10  2:28 UTC (permalink / raw)
  To: Jeff Kirsher
  Cc: Alexander Duyck, Skidmore, Donald C, Bjørn Mork,
	e1000-devel, netdev, Choi, Sy Jong, linux-kernel, David Laight,
	Hayato Momma

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 2061 bytes --]

> > > > Can you please fix up your patches based on my tree:
> > > > git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/queue.git
> > >
> > > Yes. I haven't noticed your tree.
> > > Will resend patches against it.
> > >
> >
> > I encountered an issue with your tree, the commit id is below.
> >
> > $ git log | head
> > commit e6f1649780f8f5a87299bf6af04453f93d1e3d5e
> > Author: Rasmus Villemoes <linux@rasmusvillemoes.dk>
> > Date:   Fri Jan 23 20:43:14 2015 -0800
> >
> >     ethernet: fm10k: Actually drop 4 bits
> >
> >     The comment explains the intention, but vid has type u16. Before the
> >     inner shift, it is promoted to int, which has plenty of space for all
> >     vid's bits, so nothing is dropped. Use a simple mask instead.
> >
> >
> > I use the kernel from your tree in both host and guest.
> >
> > Assign an IPv6 for VF in guest.
> > # ip -6 addr add 2001:db8::18:1/64 dev ens0
> >
> > Send ping packet from other server to the VM.
> > # ping6  2001:db8::18:1 -I eth0
> >
> > The following message was shown.
> > ixgbevf 0000:00:08.0: partial checksum but l4 proto=3a!
> >
> > If I did the same operation in the host, I saw the same error message in host too.
> > ixgbe 0000:2d:00.0: partial checksum but l4 proto=3a!
> >
> > Do you have any idea about that?
> 
> Ah, sorry about that, try this tree again:
> git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/queue.git
> 
> That patch was dropped for favor of a patch that Matthew Vick put
> together (and recently got pushed upstream).  So my queue no longer has
> that patch in the queue, since it got dropped.

I still see the same error, the head id is the below

$ git log | head
commit a072afb0b45904022b76deef3b770ee9a93cb13a
Author: Nicholas Krause <xerofoify@gmail.com>
Date:   Mon Feb 9 00:27:00 2015 -0800

    igb: Remove outdated fix me comment in the function,gb_acquire_swfw_sync_i210


thanks,
Hiroshi
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

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

* RE: [E1000-devel] [PATCH 1/3] ixgbe, ixgbevf: Add new mbox API to enable MC promiscuous mode
  2015-02-10  2:28       ` Hiroshi Shimamoto
@ 2015-02-11 22:59         ` Skidmore, Donald C
  2015-02-11 23:33           ` Hiroshi Shimamoto
  2015-02-13  4:44           ` Hiroshi Shimamoto
  0 siblings, 2 replies; 15+ messages in thread
From: Skidmore, Donald C @ 2015-02-11 22:59 UTC (permalink / raw)
  To: Hiroshi Shimamoto, Kirsher, Jeffrey T
  Cc: Alexander Duyck, Bjørn Mork, e1000-devel, netdev, Choi,
	Sy Jong, linux-kernel, David Laight, Hayato Momma

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 2826 bytes --]

> -----Original Message-----
> From: Hiroshi Shimamoto [mailto:h-shimamoto@ct.jp.nec.com]
> Sent: Monday, February 09, 2015 6:29 PM
> To: Kirsher, Jeffrey T
> Cc: Alexander Duyck; Skidmore, Donald C; Bjørn Mork; e1000-
> devel@lists.sourceforge.net; netdev@vger.kernel.org; Choi, Sy Jong; linux-
> kernel@vger.kernel.org; David Laight; Hayato Momma
> Subject: RE: [E1000-devel] [PATCH 1/3] ixgbe, ixgbevf: Add new mbox API to
> enable MC promiscuous mode
> 
> > > > > Can you please fix up your patches based on my tree:
> > > > > git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/queue.git
> > > >
> > > > Yes. I haven't noticed your tree.
> > > > Will resend patches against it.
> > > >
> > >
> > > I encountered an issue with your tree, the commit id is below.
> > >
> > > $ git log | head
> > > commit e6f1649780f8f5a87299bf6af04453f93d1e3d5e
> > > Author: Rasmus Villemoes <linux@rasmusvillemoes.dk>
> > > Date:   Fri Jan 23 20:43:14 2015 -0800
> > >
> > >     ethernet: fm10k: Actually drop 4 bits
> > >
> > >     The comment explains the intention, but vid has type u16. Before the
> > >     inner shift, it is promoted to int, which has plenty of space for all
> > >     vid's bits, so nothing is dropped. Use a simple mask instead.
> > >
> > >
> > > I use the kernel from your tree in both host and guest.
> > >
> > > Assign an IPv6 for VF in guest.
> > > # ip -6 addr add 2001:db8::18:1/64 dev ens0
> > >
> > > Send ping packet from other server to the VM.
> > > # ping6  2001:db8::18:1 -I eth0
> > >
> > > The following message was shown.
> > > ixgbevf 0000:00:08.0: partial checksum but l4 proto=3a!
> > >
> > > If I did the same operation in the host, I saw the same error message in
> host too.
> > > ixgbe 0000:2d:00.0: partial checksum but l4 proto=3a!
> > >
> > > Do you have any idea about that?
> >
> > Ah, sorry about that, try this tree again:
> > git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/queue.git
> >
> > That patch was dropped for favor of a patch that Matthew Vick put
> > together (and recently got pushed upstream).  So my queue no longer
> > has that patch in the queue, since it got dropped.
> 
> I still see the same error, the head id is the below
> 
> $ git log | head
> commit a072afb0b45904022b76deef3b770ee9a93cb13a
> Author: Nicholas Krause <xerofoify@gmail.com>
> Date:   Mon Feb 9 00:27:00 2015 -0800
> 
>     igb: Remove outdated fix me comment in the
> function,gb_acquire_swfw_sync_i210
> 
> 
> thanks,
> Hiroshi

I'm having our validation see if they can recreate the same issue internally.  When they get back to me I'll let you know what we found.

Thanks,
-Don Skidmore <donald.c.skidmore@intel.com>

ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

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

* RE: [E1000-devel] [PATCH 1/3] ixgbe, ixgbevf: Add new mbox API to enable MC promiscuous mode
  2015-02-11 22:59         ` Skidmore, Donald C
@ 2015-02-11 23:33           ` Hiroshi Shimamoto
  2015-02-13  4:44           ` Hiroshi Shimamoto
  1 sibling, 0 replies; 15+ messages in thread
From: Hiroshi Shimamoto @ 2015-02-11 23:33 UTC (permalink / raw)
  To: Skidmore, Donald C, Kirsher, Jeffrey T
  Cc: Alexander Duyck, Bjørn Mork, e1000-devel, netdev, Choi,
	Sy Jong, linux-kernel, David Laight, Hayato Momma

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 3982 bytes --]

> Subject: RE: [E1000-devel] [PATCH 1/3] ixgbe, ixgbevf: Add new mbox API to enable MC promiscuous mode
> 
> > -----Original Message-----
> > From: Hiroshi Shimamoto [mailto:h-shimamoto@ct.jp.nec.com]
> > Sent: Monday, February 09, 2015 6:29 PM
> > To: Kirsher, Jeffrey T
> > Cc: Alexander Duyck; Skidmore, Donald C; Bjørn Mork; e1000-
> > devel@lists.sourceforge.net; netdev@vger.kernel.org; Choi, Sy Jong; linux-
> > kernel@vger.kernel.org; David Laight; Hayato Momma
> > Subject: RE: [E1000-devel] [PATCH 1/3] ixgbe, ixgbevf: Add new mbox API to
> > enable MC promiscuous mode
> >
> > > > > > Can you please fix up your patches based on my tree:
> > > > > > git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/queue.git
> > > > >
> > > > > Yes. I haven't noticed your tree.
> > > > > Will resend patches against it.
> > > > >
> > > >
> > > > I encountered an issue with your tree, the commit id is below.
> > > >
> > > > $ git log | head
> > > > commit e6f1649780f8f5a87299bf6af04453f93d1e3d5e
> > > > Author: Rasmus Villemoes <linux@rasmusvillemoes.dk>
> > > > Date:   Fri Jan 23 20:43:14 2015 -0800
> > > >
> > > >     ethernet: fm10k: Actually drop 4 bits
> > > >
> > > >     The comment explains the intention, but vid has type u16. Before the
> > > >     inner shift, it is promoted to int, which has plenty of space for all
> > > >     vid's bits, so nothing is dropped. Use a simple mask instead.
> > > >
> > > >
> > > > I use the kernel from your tree in both host and guest.
> > > >
> > > > Assign an IPv6 for VF in guest.
> > > > # ip -6 addr add 2001:db8::18:1/64 dev ens0
> > > >
> > > > Send ping packet from other server to the VM.
> > > > # ping6  2001:db8::18:1 -I eth0
> > > >
> > > > The following message was shown.
> > > > ixgbevf 0000:00:08.0: partial checksum but l4 proto=3a!
> > > >
> > > > If I did the same operation in the host, I saw the same error message in
> > host too.
> > > > ixgbe 0000:2d:00.0: partial checksum but l4 proto=3a!
> > > >
> > > > Do you have any idea about that?
> > >
> > > Ah, sorry about that, try this tree again:
> > > git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/queue.git
> > >
> > > That patch was dropped for favor of a patch that Matthew Vick put
> > > together (and recently got pushed upstream).  So my queue no longer
> > > has that patch in the queue, since it got dropped.
> >
> > I still see the same error, the head id is the below
> >
> > $ git log | head
> > commit a072afb0b45904022b76deef3b770ee9a93cb13a
> > Author: Nicholas Krause <xerofoify@gmail.com>
> > Date:   Mon Feb 9 00:27:00 2015 -0800
> >
> >     igb: Remove outdated fix me comment in the
> > function,gb_acquire_swfw_sync_i210
> >
> >
> > thanks,
> > Hiroshi
> 
> I'm having our validation see if they can recreate the same issue internally.  When they get back to me I'll let you know
> what we found.

We did bisect, and the below looks the culprit;

32dce968dd987adfb0c00946d78dad9154f64759 is the first bad commit
commit 32dce968dd987adfb0c00946d78dad9154f64759
Author: Vlad Yasevich <vyasevich@gmail.com>
Date:   Sat Jan 31 10:40:18 2015 -0500

    ipv6: Allow for partial checksums on non-ufo packets

    Currntly, if we are not doing UFO on the packet, all UDP
    packets will start with CHECKSUM_NONE and thus perform full
    checksum computations in software even if device support
    IPv6 checksum offloading.

    Let's start start with CHECKSUM_PARTIAL if the device
    supports it and we are sending only a single packet at
    or below mtu size.

    Signed-off-by: Vladislav Yasevich <vyasevic@redhat.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

:040000 040000 4437eaf7e944f5a6136ebf668a256fee688fda3d fade8da998d35c8da97a15f0556949ad371e5347 M      net

thanks,
Hiroshi

> 
> Thanks,
> -Don Skidmore <donald.c.skidmore@intel.com>

ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

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

* RE: [E1000-devel] [PATCH 1/3] ixgbe, ixgbevf: Add new mbox API to enable MC promiscuous mode
  2015-02-11 22:59         ` Skidmore, Donald C
  2015-02-11 23:33           ` Hiroshi Shimamoto
@ 2015-02-13  4:44           ` Hiroshi Shimamoto
  2015-02-13 17:26             ` Skidmore, Donald C
  1 sibling, 1 reply; 15+ messages in thread
From: Hiroshi Shimamoto @ 2015-02-13  4:44 UTC (permalink / raw)
  To: Skidmore, Donald C, Kirsher, Jeffrey T
  Cc: Alexander Duyck, Bjørn Mork, e1000-devel, netdev, Choi,
	Sy Jong, linux-kernel, David Laight, Hayato Momma

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 4055 bytes --]

> > > -----Original Message-----
> > > From: Hiroshi Shimamoto [mailto:h-shimamoto@ct.jp.nec.com]
> > > Sent: Monday, February 09, 2015 6:29 PM
> > > To: Kirsher, Jeffrey T
> > > Cc: Alexander Duyck; Skidmore, Donald C; Bjørn Mork; e1000-
> > > devel@lists.sourceforge.net; netdev@vger.kernel.org; Choi, Sy Jong; linux-
> > > kernel@vger.kernel.org; David Laight; Hayato Momma
> > > Subject: RE: [E1000-devel] [PATCH 1/3] ixgbe, ixgbevf: Add new mbox API to
> > > enable MC promiscuous mode
> > >
> > > > > > > Can you please fix up your patches based on my tree:
> > > > > > > git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/queue.git
> > > > > >
> > > > > > Yes. I haven't noticed your tree.
> > > > > > Will resend patches against it.
> > > > > >
> > > > >
> > > > > I encountered an issue with your tree, the commit id is below.
> > > > >
> > > > > $ git log | head
> > > > > commit e6f1649780f8f5a87299bf6af04453f93d1e3d5e
> > > > > Author: Rasmus Villemoes <linux@rasmusvillemoes.dk>
> > > > > Date:   Fri Jan 23 20:43:14 2015 -0800
> > > > >
> > > > >     ethernet: fm10k: Actually drop 4 bits
> > > > >
> > > > >     The comment explains the intention, but vid has type u16. Before the
> > > > >     inner shift, it is promoted to int, which has plenty of space for all
> > > > >     vid's bits, so nothing is dropped. Use a simple mask instead.
> > > > >
> > > > >
> > > > > I use the kernel from your tree in both host and guest.
> > > > >
> > > > > Assign an IPv6 for VF in guest.
> > > > > # ip -6 addr add 2001:db8::18:1/64 dev ens0
> > > > >
> > > > > Send ping packet from other server to the VM.
> > > > > # ping6  2001:db8::18:1 -I eth0
> > > > >
> > > > > The following message was shown.
> > > > > ixgbevf 0000:00:08.0: partial checksum but l4 proto=3a!
> > > > >
> > > > > If I did the same operation in the host, I saw the same error message in
> > > host too.
> > > > > ixgbe 0000:2d:00.0: partial checksum but l4 proto=3a!
> > > > >
> > > > > Do you have any idea about that?
> > > >
> > > > Ah, sorry about that, try this tree again:
> > > > git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/queue.git
> > > >
> > > > That patch was dropped for favor of a patch that Matthew Vick put
> > > > together (and recently got pushed upstream).  So my queue no longer
> > > > has that patch in the queue, since it got dropped.
> > >
> > > I still see the same error, the head id is the below
> > >
> > > $ git log | head
> > > commit a072afb0b45904022b76deef3b770ee9a93cb13a
> > > Author: Nicholas Krause <xerofoify@gmail.com>
> > > Date:   Mon Feb 9 00:27:00 2015 -0800
> > >
> > >     igb: Remove outdated fix me comment in the
> > > function,gb_acquire_swfw_sync_i210
> > >
> > >
> > > thanks,
> > > Hiroshi
> >
> > I'm having our validation see if they can recreate the same issue internally.  When they get back to me I'll let you
> know
> > what we found.
> 
> We did bisect, and the below looks the culprit;
> 
> 32dce968dd987adfb0c00946d78dad9154f64759 is the first bad commit
> commit 32dce968dd987adfb0c00946d78dad9154f64759
> Author: Vlad Yasevich <vyasevich@gmail.com>
> Date:   Sat Jan 31 10:40:18 2015 -0500
> 
>     ipv6: Allow for partial checksums on non-ufo packets
> 
>     Currntly, if we are not doing UFO on the packet, all UDP
>     packets will start with CHECKSUM_NONE and thus perform full
>     checksum computations in software even if device support
>     IPv6 checksum offloading.
> 
>     Let's start start with CHECKSUM_PARTIAL if the device
>     supports it and we are sending only a single packet at
>     or below mtu size.
> 
>     Signed-off-by: Vladislav Yasevich <vyasevic@redhat.com>
>     Signed-off-by: David S. Miller <davem@davemloft.net>
> 
> :040000 040000 4437eaf7e944f5a6136ebf668a256fee688fda3d fade8da998d35c8da97a15f0556949ad371e5347 M      net

When I reverted the commit, the issue was solved.

thanks,
Hiroshi

ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

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

* RE: [E1000-devel] [PATCH 1/3] ixgbe, ixgbevf: Add new mbox API to enable MC promiscuous mode
  2015-02-13  4:44           ` Hiroshi Shimamoto
@ 2015-02-13 17:26             ` Skidmore, Donald C
  2015-02-13 17:34               ` Vlad Yasevich
  0 siblings, 1 reply; 15+ messages in thread
From: Skidmore, Donald C @ 2015-02-13 17:26 UTC (permalink / raw)
  To: Hiroshi Shimamoto, Kirsher, Jeffrey T, vyasevic
  Cc: Alexander Duyck, Bjørn Mork, e1000-devel, netdev, Choi,
	Sy Jong, linux-kernel, David Laight, Hayato Momma

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 5511 bytes --]



> -----Original Message-----
> From: Hiroshi Shimamoto [mailto:h-shimamoto@ct.jp.nec.com]
> Sent: Thursday, February 12, 2015 8:45 PM
> To: Skidmore, Donald C; Kirsher, Jeffrey T
> Cc: Alexander Duyck; Bjørn Mork; e1000-devel@lists.sourceforge.net;
> netdev@vger.kernel.org; Choi, Sy Jong; linux-kernel@vger.kernel.org; David
> Laight; Hayato Momma
> Subject: RE: [E1000-devel] [PATCH 1/3] ixgbe, ixgbevf: Add new mbox API to
> enable MC promiscuous mode
> 
> > > > -----Original Message-----
> > > > From: Hiroshi Shimamoto [mailto:h-shimamoto@ct.jp.nec.com]
> > > > Sent: Monday, February 09, 2015 6:29 PM
> > > > To: Kirsher, Jeffrey T
> > > > Cc: Alexander Duyck; Skidmore, Donald C; Bjørn Mork; e1000-
> > > > devel@lists.sourceforge.net; netdev@vger.kernel.org; Choi, Sy
> > > > Jong; linux- kernel@vger.kernel.org; David Laight; Hayato Momma
> > > > Subject: RE: [E1000-devel] [PATCH 1/3] ixgbe, ixgbevf: Add new
> > > > mbox API to enable MC promiscuous mode
> > > >
> > > > > > > > Can you please fix up your patches based on my tree:
> > > > > > > > git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/que
> > > > > > > > ue.git
> > > > > > >
> > > > > > > Yes. I haven't noticed your tree.
> > > > > > > Will resend patches against it.
> > > > > > >
> > > > > >
> > > > > > I encountered an issue with your tree, the commit id is below.
> > > > > >
> > > > > > $ git log | head
> > > > > > commit e6f1649780f8f5a87299bf6af04453f93d1e3d5e
> > > > > > Author: Rasmus Villemoes <linux@rasmusvillemoes.dk>
> > > > > > Date:   Fri Jan 23 20:43:14 2015 -0800
> > > > > >
> > > > > >     ethernet: fm10k: Actually drop 4 bits
> > > > > >
> > > > > >     The comment explains the intention, but vid has type u16. Before
> the
> > > > > >     inner shift, it is promoted to int, which has plenty of space for all
> > > > > >     vid's bits, so nothing is dropped. Use a simple mask instead.
> > > > > >
> > > > > >
> > > > > > I use the kernel from your tree in both host and guest.
> > > > > >
> > > > > > Assign an IPv6 for VF in guest.
> > > > > > # ip -6 addr add 2001:db8::18:1/64 dev ens0
> > > > > >
> > > > > > Send ping packet from other server to the VM.
> > > > > > # ping6  2001:db8::18:1 -I eth0
> > > > > >
> > > > > > The following message was shown.
> > > > > > ixgbevf 0000:00:08.0: partial checksum but l4 proto=3a!
> > > > > >
> > > > > > If I did the same operation in the host, I saw the same error
> > > > > > message in
> > > > host too.
> > > > > > ixgbe 0000:2d:00.0: partial checksum but l4 proto=3a!
> > > > > >
> > > > > > Do you have any idea about that?
> > > > >
> > > > > Ah, sorry about that, try this tree again:
> > > > > git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/queue.git
> > > > >
> > > > > That patch was dropped for favor of a patch that Matthew Vick
> > > > > put together (and recently got pushed upstream).  So my queue no
> > > > > longer has that patch in the queue, since it got dropped.
> > > >
> > > > I still see the same error, the head id is the below
> > > >
> > > > $ git log | head
> > > > commit a072afb0b45904022b76deef3b770ee9a93cb13a
> > > > Author: Nicholas Krause <xerofoify@gmail.com>
> > > > Date:   Mon Feb 9 00:27:00 2015 -0800
> > > >
> > > >     igb: Remove outdated fix me comment in the
> > > > function,gb_acquire_swfw_sync_i210
> > > >
> > > >
> > > > thanks,
> > > > Hiroshi
> > >
> > > I'm having our validation see if they can recreate the same issue
> > > internally.  When they get back to me I'll let you
> > know
> > > what we found.
> >
> > We did bisect, and the below looks the culprit;
> >
> > 32dce968dd987adfb0c00946d78dad9154f64759 is the first bad commit
> > commit 32dce968dd987adfb0c00946d78dad9154f64759
> > Author: Vlad Yasevich <vyasevich@gmail.com>
> > Date:   Sat Jan 31 10:40:18 2015 -0500
> >
> >     ipv6: Allow for partial checksums on non-ufo packets
> >
> >     Currntly, if we are not doing UFO on the packet, all UDP
> >     packets will start with CHECKSUM_NONE and thus perform full
> >     checksum computations in software even if device support
> >     IPv6 checksum offloading.
> >
> >     Let's start start with CHECKSUM_PARTIAL if the device
> >     supports it and we are sending only a single packet at
> >     or below mtu size.
> >
> >     Signed-off-by: Vladislav Yasevich <vyasevic@redhat.com>
> >     Signed-off-by: David S. Miller <davem@davemloft.net>
> >
> > :040000 040000 4437eaf7e944f5a6136ebf668a256fee688fda3d
> fade8da998d35c8da97a15f0556949ad371e5347 M      net
> 
> When I reverted the commit, the issue was solved.
> 
> thanks,
> Hiroshi

I believe the issue is that this patch (32dce968dd98 - ipv6: Allow for partial checksums on non-ufo packets) is that it now sets CHECKSUM_PARTIAL on all IPv6 packets including ICMPv6 ones.  Our HW (82599) only supports checksum offload on TCP/UDP (NETIF_F_IPV6_CSUM) so we get hung up on the skb's protocol and the fact that it is CHECKSUM_PARTIAL.

Another thing that confuses me is the feature test in this patch.  It checks (rt->dst.dev->features & NETIF_F_V6_CSUM) but NETIF_F_V6_CSUM is a two bit field?  

#define NETIF_F_V6_CSUM         (NETIF_F_GEN_CSUM | NETIF_F_IPV6_CSUM)

So the test would succeed if either bit was high, that doesn't seem right.  I cc'd the author so maybe he could clue us in.

Thanks,
-Don Skidmore <donald.c.skidmore@intel.com>


ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

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

* Re: [E1000-devel] [PATCH 1/3] ixgbe, ixgbevf: Add new mbox API to enable MC promiscuous mode
  2015-02-13 17:26             ` Skidmore, Donald C
@ 2015-02-13 17:34               ` Vlad Yasevich
  2015-02-16  4:54                 ` Hiroshi Shimamoto
  0 siblings, 1 reply; 15+ messages in thread
From: Vlad Yasevich @ 2015-02-13 17:34 UTC (permalink / raw)
  To: Skidmore, Donald C, Hiroshi Shimamoto, Kirsher, Jeffrey T
  Cc: Alexander Duyck, Bjørn Mork, e1000-devel, netdev, Choi,
	Sy Jong, linux-kernel, David Laight, Hayato Momma

On 02/13/2015 12:26 PM, Skidmore, Donald C wrote:
> 
> 
>> -----Original Message-----
>> From: Hiroshi Shimamoto [mailto:h-shimamoto@ct.jp.nec.com]
>> Sent: Thursday, February 12, 2015 8:45 PM
>> To: Skidmore, Donald C; Kirsher, Jeffrey T
>> Cc: Alexander Duyck; Bjørn Mork; e1000-devel@lists.sourceforge.net;
>> netdev@vger.kernel.org; Choi, Sy Jong; linux-kernel@vger.kernel.org; David
>> Laight; Hayato Momma
>> Subject: RE: [E1000-devel] [PATCH 1/3] ixgbe, ixgbevf: Add new mbox API to
>> enable MC promiscuous mode
>>
>>>>> -----Original Message-----
>>>>> From: Hiroshi Shimamoto [mailto:h-shimamoto@ct.jp.nec.com]
>>>>> Sent: Monday, February 09, 2015 6:29 PM
>>>>> To: Kirsher, Jeffrey T
>>>>> Cc: Alexander Duyck; Skidmore, Donald C; Bjørn Mork; e1000-
>>>>> devel@lists.sourceforge.net; netdev@vger.kernel.org; Choi, Sy
>>>>> Jong; linux- kernel@vger.kernel.org; David Laight; Hayato Momma
>>>>> Subject: RE: [E1000-devel] [PATCH 1/3] ixgbe, ixgbevf: Add new
>>>>> mbox API to enable MC promiscuous mode
>>>>>
>>>>>>>>> Can you please fix up your patches based on my tree:
>>>>>>>>> git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/que
>>>>>>>>> ue.git
>>>>>>>>
>>>>>>>> Yes. I haven't noticed your tree.
>>>>>>>> Will resend patches against it.
>>>>>>>>
>>>>>>>
>>>>>>> I encountered an issue with your tree, the commit id is below.
>>>>>>>
>>>>>>> $ git log | head
>>>>>>> commit e6f1649780f8f5a87299bf6af04453f93d1e3d5e
>>>>>>> Author: Rasmus Villemoes <linux@rasmusvillemoes.dk>
>>>>>>> Date:   Fri Jan 23 20:43:14 2015 -0800
>>>>>>>
>>>>>>>     ethernet: fm10k: Actually drop 4 bits
>>>>>>>
>>>>>>>     The comment explains the intention, but vid has type u16. Before
>> the
>>>>>>>     inner shift, it is promoted to int, which has plenty of space for all
>>>>>>>     vid's bits, so nothing is dropped. Use a simple mask instead.
>>>>>>>
>>>>>>>
>>>>>>> I use the kernel from your tree in both host and guest.
>>>>>>>
>>>>>>> Assign an IPv6 for VF in guest.
>>>>>>> # ip -6 addr add 2001:db8::18:1/64 dev ens0
>>>>>>>
>>>>>>> Send ping packet from other server to the VM.
>>>>>>> # ping6  2001:db8::18:1 -I eth0
>>>>>>>
>>>>>>> The following message was shown.
>>>>>>> ixgbevf 0000:00:08.0: partial checksum but l4 proto=3a!
>>>>>>>
>>>>>>> If I did the same operation in the host, I saw the same error
>>>>>>> message in
>>>>> host too.
>>>>>>> ixgbe 0000:2d:00.0: partial checksum but l4 proto=3a!
>>>>>>>
>>>>>>> Do you have any idea about that?
>>>>>>
>>>>>> Ah, sorry about that, try this tree again:
>>>>>> git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/queue.git
>>>>>>
>>>>>> That patch was dropped for favor of a patch that Matthew Vick
>>>>>> put together (and recently got pushed upstream).  So my queue no
>>>>>> longer has that patch in the queue, since it got dropped.
>>>>>
>>>>> I still see the same error, the head id is the below
>>>>>
>>>>> $ git log | head
>>>>> commit a072afb0b45904022b76deef3b770ee9a93cb13a
>>>>> Author: Nicholas Krause <xerofoify@gmail.com>
>>>>> Date:   Mon Feb 9 00:27:00 2015 -0800
>>>>>
>>>>>     igb: Remove outdated fix me comment in the
>>>>> function,gb_acquire_swfw_sync_i210
>>>>>
>>>>>
>>>>> thanks,
>>>>> Hiroshi
>>>>
>>>> I'm having our validation see if they can recreate the same issue
>>>> internally.  When they get back to me I'll let you
>>> know
>>>> what we found.
>>>
>>> We did bisect, and the below looks the culprit;
>>>
>>> 32dce968dd987adfb0c00946d78dad9154f64759 is the first bad commit
>>> commit 32dce968dd987adfb0c00946d78dad9154f64759
>>> Author: Vlad Yasevich <vyasevich@gmail.com>
>>> Date:   Sat Jan 31 10:40:18 2015 -0500
>>>
>>>     ipv6: Allow for partial checksums on non-ufo packets
>>>
>>>     Currntly, if we are not doing UFO on the packet, all UDP
>>>     packets will start with CHECKSUM_NONE and thus perform full
>>>     checksum computations in software even if device support
>>>     IPv6 checksum offloading.
>>>
>>>     Let's start start with CHECKSUM_PARTIAL if the device
>>>     supports it and we are sending only a single packet at
>>>     or below mtu size.
>>>
>>>     Signed-off-by: Vladislav Yasevich <vyasevic@redhat.com>
>>>     Signed-off-by: David S. Miller <davem@davemloft.net>
>>>
>>> :040000 040000 4437eaf7e944f5a6136ebf668a256fee688fda3d
>> fade8da998d35c8da97a15f0556949ad371e5347 M      net
>>
>> When I reverted the commit, the issue was solved.
>>
>> thanks,
>> Hiroshi
> 
> I believe the issue is that this patch (32dce968dd98 - ipv6: Allow for partial checksums on non-ufo packets) is that it now sets CHECKSUM_PARTIAL on all IPv6 packets including ICMPv6 ones.  Our HW (82599) only supports checksum offload on TCP/UDP (NETIF_F_IPV6_CSUM) so we get hung up on the skb's protocol and the fact that it is CHECKSUM_PARTIAL.
> 
> Another thing that confuses me is the feature test in this patch.  It checks (rt->dst.dev->features & NETIF_F_V6_CSUM) but NETIF_F_V6_CSUM is a two bit field?  
> 
> #define NETIF_F_V6_CSUM         (NETIF_F_GEN_CSUM | NETIF_F_IPV6_CSUM)
> 
> So the test would succeed if either bit was high, that doesn't seem right.  I cc'd the author so maybe he could clue us in.

This has been addressed by:
commit bf250a1fa769f2eb8fc7a4e28b3b523e9cb67eef
Author: Vlad Yasevich <vyasevich@gmail.com>
Date:   Tue Feb 10 11:37:29 2015 -0500

    ipv6: Partial checksum only UDP packets


As far the 2 bit issue, GEN_CSUM (HW_SUM) and IPV6_CSUM can not coexist at the same time.
See netdev_fix_features().

-vlad

> 
> Thanks,
> -Don Skidmore <donald.c.skidmore@intel.com>
> 
> 


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

* RE: [E1000-devel] [PATCH 1/3] ixgbe, ixgbevf: Add new mbox API to enable MC promiscuous mode
  2015-02-13 17:34               ` Vlad Yasevich
@ 2015-02-16  4:54                 ` Hiroshi Shimamoto
  2015-02-17 15:02                   ` Vlad Yasevich
  2015-02-17 23:30                   ` Skidmore, Donald C
  0 siblings, 2 replies; 15+ messages in thread
From: Hiroshi Shimamoto @ 2015-02-16  4:54 UTC (permalink / raw)
  To: vyasevic, Skidmore, Donald C, Kirsher, Jeffrey T
  Cc: Alexander Duyck, Bjørn Mork, e1000-devel, netdev, Choi,
	Sy Jong, linux-kernel, David Laight, Hayato Momma

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 4992 bytes --]

> >>>>>>>>> Can you please fix up your patches based on my tree:
> >>>>>>>>> git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/que
> >>>>>>>>> ue.git
> >>>>>>>>
> >>>>>>>> Yes. I haven't noticed your tree.
> >>>>>>>> Will resend patches against it.
> >>>>>>>>
> >>>>>>>
> >>>>>>> I encountered an issue with your tree, the commit id is below.
> >>>>>>>
> >>>>>>> $ git log | head
> >>>>>>> commit e6f1649780f8f5a87299bf6af04453f93d1e3d5e
> >>>>>>> Author: Rasmus Villemoes <linux@rasmusvillemoes.dk>
> >>>>>>> Date:   Fri Jan 23 20:43:14 2015 -0800
> >>>>>>>
> >>>>>>>     ethernet: fm10k: Actually drop 4 bits
> >>>>>>>
> >>>>>>>     The comment explains the intention, but vid has type u16. Before
> >> the
> >>>>>>>     inner shift, it is promoted to int, which has plenty of space for all
> >>>>>>>     vid's bits, so nothing is dropped. Use a simple mask instead.
> >>>>>>>
> >>>>>>>
> >>>>>>> I use the kernel from your tree in both host and guest.
> >>>>>>>
> >>>>>>> Assign an IPv6 for VF in guest.
> >>>>>>> # ip -6 addr add 2001:db8::18:1/64 dev ens0
> >>>>>>>
> >>>>>>> Send ping packet from other server to the VM.
> >>>>>>> # ping6  2001:db8::18:1 -I eth0
> >>>>>>>
> >>>>>>> The following message was shown.
> >>>>>>> ixgbevf 0000:00:08.0: partial checksum but l4 proto=3a!
> >>>>>>>
> >>>>>>> If I did the same operation in the host, I saw the same error
> >>>>>>> message in
> >>>>> host too.
> >>>>>>> ixgbe 0000:2d:00.0: partial checksum but l4 proto=3a!
> >>>>>>>
> >>>>>>> Do you have any idea about that?
> >>>>>>
> >>>>>> Ah, sorry about that, try this tree again:
> >>>>>> git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/queue.git
> >>>>>>
> >>>>>> That patch was dropped for favor of a patch that Matthew Vick
> >>>>>> put together (and recently got pushed upstream).  So my queue no
> >>>>>> longer has that patch in the queue, since it got dropped.
> >>>>>
> >>>>> I still see the same error, the head id is the below
> >>>>>
> >>>>> $ git log | head
> >>>>> commit a072afb0b45904022b76deef3b770ee9a93cb13a
> >>>>> Author: Nicholas Krause <xerofoify@gmail.com>
> >>>>> Date:   Mon Feb 9 00:27:00 2015 -0800
> >>>>>
> >>>>>     igb: Remove outdated fix me comment in the
> >>>>> function,gb_acquire_swfw_sync_i210
> >>>>>
> >>>>>
> >>>>> thanks,
> >>>>> Hiroshi
> >>>>
> >>>> I'm having our validation see if they can recreate the same issue
> >>>> internally.  When they get back to me I'll let you
> >>> know
> >>>> what we found.
> >>>
> >>> We did bisect, and the below looks the culprit;
> >>>
> >>> 32dce968dd987adfb0c00946d78dad9154f64759 is the first bad commit
> >>> commit 32dce968dd987adfb0c00946d78dad9154f64759
> >>> Author: Vlad Yasevich <vyasevich@gmail.com>
> >>> Date:   Sat Jan 31 10:40:18 2015 -0500
> >>>
> >>>     ipv6: Allow for partial checksums on non-ufo packets
> >>>
> >>>     Currntly, if we are not doing UFO on the packet, all UDP
> >>>     packets will start with CHECKSUM_NONE and thus perform full
> >>>     checksum computations in software even if device support
> >>>     IPv6 checksum offloading.
> >>>
> >>>     Let's start start with CHECKSUM_PARTIAL if the device
> >>>     supports it and we are sending only a single packet at
> >>>     or below mtu size.
> >>>
> >>>     Signed-off-by: Vladislav Yasevich <vyasevic@redhat.com>
> >>>     Signed-off-by: David S. Miller <davem@davemloft.net>
> >>>
> >>> :040000 040000 4437eaf7e944f5a6136ebf668a256fee688fda3d
> >> fade8da998d35c8da97a15f0556949ad371e5347 M      net
> >>
> >> When I reverted the commit, the issue was solved.
> >>
> >> thanks,
> >> Hiroshi
> >
> > I believe the issue is that this patch (32dce968dd98 - ipv6: Allow for partial checksums on non-ufo packets) is that
> it now sets CHECKSUM_PARTIAL on all IPv6 packets including ICMPv6 ones.  Our HW (82599) only supports checksum offload
> on TCP/UDP (NETIF_F_IPV6_CSUM) so we get hung up on the skb's protocol and the fact that it is CHECKSUM_PARTIAL.
> >
> > Another thing that confuses me is the feature test in this patch.  It checks (rt->dst.dev->features & NETIF_F_V6_CSUM)
> but NETIF_F_V6_CSUM is a two bit field?
> >
> > #define NETIF_F_V6_CSUM         (NETIF_F_GEN_CSUM | NETIF_F_IPV6_CSUM)
> >
> > So the test would succeed if either bit was high, that doesn't seem right.  I cc'd the author so maybe he could clue
> us in.
> 
> This has been addressed by:
> commit bf250a1fa769f2eb8fc7a4e28b3b523e9cb67eef
> Author: Vlad Yasevich <vyasevich@gmail.com>
> Date:   Tue Feb 10 11:37:29 2015 -0500
> 
>     ipv6: Partial checksum only UDP packets
> 
> 
> As far the 2 bit issue, GEN_CSUM (HW_SUM) and IPV6_CSUM can not coexist at the same time.
> See netdev_fix_features().
> 

thanks for pointing it. I will test with that commit.

Jeff's tree hasn't included that commit yet, right?
Which branch has the commit?

thanks,
Hiroshi
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

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

* Re: [E1000-devel] [PATCH 1/3] ixgbe, ixgbevf: Add new mbox API to enable MC promiscuous mode
  2015-02-16  4:54                 ` Hiroshi Shimamoto
@ 2015-02-17 15:02                   ` Vlad Yasevich
  2015-02-17 23:30                   ` Skidmore, Donald C
  1 sibling, 0 replies; 15+ messages in thread
From: Vlad Yasevich @ 2015-02-17 15:02 UTC (permalink / raw)
  To: Hiroshi Shimamoto, Skidmore, Donald C, Kirsher, Jeffrey T
  Cc: Alexander Duyck, Bjørn Mork, e1000-devel, netdev, Choi,
	Sy Jong, linux-kernel, David Laight, Hayato Momma

On 02/15/2015 11:54 PM, Hiroshi Shimamoto wrote:
>>>>>>>>>>> Can you please fix up your patches based on my tree:
>>>>>>>>>>> git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/que
>>>>>>>>>>> ue.git
>>>>>>>>>>
>>>>>>>>>> Yes. I haven't noticed your tree.
>>>>>>>>>> Will resend patches against it.
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> I encountered an issue with your tree, the commit id is below.
>>>>>>>>>
>>>>>>>>> $ git log | head
>>>>>>>>> commit e6f1649780f8f5a87299bf6af04453f93d1e3d5e
>>>>>>>>> Author: Rasmus Villemoes <linux@rasmusvillemoes.dk>
>>>>>>>>> Date:   Fri Jan 23 20:43:14 2015 -0800
>>>>>>>>>
>>>>>>>>>     ethernet: fm10k: Actually drop 4 bits
>>>>>>>>>
>>>>>>>>>     The comment explains the intention, but vid has type u16. Before
>>>> the
>>>>>>>>>     inner shift, it is promoted to int, which has plenty of space for all
>>>>>>>>>     vid's bits, so nothing is dropped. Use a simple mask instead.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> I use the kernel from your tree in both host and guest.
>>>>>>>>>
>>>>>>>>> Assign an IPv6 for VF in guest.
>>>>>>>>> # ip -6 addr add 2001:db8::18:1/64 dev ens0
>>>>>>>>>
>>>>>>>>> Send ping packet from other server to the VM.
>>>>>>>>> # ping6  2001:db8::18:1 -I eth0
>>>>>>>>>
>>>>>>>>> The following message was shown.
>>>>>>>>> ixgbevf 0000:00:08.0: partial checksum but l4 proto=3a!
>>>>>>>>>
>>>>>>>>> If I did the same operation in the host, I saw the same error
>>>>>>>>> message in
>>>>>>> host too.
>>>>>>>>> ixgbe 0000:2d:00.0: partial checksum but l4 proto=3a!
>>>>>>>>>
>>>>>>>>> Do you have any idea about that?
>>>>>>>>
>>>>>>>> Ah, sorry about that, try this tree again:
>>>>>>>> git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/queue.git
>>>>>>>>
>>>>>>>> That patch was dropped for favor of a patch that Matthew Vick
>>>>>>>> put together (and recently got pushed upstream).  So my queue no
>>>>>>>> longer has that patch in the queue, since it got dropped.
>>>>>>>
>>>>>>> I still see the same error, the head id is the below
>>>>>>>
>>>>>>> $ git log | head
>>>>>>> commit a072afb0b45904022b76deef3b770ee9a93cb13a
>>>>>>> Author: Nicholas Krause <xerofoify@gmail.com>
>>>>>>> Date:   Mon Feb 9 00:27:00 2015 -0800
>>>>>>>
>>>>>>>     igb: Remove outdated fix me comment in the
>>>>>>> function,gb_acquire_swfw_sync_i210
>>>>>>>
>>>>>>>
>>>>>>> thanks,
>>>>>>> Hiroshi
>>>>>>
>>>>>> I'm having our validation see if they can recreate the same issue
>>>>>> internally.  When they get back to me I'll let you
>>>>> know
>>>>>> what we found.
>>>>>
>>>>> We did bisect, and the below looks the culprit;
>>>>>
>>>>> 32dce968dd987adfb0c00946d78dad9154f64759 is the first bad commit
>>>>> commit 32dce968dd987adfb0c00946d78dad9154f64759
>>>>> Author: Vlad Yasevich <vyasevich@gmail.com>
>>>>> Date:   Sat Jan 31 10:40:18 2015 -0500
>>>>>
>>>>>     ipv6: Allow for partial checksums on non-ufo packets
>>>>>
>>>>>     Currntly, if we are not doing UFO on the packet, all UDP
>>>>>     packets will start with CHECKSUM_NONE and thus perform full
>>>>>     checksum computations in software even if device support
>>>>>     IPv6 checksum offloading.
>>>>>
>>>>>     Let's start start with CHECKSUM_PARTIAL if the device
>>>>>     supports it and we are sending only a single packet at
>>>>>     or below mtu size.
>>>>>
>>>>>     Signed-off-by: Vladislav Yasevich <vyasevic@redhat.com>
>>>>>     Signed-off-by: David S. Miller <davem@davemloft.net>
>>>>>
>>>>> :040000 040000 4437eaf7e944f5a6136ebf668a256fee688fda3d
>>>> fade8da998d35c8da97a15f0556949ad371e5347 M      net
>>>>
>>>> When I reverted the commit, the issue was solved.
>>>>
>>>> thanks,
>>>> Hiroshi
>>>
>>> I believe the issue is that this patch (32dce968dd98 - ipv6: Allow for partial checksums on non-ufo packets) is that
>> it now sets CHECKSUM_PARTIAL on all IPv6 packets including ICMPv6 ones.  Our HW (82599) only supports checksum offload
>> on TCP/UDP (NETIF_F_IPV6_CSUM) so we get hung up on the skb's protocol and the fact that it is CHECKSUM_PARTIAL.
>>>
>>> Another thing that confuses me is the feature test in this patch.  It checks (rt->dst.dev->features & NETIF_F_V6_CSUM)
>> but NETIF_F_V6_CSUM is a two bit field?
>>>
>>> #define NETIF_F_V6_CSUM         (NETIF_F_GEN_CSUM | NETIF_F_IPV6_CSUM)
>>>
>>> So the test would succeed if either bit was high, that doesn't seem right.  I cc'd the author so maybe he could clue
>> us in.
>>
>> This has been addressed by:
>> commit bf250a1fa769f2eb8fc7a4e28b3b523e9cb67eef
>> Author: Vlad Yasevich <vyasevich@gmail.com>
>> Date:   Tue Feb 10 11:37:29 2015 -0500
>>
>>     ipv6: Partial checksum only UDP packets
>>
>>
>> As far the 2 bit issue, GEN_CSUM (HW_SUM) and IPV6_CSUM can not coexist at the same time.
>> See netdev_fix_features().
>>
> 
> thanks for pointing it. I will test with that commit.
> 
> Jeff's tree hasn't included that commit yet, right?
> Which branch has the commit?

This is in DaveM's net and net-next trees.

-vlad

> 
> thanks,
> Hiroshi
> 


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

* RE: [E1000-devel] [PATCH 1/3] ixgbe, ixgbevf: Add new mbox API to enable MC promiscuous mode
  2015-02-16  4:54                 ` Hiroshi Shimamoto
  2015-02-17 15:02                   ` Vlad Yasevich
@ 2015-02-17 23:30                   ` Skidmore, Donald C
  1 sibling, 0 replies; 15+ messages in thread
From: Skidmore, Donald C @ 2015-02-17 23:30 UTC (permalink / raw)
  To: Hiroshi Shimamoto, vyasevic, Kirsher, Jeffrey T
  Cc: Alexander Duyck, Bjørn Mork, e1000-devel, netdev, Choi,
	Sy Jong, linux-kernel, David Laight, Hayato Momma

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 5712 bytes --]



-----Original Message-----
From: Hiroshi Shimamoto [mailto:h-shimamoto@ct.jp.nec.com] 
Sent: Sunday, February 15, 2015 8:54 PM
To: vyasevic@redhat.com; Skidmore, Donald C; Kirsher, Jeffrey T
Cc: Alexander Duyck; Bjørn Mork; e1000-devel@lists.sourceforge.net; netdev@vger.kernel.org; Choi, Sy Jong; linux-kernel@vger.kernel.org; David Laight; Hayato Momma
Subject: RE: [E1000-devel] [PATCH 1/3] ixgbe, ixgbevf: Add new mbox API to enable MC promiscuous mode

> >>>>>>>>> Can you please fix up your patches based on my tree:
> >>>>>>>>> git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/que
> >>>>>>>>> ue.git
> >>>>>>>>
> >>>>>>>> Yes. I haven't noticed your tree.
> >>>>>>>> Will resend patches against it.
> >>>>>>>>
> >>>>>>>
> >>>>>>> I encountered an issue with your tree, the commit id is below.
> >>>>>>>
> >>>>>>> $ git log | head
> >>>>>>> commit e6f1649780f8f5a87299bf6af04453f93d1e3d5e
> >>>>>>> Author: Rasmus Villemoes <linux@rasmusvillemoes.dk>
> >>>>>>> Date:   Fri Jan 23 20:43:14 2015 -0800
> >>>>>>>
> >>>>>>>     ethernet: fm10k: Actually drop 4 bits
> >>>>>>>
> >>>>>>>     The comment explains the intention, but vid has type u16. 
> >>>>>>> Before
> >> the
> >>>>>>>     inner shift, it is promoted to int, which has plenty of space for all
> >>>>>>>     vid's bits, so nothing is dropped. Use a simple mask instead.
> >>>>>>>
> >>>>>>>
> >>>>>>> I use the kernel from your tree in both host and guest.
> >>>>>>>
> >>>>>>> Assign an IPv6 for VF in guest.
> >>>>>>> # ip -6 addr add 2001:db8::18:1/64 dev ens0
> >>>>>>>
> >>>>>>> Send ping packet from other server to the VM.
> >>>>>>> # ping6  2001:db8::18:1 -I eth0
> >>>>>>>
> >>>>>>> The following message was shown.
> >>>>>>> ixgbevf 0000:00:08.0: partial checksum but l4 proto=3a!
> >>>>>>>
> >>>>>>> If I did the same operation in the host, I saw the same error 
> >>>>>>> message in
> >>>>> host too.
> >>>>>>> ixgbe 0000:2d:00.0: partial checksum but l4 proto=3a!
> >>>>>>>
> >>>>>>> Do you have any idea about that?
> >>>>>>
> >>>>>> Ah, sorry about that, try this tree again:
> >>>>>> git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/queue.gi
> >>>>>> t
> >>>>>>
> >>>>>> That patch was dropped for favor of a patch that Matthew Vick 
> >>>>>> put together (and recently got pushed upstream).  So my queue 
> >>>>>> no longer has that patch in the queue, since it got dropped.
> >>>>>
> >>>>> I still see the same error, the head id is the below
> >>>>>
> >>>>> $ git log | head
> >>>>> commit a072afb0b45904022b76deef3b770ee9a93cb13a
> >>>>> Author: Nicholas Krause <xerofoify@gmail.com>
> >>>>> Date:   Mon Feb 9 00:27:00 2015 -0800
> >>>>>
> >>>>>     igb: Remove outdated fix me comment in the
> >>>>> function,gb_acquire_swfw_sync_i210
> >>>>>
> >>>>>
> >>>>> thanks,
> >>>>> Hiroshi
> >>>>
> >>>> I'm having our validation see if they can recreate the same issue 
> >>>> internally.  When they get back to me I'll let you
> >>> know
> >>>> what we found.
> >>>
> >>> We did bisect, and the below looks the culprit;
> >>>
> >>> 32dce968dd987adfb0c00946d78dad9154f64759 is the first bad commit 
> >>> commit 32dce968dd987adfb0c00946d78dad9154f64759
> >>> Author: Vlad Yasevich <vyasevich@gmail.com>
> >>> Date:   Sat Jan 31 10:40:18 2015 -0500
> >>>
> >>>     ipv6: Allow for partial checksums on non-ufo packets
> >>>
> >>>     Currntly, if we are not doing UFO on the packet, all UDP
> >>>     packets will start with CHECKSUM_NONE and thus perform full
> >>>     checksum computations in software even if device support
> >>>     IPv6 checksum offloading.
> >>>
> >>>     Let's start start with CHECKSUM_PARTIAL if the device
> >>>     supports it and we are sending only a single packet at
> >>>     or below mtu size.
> >>>
> >>>     Signed-off-by: Vladislav Yasevich <vyasevic@redhat.com>
> >>>     Signed-off-by: David S. Miller <davem@davemloft.net>
> >>>
> >>> :040000 040000 4437eaf7e944f5a6136ebf668a256fee688fda3d
> >> fade8da998d35c8da97a15f0556949ad371e5347 M      net
> >>
> >> When I reverted the commit, the issue was solved.
> >>
> >> thanks,
> >> Hiroshi
> >
> > I believe the issue is that this patch (32dce968dd98 - ipv6: Allow 
> > for partial checksums on non-ufo packets) is that
> it now sets CHECKSUM_PARTIAL on all IPv6 packets including ICMPv6 
> ones.  Our HW (82599) only supports checksum offload on TCP/UDP (NETIF_F_IPV6_CSUM) so we get hung up on the skb's protocol and the fact that it is CHECKSUM_PARTIAL.
> >
> > Another thing that confuses me is the feature test in this patch.  
> > It checks (rt->dst.dev->features & NETIF_F_V6_CSUM)
> but NETIF_F_V6_CSUM is a two bit field?
> >
> > #define NETIF_F_V6_CSUM         (NETIF_F_GEN_CSUM | NETIF_F_IPV6_CSUM)
> >
> > So the test would succeed if either bit was high, that doesn't seem 
> > right.  I cc'd the author so maybe he could clue
> us in.
> 
> This has been addressed by:
> commit bf250a1fa769f2eb8fc7a4e28b3b523e9cb67eef
> Author: Vlad Yasevich <vyasevich@gmail.com>
> Date:   Tue Feb 10 11:37:29 2015 -0500
> 
>     ipv6: Partial checksum only UDP packets
> 
> 
> As far the 2 bit issue, GEN_CSUM (HW_SUM) and IPV6_CSUM can not coexist at the same time.
> See netdev_fix_features().
> 

thanks for pointing it. I will test with that commit.

Jeff's tree hasn't included that commit yet, right?
Which branch has the commit?

thanks,
Hiroshi

Jeff should have his tree updated pretty soon after the patch is merged into net-next.  It would probably be best to wait till that happens and use Jeff's tree.

Thanks,
-Don Skidmore <donald.c.skidmore@intel.com>


ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

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

end of thread, other threads:[~2015-02-17 23:31 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-30 11:37 [PATCH 1/3] ixgbe, ixgbevf: Add new mbox API to enable MC promiscuous mode Hiroshi Shimamoto
2015-01-30 22:13 ` Skidmore, Donald C
2015-02-04 12:57 ` [E1000-devel] " Jeff Kirsher
2015-02-05  6:10   ` Hiroshi Shimamoto
2015-02-09  6:59   ` Hiroshi Shimamoto
2015-02-09  8:20     ` Jeff Kirsher
2015-02-10  2:28       ` Hiroshi Shimamoto
2015-02-11 22:59         ` Skidmore, Donald C
2015-02-11 23:33           ` Hiroshi Shimamoto
2015-02-13  4:44           ` Hiroshi Shimamoto
2015-02-13 17:26             ` Skidmore, Donald C
2015-02-13 17:34               ` Vlad Yasevich
2015-02-16  4:54                 ` Hiroshi Shimamoto
2015-02-17 15:02                   ` Vlad Yasevich
2015-02-17 23:30                   ` Skidmore, Donald C

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