[dpdk-dev,v6,3/8] eal/bsd: dummy for new intr definition

Message ID D0158A423229094DA7ABF71CF2FA0DA3118DFBCE@shsmsx102.ccr.corp.intel.com (mailing list archive)
State Not Applicable, archived
Headers

Commit Message

Cunming Liang Feb. 27, 2015, 11:21 a.m. UTC
  From: David Marchand [mailto:david.marchand@6wind.com]

Sent: Friday, February 27, 2015 6:00 PM
To: Liang, Cunming
Cc: dev@dpdk.org; Stephen Hemminger; Thomas Monjalon
Subject: Re: [PATCH v6 3/8] eal/bsd: dummy for new intr definition

Hello,

On Fri, Feb 27, 2015 at 5:56 AM, Cunming Liang <cunming.liang@intel.com<mailto:cunming.liang@intel.com>> wrote:
[Liang, Cunming] max_intr is used in dev_init for pci_dev->intr_handle init.
Vec_num is used in ethdev API rx_intr_vec_get. Without it, BSD macro will used for each of the reference place.
As they’re quite generic, even bsd will require either max_intr or vec mapping table.



--
David Marchand
  

Comments

Thomas Monjalon Feb. 27, 2015, 2:22 p.m. UTC | #1
2015-02-27 11:21, Liang, Cunming:
> From: David Marchand [mailto:david.marchand@6wind.com]
> > On Fri, Feb 27, 2015 at 5:56 AM, Cunming Liang  wrote:
> > > @@ -49,6 +51,8 @@ enum rte_intr_handle_type {
> > > 
> > >  struct rte_intr_handle {
> > >  
> > >         int fd;                          /**< file descriptor */
> > >         enum rte_intr_handle_type type;  /**< handle type */
> > > 
> > > +       int max_intr;                    /**< max interrupt requested */
> > > +       uint32_t vec_num[VFIO_MAX_QUEUE_ID]; /**< rxtx intr vector number */
> > > };
> > 
> > No need to add those since this is not supported for bsd.
> 
> [Liang, Cunming] max_intr is used in dev_init for pci_dev->intr_handle init.
> Vec_num is used in ethdev API rx_intr_vec_get. Without it, BSD macro will
> used for each of the reference place.
> As they’re quite generic, even bsd will require either max_intr or vec
> mapping table.

Is it needed to build and run DPDK on FreeBSD?
  
Cunming Liang Feb. 28, 2015, 12:37 a.m. UTC | #2
> -----Original Message-----

> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]

> Sent: Friday, February 27, 2015 10:22 PM

> To: Liang, Cunming

> Cc: David Marchand; dev@dpdk.org; Stephen Hemminger

> Subject: Re: [PATCH v6 3/8] eal/bsd: dummy for new intr definition

> 

> 2015-02-27 11:21, Liang, Cunming:

> > From: David Marchand [mailto:david.marchand@6wind.com]

> > > On Fri, Feb 27, 2015 at 5:56 AM, Cunming Liang  wrote:

> > > > @@ -49,6 +51,8 @@ enum rte_intr_handle_type {

> > > >

> > > >  struct rte_intr_handle {

> > > >

> > > >         int fd;                          /**< file descriptor */

> > > >         enum rte_intr_handle_type type;  /**< handle type */

> > > >

> > > > +       int max_intr;                    /**< max interrupt requested */

> > > > +       uint32_t vec_num[VFIO_MAX_QUEUE_ID]; /**< rxtx intr vector

> number */

> > > > };

> > >

> > > No need to add those since this is not supported for bsd.

> >

> > [Liang, Cunming] max_intr is used in dev_init for pci_dev->intr_handle init.

> > Vec_num is used in ethdev API rx_intr_vec_get. Without it, BSD macro will

> > used for each of the reference place.

> > As they’re quite generic, even bsd will require either max_intr or vec

> > mapping table.

> 

> Is it needed to build and run DPDK on FreeBSD?

[LCM] As it's the EAL change, so I try to make sure FreeBSD can build and run as normal.
  

Patch

diff --git a/lib/librte_eal/bsdapp/eal/include/exec-env/rte_interrupts.h b/lib/librte_eal/bsdapp/eal/include/exec-env/rte_interrupts.h
index 87a9cf6..b114aac 100644
--- a/lib/librte_eal/bsdapp/eal/include/exec-env/rte_interrupts.h
+++ b/lib/librte_eal/bsdapp/eal/include/exec-env/rte_interrupts.h
@@ -38,6 +38,8 @@ 
 #ifndef _RTE_LINUXAPP_INTERRUPTS_H_
 #define _RTE_LINUXAPP_INTERRUPTS_H_

+#define VFIO_MAX_RXTX_INTR_ID        32
+
 enum rte_intr_handle_type {
        RTE_INTR_HANDLE_UNKNOWN = 0,
        RTE_INTR_HANDLE_UIO,      /**< uio device handle */
@@ -49,6 +51,8 @@  enum rte_intr_handle_type {
 struct rte_intr_handle {
        int fd;                          /**< file descriptor */
        enum rte_intr_handle_type type;  /**< handle type */
+       int max_intr;                    /**< max interrupt requested */
+       uint32_t vec_num[VFIO_MAX_QUEUE_ID]; /**< rxtx intr vector number */
 };

No need to add those since this is not supported for bsd.