[dpdk-dev] [PATCH v6 5/6] enicpmd: DPDK-ENIC PMD interface
Wu, Jingjing
jingjing.wu at intel.com
Fri Jan 30 09:53:11 CET 2015
Hi, ssujith
> -----Original Message-----
> From: Sujith Sankar (ssujith) [mailto:ssujith at cisco.com]
> Sent: Tuesday, December 30, 2014 12:46 PM
> To: Wu, Jingjing; dev at dpdk.org
> Cc: Prasad Rao (prrao)
> Subject: Re: [dpdk-dev] [PATCH v6 5/6] enicpmd: DPDK-ENIC PMD interface
>
>
>
> On 29/12/14 1:45 pm, "Wu, Jingjing" <jingjing.wu at intel.com> wrote:
>
> >Hi, ssujith
> >
> >> + .tx_queue_release = enicpmd_dev_tx_queue_release,
> >> + .dev_led_on = NULL,
> >> + .dev_led_off = NULL,
> >> + .flow_ctrl_get = NULL,
> >> + .flow_ctrl_set = NULL,
> >> + .priority_flow_ctrl_set = NULL,
> >> + .mac_addr_add = enicpmd_add_mac_addr,
> >> + .mac_addr_remove = enicpmd_remove_mac_addr,
> >> + .fdir_add_signature_filter = NULL,
> >> + .fdir_update_signature_filter = NULL,
> >> + .fdir_remove_signature_filter = NULL,
> >> + .fdir_infos_get = enicpmd_fdir_info_get,
> >> + .fdir_add_perfect_filter = enicpmd_fdir_add_perfect_filter,
> >> + .fdir_update_perfect_filter = enicpmd_fdir_add_perfect_filter,
> >> + .fdir_remove_perfect_filter = enicpmd_fdir_remove_perfect_filter,
> >> + .fdir_set_masks = NULL,
> >> +};
> >> +
> >
> >I found that in perfect fdir is also supported in enic driver.
> >
> >During the R1.8 development, we defined a new dev_ops call filter_ctrl,
> >which can be used to control kinds of filters, flow director is
> >included too. Which is mentioned in
> >http://www.dpdk.org/ml/archives/dev/2014-September/005179.html .
> >In R1.8, filter_ctrl is only used by i40e driver. And we also planned
> >use it in the existing ixgbe/e1000 driver in the next days. The old
> >APIs such as fdir_add_perfect_filter, fdir_remove_perfect_filter can be
> >replaced then.
>
>
> Hi Jingjing,
> Thanks for the info and the link. I shall take a look at it.
> It looks like bringing in one interface for all filter related operations.
> I believe ENIC should also move to it.
>
> Thanks,
> -Sujith
>
Just let you know that, I already sent the patch to migrate the flow director in ixgbe driver to new filter_ctrl API.
http://www.dpdk.org/ml/archives/dev/2015-January/011830.html
To avoid compile error and influence to enic driver. I didn't remove the old APIs and structures in rte_ethdev. I think they can be removed when the migration in enic driver is done. Do you have any plan for this?
Thank u!
Jingjing
> >
> >So, do you have any plan to migrate the fdir in enic to the filter_ctrl
> >API?
> >
> >Jingjing
> >
> >Thanks!
> >
> >> +struct enic *enicpmd_list_head = NULL;
> >> +/* Initialize the driver
> >> + * It returns 0 on success.
> >> + */
> >> +static int eth_enicpmd_dev_init(
> >> + __attribute__((unused))struct eth_driver *eth_drv,
> >> + struct rte_eth_dev *eth_dev)
> >> +{
> >> + struct rte_pci_device *pdev;
> >> + struct rte_pci_addr *addr;
> >> + struct enic *enic = pmd_priv(eth_dev);
> >> +
> >> + ENICPMD_FUNC_TRACE();
> >> +
> >> + enic->rte_dev = eth_dev;
> >> + eth_dev->dev_ops = &enicpmd_eth_dev_ops;
> >> + eth_dev->rx_pkt_burst = &enicpmd_recv_pkts;
> >> + eth_dev->tx_pkt_burst = &enicpmd_xmit_pkts;
> >> +
> >> + pdev = eth_dev->pci_dev;
> >> + enic->pdev = pdev;
> >> + addr = &pdev->addr;
> >> +
> >> + snprintf(enic->bdf_name, ENICPMD_BDF_LENGTH,
> >> "%04x:%02x:%02x.%x",
> >> + addr->domain, addr->bus, addr->devid, addr->function);
> >> +
> >> + return enic_probe(enic);
> >> +}
> >> +
> >> +static struct eth_driver rte_enic_pmd = {
> >> + {
> >> + .name = "rte_enic_pmd",
> >> + .id_table = pci_id_enic_map,
> >> + .drv_flags = RTE_PCI_DRV_NEED_MAPPING,
> >> + },
> >> + .eth_dev_init = eth_enicpmd_dev_init,
> >> + .dev_private_size = sizeof(struct enic), };
> >> +
> >> +/* Driver initialization routine.
> >> + * 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,
> >> + const char *params __rte_unused)
> >> +{
> >> + ENICPMD_FUNC_TRACE();
> >> +
> >> + rte_eth_driver_register(&rte_enic_pmd);
> >> + return 0;
> >> +}
> >> +
> >> +static struct rte_driver rte_enic_driver = {
> >> + .type = PMD_PDEV,
> >> + .init = rte_enic_pmd_init,
> >> +};
> >> +
> >> +PMD_REGISTER_DRIVER(rte_enic_driver);
> >> +
> >> --
> >> 1.9.1
> >
More information about the dev
mailing list