From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id BD1F958EF for ; Mon, 21 Sep 2015 17:37:23 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP; 21 Sep 2015 08:36:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,568,1437462000"; d="scan'208";a="649181742" Received: from irsmsx154.ger.corp.intel.com ([163.33.192.96]) by orsmga003.jf.intel.com with ESMTP; 21 Sep 2015 08:27:42 -0700 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.252]) by IRSMSX154.ger.corp.intel.com ([169.254.12.211]) with mapi id 14.03.0248.002; Mon, 21 Sep 2015 16:27:40 +0100 From: "Ananyev, Konstantin" To: "Serguei Bezverkhi (sbezverk)" , "Van Haaren, Harry" , "dev@dpdk.org" Thread-Topic: getting pointer for struct ixgbe_hw Thread-Index: AdD0dZo794ndB0TST96I2nQYx9ybgAAAJkCgAAAuJRAAAOXp4AAAZnSAAAClrDA= Date: Mon, 21 Sep 2015 15:27:39 +0000 Message-ID: <2601191342CEEE43887BDE71AB97725836A99E82@irsmsx105.ger.corp.intel.com> References: <2601191342CEEE43887BDE71AB97725836A99BD1@irsmsx105.ger.corp.intel.com> In-Reply-To: Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] getting pointer for struct ixgbe_hw X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Sep 2015 15:37:24 -0000 > -----Original Message----- > From: Serguei Bezverkhi (sbezverk) [mailto:sbezverk@cisco.com] > Sent: Monday, September 21, 2015 3:53 PM > To: Ananyev, Konstantin; Van Haaren, Harry; dev@dpdk.org > Subject: RE: getting pointer for struct ixgbe_hw >=20 > Hi Konstantin, >=20 > I need to setup certain parameters per VF from guest VM. >=20 > Here is the list: >=20 > #define IXGBE_VF_RESET 0x01 /* VF requests res= et */ > #define IXGBE_VF_SET_MAC_ADDR 0x02 /* VF requests PF to set MAC addr= */ > #define IXGBE_VF_SET_MULTICAST 0x03 /* VF requests PF to set MC add= r */ > #define IXGBE_VF_SET_VLAN 0x04 /* VF requests PF to set VLAN */ > #define IXGBE_VF_SET_LPE 0x05 /* VF requests PF to set VMOLR.LPE */ > #define IXGBE_VF_SET_MACVLAN 0x06 /* VF requests PF for unicast f= ilter */ > #define IXGBE_VF_API_NEGOTIATE 0x08 /* negotiate API version */ > #define IXGBE_VF_API_NEGOTIATE 0x08 /* negotiate AP= I version */ > #define IXGBE_VF_GET_QUEUES 0x09 /* get queue = configuration */ > #define IXGBE_VF_ENABLE_MACADDR 0x0A /* en= able MAC address */ > #define IXGBE_VF_DISABLE_MACADDR 0x0B /* disable MAC addres= s */ > #define IXGBE_VF_GET_MACADDRS 0x0C /* get all configu= red MAC addrs */ > #define IXGBE_VF_SET_MCAST_PROMISC 0x0D /* enable multicast prom= iscuous */ > #define IXGBE_VF_GET_MTU 0x0E /* get bounds on MTU */ > #define IXGBE_VF_SET_MTU 0x0F /* set a specific MTU */ It is not really a device parameters - what you listed is a set of supporte= d mailbox commands. Basically mailbox is reserved for communication between PF/VF and you don't= need to send this commands via maibox to PF directly. This is done inside PMD . Let say when you call rte_eth_dev_default_mac_addr_set() for ixgbe VF it wo= uld cause: rte_eth_dev_default_mac_addr_set() ->ixgbevf_set_default_mac_addr() -> hw->mac.ops.set_rar() -> ixgbe_set_rar_vf() ->send IXGBE_VF_SET_MAC_ADDR message to PF via mailbox and w= ait for response. Konstantin =20 >=20 > The only way I found so far was directly using mailbox facility between P= F and VF. If you can suggest more proper way of doing it, I > would appreciate if you let me know. >=20 > Thank you >=20 > Serguei >=20 > Serguei Bezverkhi, > TECHNICAL LEADER.SERVICES > Global SP Services > sbezverk@cisco.com > Phone:=A0+1 416 306 7312 > Mobile:=A0+1 514 234 7374 >=20 > CCIE (R&S,SP,Sec) - #9527 >=20 > Cisco.com >=20 >=20 >=20 > =A0Think before you print. > This email may contain confidential and privileged material for the sole = use of the intended recipient. Any review, use, distribution or > disclosure by others is strictly prohibited. If you are not the intended = recipient (or authorized to receive for the recipient), please > contact the sender by reply email and delete all copies of this message. > Please=A0click here=A0for Company Registration Information. >=20 >=20 >=20 > -----Original Message----- > From: Ananyev, Konstantin [mailto:konstantin.ananyev@intel.com] > Sent: Monday, September 21, 2015 10:41 AM > To: Serguei Bezverkhi (sbezverk) ; Van Haaren, Harry = ; dev@dpdk.org > Subject: RE: getting pointer for struct ixgbe_hw >=20 > Hi Serguei, >=20 > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Serguei Bezverkhi > > (sbezverk) > > Sent: Monday, September 21, 2015 3:12 PM > > To: Van Haaren, Harry; dev@dpdk.org > > Subject: Re: [dpdk-dev] getting pointer for struct ixgbe_hw > > > > Hi Harry, > > > > Thank you for your reply. The reason I was looking for specifically > > ixgbe_hw because I needed access to ixgbe PF/VF mailbox facility. I am = not sure if it is exposed via rte_eth api. Please advise. >=20 > You are not supposed to send/recv messages via HW mailbox directly from t= he user application. > To configure device there exists rte_eth* API. > Wonder what exactly you are trying to achieve? > Konstantin >=20 > > > > Best regards > > > > Serguei > > > > > > Serguei Bezverkhi, > > TECHNICAL LEADER.SERVICES > > Global SP Services > > sbezverk@cisco.com > > Phone:=A0+1 416 306 7312 > > Mobile:=A0+1 514 234 7374 > > > > CCIE (R&S,SP,Sec) - #9527 > > > > Cisco.com > > > > > > > > =A0Think before you print. > > This email may contain confidential and privileged material for the > > sole use of the intended recipient. Any review, use, distribution or > > disclosure by others is strictly prohibited. If you are not the intende= d recipient (or authorized to receive for the recipient), please > contact the sender by reply email and delete all copies of this message. > > Please=A0click here=A0for Company Registration Information. > > > > > > > > -----Original Message----- > > From: Van Haaren, Harry [mailto:harry.van.haaren@intel.com] > > Sent: Monday, September 21, 2015 10:06 AM > > To: Serguei Bezverkhi (sbezverk) ; dev@dpdk.org > > Subject: RE: getting pointer for struct ixgbe_hw > > > > Hi Serguei, > > > > > From: Serguei Bezverkhi > > > I would appreciate if somebody could share an example of getting > > > access to ixgbe_hw structure for already initialized ixgbe nic. I > > > tried to find any references but could not find any API returning poi= nter for this structure. > > > > The ixgbe_hw struct is part of the implementation, and should not be > > used by code outside the drivers/net/ixgbe director. The > > rte_eth_* api[1] is available to access any NIC using a unified API. > > > > Hope that helps, -Harry > > > > [1] http://www.dpdk.org/doc/api/rte__ethdev_8h.html