git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
app/eventdev: add ethernet device setup helpers
[dpdk.git]
/
drivers
/
net
/
nfp
/
nfp_net_pmd.h
diff --git
a/drivers/net/nfp/nfp_net_pmd.h
b/drivers/net/nfp/nfp_net_pmd.h
index
a7f9386
..
1ae0ea6
100644
(file)
--- a/
drivers/net/nfp/nfp_net_pmd.h
+++ b/
drivers/net/nfp/nfp_net_pmd.h
@@
-42,6
+42,7
@@
#define NFP_NET_PMD_VERSION "0.1"
#define PCI_VENDOR_ID_NETRONOME 0x19ee
#define NFP_NET_PMD_VERSION "0.1"
#define PCI_VENDOR_ID_NETRONOME 0x19ee
+#define PCI_DEVICE_ID_NFP4000_PF_NIC 0x4000
#define PCI_DEVICE_ID_NFP6000_PF_NIC 0x6000
#define PCI_DEVICE_ID_NFP6000_VF_NIC 0x6003
#define PCI_DEVICE_ID_NFP6000_PF_NIC 0x6000
#define PCI_DEVICE_ID_NFP6000_VF_NIC 0x6003
@@
-75,9
+76,6
@@
struct nfp_net_adapter;
/* Interrupt definitions */
#define NFP_NET_IRQ_LSC_IDX 0
/* Interrupt definitions */
#define NFP_NET_IRQ_LSC_IDX 0
-#define RTE_MBUF_DATA_DMA_ADDR(mb) \
- ((uint64_t)((mb)->buf_physaddr + (mb)->data_off))
-
/* Default values for RX/TX configuration */
#define DEFAULT_RX_FREE_THRESH 32
#define DEFAULT_RX_PTHRESH 8
/* Default values for RX/TX configuration */
#define DEFAULT_RX_FREE_THRESH 32
#define DEFAULT_RX_PTHRESH 8
@@
-124,25
+122,31
@@
struct nfp_net_adapter;
#define NFD_CFG_MINOR_VERSION_of(x) (((x) >> 0) & 0xff)
#include <linux/types.h>
#define NFD_CFG_MINOR_VERSION_of(x) (((x) >> 0) & 0xff)
#include <linux/types.h>
+#include <rte_io.h>
static inline uint8_t nn_readb(volatile const void *addr)
{
static inline uint8_t nn_readb(volatile const void *addr)
{
- return
*((volatile const uint8_t *)(addr)
);
+ return
rte_read8(addr
);
}
static inline void nn_writeb(uint8_t val, volatile void *addr)
{
}
static inline void nn_writeb(uint8_t val, volatile void *addr)
{
-
*((volatile uint8_t *)(addr)) = val
;
+
rte_write8(val, addr)
;
}
static inline uint32_t nn_readl(volatile const void *addr)
{
}
static inline uint32_t nn_readl(volatile const void *addr)
{
- return
*((volatile const uint32_t *)(addr)
);
+ return
rte_read32(addr
);
}
static inline void nn_writel(uint32_t val, volatile void *addr)
{
}
static inline void nn_writel(uint32_t val, volatile void *addr)
{
- *((volatile uint32_t *)(addr)) = val;
+ rte_write32(val, addr);
+}
+
+static inline void nn_writew(uint16_t val, volatile void *addr)
+{
+ rte_write16(val, addr);
}
static inline uint64_t nn_readq(volatile void *addr)
}
static inline uint64_t nn_readq(volatile void *addr)
@@
-219,12
+223,10
@@
struct nfp_net_txq {
uint32_t wr_p;
uint32_t rd_p;
uint32_t wr_p;
uint32_t rd_p;
- uint32_t qcp_rd_p;
uint32_t tx_count;
uint32_t tx_free_thresh;
uint32_t tx_count;
uint32_t tx_free_thresh;
- uint32_t tail;
/*
* For each descriptor keep a reference to the mbuff and
/*
* For each descriptor keep a reference to the mbuff and
@@
-243,7
+245,7
@@
struct nfp_net_txq {
struct nfp_net_tx_desc *txds;
/*
struct nfp_net_tx_desc *txds;
/*
- * At this point
56
bytes have been used for all the fields in the
+ * At this point
48
bytes have been used for all the fields in the
* TX critical path. We have room for 8 bytes and still all placed
* in a cache line. We are not using the threshold values below nor
* the txq_flags but if we need to, we can add the most used in the
* TX critical path. We have room for 8 bytes and still all placed
* in a cache line. We are not using the threshold values below nor
* the txq_flags but if we need to, we can add the most used in the
@@
-254,7
+256,7
@@
struct nfp_net_txq {
uint32_t tx_hthresh; /* not used by now. Future? */
uint32_t tx_wthresh; /* not used by now. Future? */
uint32_t txq_flags; /* not used by now. Future? */
uint32_t tx_hthresh; /* not used by now. Future? */
uint32_t tx_wthresh; /* not used by now. Future? */
uint32_t txq_flags; /* not used by now. Future? */
- uint
8_t
port_id;
+ uint
16_t
port_id;
int qidx;
int tx_qcidx;
__le64 dma;
int qidx;
int tx_qcidx;
__le64 dma;
@@
-272,7
+274,7
@@
struct nfp_net_txq {
#define PCIE_DESC_RX_I_TCP_CSUM_OK (1 << 11)
#define PCIE_DESC_RX_I_UDP_CSUM (1 << 10)
#define PCIE_DESC_RX_I_UDP_CSUM_OK (1 << 9)
#define PCIE_DESC_RX_I_TCP_CSUM_OK (1 << 11)
#define PCIE_DESC_RX_I_UDP_CSUM (1 << 10)
#define PCIE_DESC_RX_I_UDP_CSUM_OK (1 << 9)
-#define PCIE_DESC_RX_
INGRESS_PORT
(1 << 8)
+#define PCIE_DESC_RX_
SPARE
(1 << 8)
#define PCIE_DESC_RX_EOP (1 << 7)
#define PCIE_DESC_RX_IP4_CSUM (1 << 6)
#define PCIE_DESC_RX_IP4_CSUM_OK (1 << 5)
#define PCIE_DESC_RX_EOP (1 << 7)
#define PCIE_DESC_RX_IP4_CSUM (1 << 6)
#define PCIE_DESC_RX_IP4_CSUM_OK (1 << 5)
@@
-329,7
+331,6
@@
struct nfp_net_rxq {
* freelist descriptors and @rd_p is where the driver start
* reading descriptors for newly arrive packets from.
*/
* freelist descriptors and @rd_p is where the driver start
* reading descriptors for newly arrive packets from.
*/
- uint32_t wr_p;
uint32_t rd_p;
/*
uint32_t rd_p;
/*
@@
-409,6
+410,7
@@
struct nfp_net_hw {
int stride_tx;
uint8_t *qcp_cfg;
int stride_tx;
uint8_t *qcp_cfg;
+ rte_spinlock_t reconfig_lock;
uint32_t max_tx_queues;
uint32_t max_rx_queues;
uint32_t max_tx_queues;
uint32_t max_rx_queues;
@@
-435,6
+437,13
@@
struct nfp_net_hw {
struct nfp_cpp_area *rx_area;
struct nfp_cpp_area *msix_area;
#endif
struct nfp_cpp_area *rx_area;
struct nfp_cpp_area *msix_area;
#endif
+ uint8_t *hw_queues;
+ uint8_t is_pf;
+ uint8_t pf_port_idx;
+ uint8_t pf_multiport_enabled;
+ union eth_table_entry *eth_table;
+ nspu_desc_t *nspu_desc;
+ nfpu_desc_t *nfpu_desc;
};
struct nfp_net_adapter {
};
struct nfp_net_adapter {