DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] getting pointer for struct ixgbe_hw
@ 2015-09-21 13:58 Serguei Bezverkhi (sbezverk)
  2015-09-21 14:06 ` Van Haaren, Harry
  0 siblings, 1 reply; 6+ messages in thread
From: Serguei Bezverkhi (sbezverk) @ 2015-09-21 13:58 UTC (permalink / raw)
  To: dev

Hello,

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 pointer for this structure.

Thank you

Serguei

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

* Re: [dpdk-dev] getting pointer for struct ixgbe_hw
  2015-09-21 13:58 [dpdk-dev] getting pointer for struct ixgbe_hw Serguei Bezverkhi (sbezverk)
@ 2015-09-21 14:06 ` Van Haaren, Harry
  2015-09-21 14:11   ` Serguei Bezverkhi (sbezverk)
  0 siblings, 1 reply; 6+ messages in thread
From: Van Haaren, Harry @ 2015-09-21 14:06 UTC (permalink / raw)
  To: Serguei Bezverkhi (sbezverk), dev

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 pointer 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

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

* Re: [dpdk-dev] getting pointer for struct ixgbe_hw
  2015-09-21 14:06 ` Van Haaren, Harry
@ 2015-09-21 14:11   ` Serguei Bezverkhi (sbezverk)
  2015-09-21 14:41     ` Ananyev, Konstantin
  0 siblings, 1 reply; 6+ messages in thread
From: Serguei Bezverkhi (sbezverk) @ 2015-09-21 14:11 UTC (permalink / raw)
  To: Van Haaren, Harry, dev

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.

Best regards

Serguei


Serguei Bezverkhi,
TECHNICAL LEADER.SERVICES
Global SP Services
sbezverk@cisco.com
Phone: +1 416 306 7312
Mobile: +1 514 234 7374

CCIE (R&S,SP,Sec) - #9527

Cisco.com



 Think 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 click here for 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) <sbezverk@cisco.com>; 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 pointer 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

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

* Re: [dpdk-dev] getting pointer for struct ixgbe_hw
  2015-09-21 14:11   ` Serguei Bezverkhi (sbezverk)
@ 2015-09-21 14:41     ` Ananyev, Konstantin
  2015-09-21 14:52       ` Serguei Bezverkhi (sbezverk)
  0 siblings, 1 reply; 6+ messages in thread
From: Ananyev, Konstantin @ 2015-09-21 14:41 UTC (permalink / raw)
  To: Serguei Bezverkhi (sbezverk), Van Haaren, Harry, dev

Hi Serguei,

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

You are not supposed to send/recv messages via HW mailbox directly from the user application.
To configure device there exists rte_eth* API. 
Wonder what exactly you are trying to achieve?
Konstantin

> 
> Best regards
> 
> Serguei
> 
> 
> Serguei Bezverkhi,
> TECHNICAL LEADER.SERVICES
> Global SP Services
> sbezverk@cisco.com
> Phone: +1 416 306 7312
> Mobile: +1 514 234 7374
> 
> CCIE (R&S,SP,Sec) - #9527
> 
> Cisco.com
> 
> 
> 
>  Think 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 click here for 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) <sbezverk@cisco.com>; 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 pointer 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

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

* Re: [dpdk-dev] getting pointer for struct ixgbe_hw
  2015-09-21 14:41     ` Ananyev, Konstantin
@ 2015-09-21 14:52       ` Serguei Bezverkhi (sbezverk)
  2015-09-21 15:27         ` Ananyev, Konstantin
  0 siblings, 1 reply; 6+ messages in thread
From: Serguei Bezverkhi (sbezverk) @ 2015-09-21 14:52 UTC (permalink / raw)
  To: Ananyev, Konstantin, Van Haaren, Harry, dev

Hi Konstantin,

I need to setup certain parameters per VF from guest VM. 

Here is the list:

#define IXGBE_VF_RESET                            0x01 /* VF requests reset */
#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 addr */
#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 filter */
#define IXGBE_VF_API_NEGOTIATE       0x08 /* negotiate API version */
#define IXGBE_VF_API_NEGOTIATE                       0x08 /* negotiate API version */
#define IXGBE_VF_GET_QUEUES                            0x09 /* get queue configuration */
#define IXGBE_VF_ENABLE_MACADDR                                0x0A /* enable MAC address */
#define IXGBE_VF_DISABLE_MACADDR               0x0B /* disable MAC address */
#define IXGBE_VF_GET_MACADDRS                     0x0C /* get all configured MAC addrs */
#define IXGBE_VF_SET_MCAST_PROMISC          0x0D /* enable multicast promiscuous */
#define IXGBE_VF_GET_MTU                   0x0E /* get bounds on MTU */
#define IXGBE_VF_SET_MTU                    0x0F /* set a specific MTU */ 

The only way I found so far was directly using mailbox facility between PF and VF. If you can suggest more proper way of doing it, I would appreciate if you let me know.

Thank you

Serguei

Serguei Bezverkhi,
TECHNICAL LEADER.SERVICES
Global SP Services
sbezverk@cisco.com
Phone: +1 416 306 7312
Mobile: +1 514 234 7374

CCIE (R&S,SP,Sec) - #9527

Cisco.com



 Think 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 click here for Company Registration Information.



-----Original Message-----
From: Ananyev, Konstantin [mailto:konstantin.ananyev@intel.com] 
Sent: Monday, September 21, 2015 10:41 AM
To: Serguei Bezverkhi (sbezverk) <sbezverk@cisco.com>; Van Haaren, Harry <harry.van.haaren@intel.com>; dev@dpdk.org
Subject: RE: getting pointer for struct ixgbe_hw

Hi Serguei,

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

You are not supposed to send/recv messages via HW mailbox directly from the user application.
To configure device there exists rte_eth* API. 
Wonder what exactly you are trying to achieve?
Konstantin

> 
> Best regards
> 
> Serguei
> 
> 
> Serguei Bezverkhi,
> TECHNICAL LEADER.SERVICES
> Global SP Services
> sbezverk@cisco.com
> Phone: +1 416 306 7312
> Mobile: +1 514 234 7374
> 
> CCIE (R&S,SP,Sec) - #9527
> 
> Cisco.com
> 
> 
> 
>  Think 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 click here for 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) <sbezverk@cisco.com>; 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 pointer 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

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

* Re: [dpdk-dev] getting pointer for struct ixgbe_hw
  2015-09-21 14:52       ` Serguei Bezverkhi (sbezverk)
@ 2015-09-21 15:27         ` Ananyev, Konstantin
  0 siblings, 0 replies; 6+ messages in thread
From: Ananyev, Konstantin @ 2015-09-21 15:27 UTC (permalink / raw)
  To: Serguei Bezverkhi (sbezverk), Van Haaren, Harry, dev



> -----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
> 
> Hi Konstantin,
> 
> I need to setup certain parameters per VF from guest VM.
> 
> Here is the list:
> 
> #define IXGBE_VF_RESET                            0x01 /* VF requests reset */
> #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 addr */
> #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 filter */
> #define IXGBE_VF_API_NEGOTIATE       0x08 /* negotiate API version */
> #define IXGBE_VF_API_NEGOTIATE                       0x08 /* negotiate API version */
> #define IXGBE_VF_GET_QUEUES                            0x09 /* get queue configuration */
> #define IXGBE_VF_ENABLE_MACADDR                                0x0A /* enable MAC address */
> #define IXGBE_VF_DISABLE_MACADDR               0x0B /* disable MAC address */
> #define IXGBE_VF_GET_MACADDRS                     0x0C /* get all configured MAC addrs */
> #define IXGBE_VF_SET_MCAST_PROMISC          0x0D /* enable multicast promiscuous */
> #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 supported 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 would 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 wait for response.

Konstantin
  
> 
> The only way I found so far was directly using mailbox facility between PF and VF. If you can suggest more proper way of doing it, I
> would appreciate if you let me know.
> 
> Thank you
> 
> Serguei
> 
> Serguei Bezverkhi,
> TECHNICAL LEADER.SERVICES
> Global SP Services
> sbezverk@cisco.com
> Phone: +1 416 306 7312
> Mobile: +1 514 234 7374
> 
> CCIE (R&S,SP,Sec) - #9527
> 
> Cisco.com
> 
> 
> 
>  Think 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 click here for Company Registration Information.
> 
> 
> 
> -----Original Message-----
> From: Ananyev, Konstantin [mailto:konstantin.ananyev@intel.com]
> Sent: Monday, September 21, 2015 10:41 AM
> To: Serguei Bezverkhi (sbezverk) <sbezverk@cisco.com>; Van Haaren, Harry <harry.van.haaren@intel.com>; dev@dpdk.org
> Subject: RE: getting pointer for struct ixgbe_hw
> 
> Hi Serguei,
> 
> > -----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.
> 
> You are not supposed to send/recv messages via HW mailbox directly from the user application.
> To configure device there exists rte_eth* API.
> Wonder what exactly you are trying to achieve?
> Konstantin
> 
> >
> > Best regards
> >
> > Serguei
> >
> >
> > Serguei Bezverkhi,
> > TECHNICAL LEADER.SERVICES
> > Global SP Services
> > sbezverk@cisco.com
> > Phone: +1 416 306 7312
> > Mobile: +1 514 234 7374
> >
> > CCIE (R&S,SP,Sec) - #9527
> >
> > Cisco.com
> >
> >
> >
> >  Think 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 click here for 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) <sbezverk@cisco.com>; 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 pointer 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

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

end of thread, other threads:[~2015-09-21 15:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-21 13:58 [dpdk-dev] getting pointer for struct ixgbe_hw Serguei Bezverkhi (sbezverk)
2015-09-21 14:06 ` Van Haaren, Harry
2015-09-21 14:11   ` Serguei Bezverkhi (sbezverk)
2015-09-21 14:41     ` Ananyev, Konstantin
2015-09-21 14:52       ` Serguei Bezverkhi (sbezverk)
2015-09-21 15:27         ` Ananyev, Konstantin

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