X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fenic%2Fenic_main.c;h=2a06d468720775522a3d6a96323dbc18db4e38b7;hb=0604b1f2208f54ae76030e437db40f9da558497b;hp=d0d41035fd3b8de6d87986e9c251498f674b2daa;hpb=edd0854815503c1c2b60cc80841b462873fa3866;p=dpdk.git diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c index d0d41035fd..2a06d46872 100644 --- a/drivers/net/enic/enic_main.c +++ b/drivers/net/enic/enic_main.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include "enic_compat.h" #include "enic.h" @@ -534,6 +534,11 @@ void enic_pick_rx_handler(struct rte_eth_dev *eth_dev) { struct enic *enic = pmd_priv(eth_dev); + if (enic->cq64) { + ENICPMD_LOG(DEBUG, " use the normal Rx handler for 64B CQ entry"); + eth_dev->rx_pkt_burst = &enic_recv_pkts_64; + return; + } /* * Preference order: * 1. The vectorized handler if possible and requested. @@ -603,9 +608,6 @@ int enic_enable(struct enic *enic) err = enic_rxq_intr_init(enic); if (err) return err; - if (enic_clsf_init(enic)) - dev_warning(enic, "Init of hash table for clsf failed."\ - "Flow director feature will not work\n"); /* Initialize flowman if not already initialized during probe */ if (enic->fm == NULL && enic_fm_init(enic)) @@ -954,8 +956,22 @@ int enic_alloc_rq(struct enic *enic, uint16_t queue_idx, } nb_data_desc = rq_data->ring.desc_count; } + /* Enable 64B CQ entry if requested */ + if (enic->cq64 && vnic_dev_set_cq_entry_size(enic->vdev, + sop_queue_idx, VNIC_RQ_CQ_ENTRY_SIZE_64)) { + dev_err(enic, "failed to enable 64B CQ entry on sop rq\n"); + goto err_free_rq_data; + } + if (rq_data->in_use && enic->cq64 && + vnic_dev_set_cq_entry_size(enic->vdev, data_queue_idx, + VNIC_RQ_CQ_ENTRY_SIZE_64)) { + dev_err(enic, "failed to enable 64B CQ entry on data rq\n"); + goto err_free_rq_data; + } + rc = vnic_cq_alloc(enic->vdev, &enic->cq[cq_idx], cq_idx, socket_id, nb_sop_desc + nb_data_desc, + enic->cq64 ? sizeof(struct cq_enet_rq_desc_64) : sizeof(struct cq_enet_rq_desc)); if (rc) { dev_err(enic, "error in allocation of cq for rq\n"); @@ -1102,7 +1118,6 @@ int enic_disable(struct enic *enic) vnic_dev_disable(enic->vdev); - enic_clsf_destroy(enic); enic_fm_destroy(enic); if (!enic_is_sriov_vf(enic)) @@ -1753,9 +1768,6 @@ static int enic_dev_init(struct enic *enic) return -1; } - /* Get the supported filters */ - enic_fdir_info(enic); - eth_dev->data->mac_addrs = rte_zmalloc("enic_mac_addr", sizeof(struct rte_ether_addr) * ENIC_UNICAST_PERFECT_FILTERS, 0);