lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Mon, 15 Jun 2015 10:47:36 +0000
From:	Hiroshi Shimamoto <h-shimamoto@...jp.nec.com>
To:	"Skidmore, Donald C" <donald.c.skidmore@...el.com>,
	"Rose, Gregory V" <gregory.v.rose@...el.com>,
	"Kirsher, Jeffrey T" <jeffrey.t.kirsher@...el.com>,
	"intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>
CC:	"nhorman@...hat.com" <nhorman@...hat.com>,
	"jogreene@...hat.com" <jogreene@...hat.com>,
	Linux Netdev List <netdev@...r.kernel.org>,
	"Choi, Sy Jong" <sy.jong.choi@...el.com>,
	Rony Efraim <ronye@...lanox.com>,
	"David Miller" <davem@...emloft.net>,
	Edward Cree <ecree@...arflare.com>,
	Or Gerlitz <gerlitz.or@...il.com>,
	"sassmann@...hat.com" <sassmann@...hat.com>
Subject: [PATCH 1/3] ixgbevf: refactor ixgbevf_update_mc_addr_list_vf

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

Add ixgbevf_request_mc_promisc_vf which is for request VF multicast
promiscuous mode, and move the codes from ixgbevf_update_mc_addr_list_vf.

Signed-off-by: Hiroshi Shimamoto <h-shimamoto@...jp.nec.com>
---
 drivers/net/ethernet/intel/ixgbevf/vf.c | 29 +++++++++++++++++++----------
 1 file changed, 19 insertions(+), 10 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbevf/vf.c b/drivers/net/ethernet/intel/ixgbevf/vf.c
index b5aac76..89aecd0 100644
--- a/drivers/net/ethernet/intel/ixgbevf/vf.c
+++ b/drivers/net/ethernet/intel/ixgbevf/vf.c
@@ -426,6 +426,24 @@ static void ixgbevf_write_msg_read_ack(struct ixgbe_hw *hw,
 		mbx->ops.read_posted(hw, retmsg, size);
 }
 
+static s32 ixgbevf_request_mc_promisc_vf(struct ixgbe_hw *hw)
+{
+	struct ixgbevf_adapter *adapter = hw->back;
+	u32 msgbuf[IXGBE_VFMAILBOX_SIZE];
+
+	dev_info(&adapter->pdev->dev, "Request MC PROMISC\n");
+
+	memset(msgbuf, 0, sizeof(msgbuf));
+
+	/* enabling multicast promiscuous */
+	msgbuf[0] = IXGBE_VF_SET_MC_PROMISC;
+	msgbuf[1] = 1;
+
+	ixgbevf_write_msg_read_ack(hw, msgbuf, 2);
+
+	return 0;
+}
+
 /**
  *  ixgbevf_update_mc_addr_list_vf - Update Multicast addresses
  *  @hw: pointer to the HW structure
@@ -457,18 +475,9 @@ static s32 ixgbevf_update_mc_addr_list_vf(struct ixgbe_hw *hw,
 		 */
 		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);
-
+				ixgbevf_request_mc_promisc_vf(hw);
 				hw->mac.mc_promisc = true;
 			}
-
 			return 0;
 		}
 		cnt = 30;
-- 
1.8.3.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ