static int enicpmd_fdir_remove_perfect_filter(struct rte_eth_dev *eth_dev,
struct rte_fdir_filter *fdir_filter,
- uint16_t soft_id)
+ __rte_unused uint16_t soft_id)
{
struct enic *enic = pmd_priv(eth_dev);
}
static int enicpmd_fdir_add_perfect_filter(struct rte_eth_dev *eth_dev,
- struct rte_fdir_filter *fdir_filter, uint16_t soft_id,
+ struct rte_fdir_filter *fdir_filter, __rte_unused uint16_t soft_id,
uint8_t queue, uint8_t drop)
{
struct enic *enic = pmd_priv(eth_dev);
static int enicpmd_dev_setup_intr(struct enic *enic)
{
int ret;
- int index;
+ unsigned int index;
ENICPMD_FUNC_TRACE();
uint16_t queue_idx,
uint16_t nb_desc,
unsigned int socket_id,
- const struct rte_eth_txconf *tx_conf)
+ __rte_unused const struct rte_eth_txconf *tx_conf)
{
int ret;
struct enic *enic = pmd_priv(eth_dev);
uint16_t queue_idx,
uint16_t nb_desc,
unsigned int socket_id,
- const struct rte_eth_rxconf *rx_conf,
+ __rte_unused const struct rte_eth_rxconf *rx_conf,
struct rte_mempool *mp)
{
int ret;
}
static int enicpmd_dev_link_update(struct rte_eth_dev *eth_dev,
- int wait_to_complete)
+ __rte_unused int wait_to_complete)
{
struct enic *enic = pmd_priv(eth_dev);
int ret;
static void enicpmd_add_mac_addr(struct rte_eth_dev *eth_dev,
struct ether_addr *mac_addr,
- uint32_t index, uint32_t pool)
+ __rte_unused uint32_t index, __rte_unused uint32_t pool)
{
struct enic *enic = pmd_priv(eth_dev);
enic_set_mac_address(enic, mac_addr->addr_bytes);
}
-static void enicpmd_remove_mac_addr(struct rte_eth_dev *eth_dev, uint32_t index)
+static void enicpmd_remove_mac_addr(struct rte_eth_dev *eth_dev, __rte_unused uint32_t index)
{
struct enic *enic = pmd_priv(eth_dev);
struct rte_mbuf *tx_pkt;
struct vnic_wq *wq = (struct vnic_wq *)tx_queue;
struct enic *enic = vnic_dev_priv(wq->vdev);
- unsigned char *buf;
unsigned short vlan_id;
unsigned short ol_flags;
* Invoked once at EAL init time.
* Register as the [Poll Mode] Driver of Cisco ENIC device.
*/
-int rte_enic_pmd_init(const char *name __rte_unused,
+static int
+rte_enic_pmd_init(const char *name __rte_unused,
const char *params __rte_unused)
{
ENICPMD_FUNC_TRACE();
return m;
}
-static const struct rte_memzone *ring_dma_zone_reserve(
- struct rte_eth_dev *dev, const char *ring_name,
- uint16_t queue_id, uint32_t ring_size, int socket_id)
-{
- char z_name[RTE_MEMZONE_NAMESIZE];
- const struct rte_memzone *mz;
-
- snprintf(z_name, sizeof(z_name), "%s_%s_%d_%d",
- dev->driver->pci_drv.name, ring_name,
- dev->data->port_id, queue_id);
-
- mz = rte_memzone_lookup(z_name);
- if (mz)
- return mz;
-
- return rte_memzone_reserve_aligned((const char *)z_name,
- (uint64_t) ring_size,
- socket_id, RTE_MEMZONE_1GB, ENIC_ALIGN);
-}
-
void enic_set_hdr_split_size(struct enic *enic, u16 split_hdr_size)
{
vnic_set_hdr_split_size(enic->vdev, split_hdr_size);
}
-static void enic_free_wq_buf(struct vnic_wq *wq, struct vnic_wq_buf *buf)
+static void enic_free_wq_buf(__rte_unused struct vnic_wq *wq, struct vnic_wq_buf *buf)
{
struct rte_mbuf *mbuf = (struct rte_mbuf *)buf->os_buf;
}
static void enic_wq_free_buf(struct vnic_wq *wq,
- struct cq_desc *cq_desc, struct vnic_wq_buf *buf, void *opaque)
+ __rte_unused struct cq_desc *cq_desc,
+ struct vnic_wq_buf *buf,
+ __rte_unused void *opaque)
{
enic_free_wq_buf(wq, buf);
}
static int enic_wq_service(struct vnic_dev *vdev, struct cq_desc *cq_desc,
- u8 type, u16 q_number, u16 completed_index, void *opaque)
+ __rte_unused u8 type, u16 q_number, u16 completed_index, void *opaque)
{
struct enic *enic = vnic_dev_priv(vdev);
{
struct wq_enet_desc *desc = vnic_wq_next_desc(wq);
uint16_t mss = 0;
- uint16_t header_length = 0;
uint8_t cq_entry = eop;
uint8_t vlan_tag_insert = 0;
- unsigned char *buf = (unsigned char *)(tx_pkt->buf_addr) +
- RTE_PKTMBUF_HEADROOM;
uint64_t bus_addr = (dma_addr_t)
(tx_pkt->buf_physaddr + RTE_PKTMBUF_HEADROOM);
}
}
-static void enic_free_rq_buf(struct vnic_rq *rq, struct vnic_rq_buf *buf)
+static void
+enic_free_rq_buf(__rte_unused struct vnic_rq *rq, struct vnic_rq_buf *buf)
{
- struct enic *enic = vnic_dev_priv(rq->vdev);
-
if (!buf->os_buf)
return;
{
unsigned int error_interrupt_enable = 1;
unsigned int error_interrupt_offset = 0;
- int index = 0;
- unsigned int cq_index = 0;
+ unsigned int index = 0;
for (index = 0; index < enic->rq_count; index++) {
vnic_rq_init(&enic->rq[index],
static int enic_rq_alloc_buf(struct vnic_rq *rq)
{
struct enic *enic = vnic_dev_priv(rq->vdev);
- void *buf;
dma_addr_t dma_addr;
struct rq_enet_desc *desc = vnic_rq_next_desc(rq);
uint8_t type = RQ_ENET_TYPE_ONLY_SOP;
- uint16_t len = ENIC_MAX_MTU + VLAN_ETH_HLEN;
u16 split_hdr_size = vnic_get_hdr_split_size(enic->vdev);
struct rte_mbuf *mbuf = enic_rxmbuf_alloc(rq->mp);
struct rte_mbuf *hdr_mbuf = NULL;
}
hdr_mbuf->data_off = RTE_PKTMBUF_HEADROOM;
- buf = rte_pktmbuf_mtod(hdr_mbuf, void *);
hdr_mbuf->nb_segs = 2;
hdr_mbuf->port = rq->index;
}
mbuf->data_off = RTE_PKTMBUF_HEADROOM;
- buf = rte_pktmbuf_mtod(mbuf, void *);
mbuf->next = NULL;
dma_addr = (dma_addr_t)
}
static int enic_rq_service(struct vnic_dev *vdev, struct cq_desc *cq_desc,
- u8 type, u16 q_number, u16 completed_index, void *opaque)
+ __rte_unused u8 type, u16 q_number, u16 completed_index, void *opaque)
{
struct enic *enic = vnic_dev_priv(vdev);
return err;
}
-void *enic_alloc_consistent(void *priv, size_t size,
+static void *
+enic_alloc_consistent(__rte_unused void *priv, size_t size,
dma_addr_t *dma_handle, u8 *name)
{
- struct enic *enic = (struct enic *)priv;
void *vaddr;
const struct rte_memzone *rz;
*dma_handle = 0;
return vaddr;
}
-void enic_free_consistent(struct rte_pci_device *hwdev, size_t size,
- void *vaddr, dma_addr_t dma_handle)
+static void
+enic_free_consistent(__rte_unused struct rte_pci_device *hwdev,
+ __rte_unused size_t size,
+ __rte_unused void *vaddr,
+ __rte_unused dma_addr_t dma_handle)
{
/* Nothing to be done */
}
-void enic_intr_handler(__rte_unused struct rte_intr_handle *handle,
+static void
+enic_intr_handler(__rte_unused struct rte_intr_handle *handle,
void *arg)
{
struct enic *enic = pmd_priv((struct rte_eth_dev *)arg);
int enic_enable(struct enic *enic)
{
- int index;
- void *res;
- char mz_name[RTE_MEMZONE_NAMESIZE];
- const struct rte_memzone *rmz;
+ unsigned int index;
struct rte_eth_dev *eth_dev = enic->rte_dev;
eth_dev->data->dev_link.link_speed = vnic_dev_port_speed(enic->vdev);
{
dma_addr_t rss_key_buf_pa;
union vnic_rss_key *rss_key_buf_va = NULL;
- union vnic_rss_key rss_key = {
- .key[0].b = {85, 67, 83, 97, 119, 101, 115, 111, 109, 101},
- .key[1].b = {80, 65, 76, 79, 117, 110, 105, 113, 117, 101},
- .key[2].b = {76, 73, 78, 85, 88, 114, 111, 99, 107, 115},
- .key[3].b = {69, 78, 73, 67, 105, 115, 99, 111, 111, 108},
+ static union vnic_rss_key rss_key = {
+ .key[0] = {.b = {85, 67, 83, 97, 119, 101, 115, 111, 109, 101}},
+ .key[1] = {.b = {80, 65, 76, 79, 117, 110, 105, 113, 117, 101}},
+ .key[2] = {.b = {76, 73, 78, 85, 88, 114, 111, 99, 107, 115}},
+ .key[3] = {.b = {69, 78, 73, 67, 105, 115, 99, 111, 111, 108}},
};
int err;
u8 name[NAME_MAX];
{
dma_addr_t rss_cpu_buf_pa;
union vnic_rss_cpu *rss_cpu_buf_va = NULL;
- unsigned int i;
+ int i;
int err;
u8 name[NAME_MAX];
static void enic_dev_deinit(struct enic *enic)
{
- unsigned int i;
struct rte_eth_dev *eth_dev = enic->rte_dev;
if (eth_dev->data->mac_addrs)
static int enic_dev_init(struct enic *enic)
{
- unsigned int i;
int err;
struct rte_eth_dev *eth_dev = enic->rte_dev;
int enic_probe(struct enic *enic)
{
- const char *bdf = enic->bdf_name;
struct rte_pci_device *pdev = enic->pdev;
- struct rte_eth_dev *eth_dev = enic->rte_dev;
- unsigned int i;
int err = -1;
dev_info(enic, " Initializing ENIC PMD version %s\n", DRV_VERSION);