From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from alln-iport-8.cisco.com (alln-iport-8.cisco.com [173.37.142.95]) by dpdk.org (Postfix) with ESMTP id C795F5938 for ; Tue, 30 Dec 2014 05:46:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=3556; q=dns/txt; s=iport; t=1419914763; x=1421124363; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=RUFf8B/Ua9jDjOXrb5/Y5DCSpSALXW1Zovgs0tfI9jY=; b=Gg/Afy0Mv4ha0HNVU8pyQKqNW80qGy6rxEDd1Kenmw/qz5ePQhUBd5Ar Rgl1TPxP7Wp+Cs1Rbeysm8EZ2esm3Ns6qAVXuYW1UhL/gpvjWqxPziYkD /oXJXCzZlu9q8O7BFZQ4pTk6m0XKBd+anLY/WjgvkTt8Fqb2KgwMtm4Ag g=; X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApEFAOQsolStJV2T/2dsb2JhbABcgwZSWATGTYV5AoEMFgEBAQEBfYQNAQEEJxM/EAIBCDYQMiUCBAENBQmIIw3DIgEBAQEBAQEBAQEBAQEBAQEBAQEZj3cCBYQpBY4ViHORUCKDbm8BgUR+AQEB X-IronPort-AV: E=Sophos;i="5.07,663,1413244800"; d="scan'208";a="109137325" Received: from rcdn-core-11.cisco.com ([173.37.93.147]) by alln-iport-8.cisco.com with ESMTP; 30 Dec 2014 04:46:02 +0000 Received: from xhc-aln-x03.cisco.com (xhc-aln-x03.cisco.com [173.36.12.77]) by rcdn-core-11.cisco.com (8.14.5/8.14.5) with ESMTP id sBU4k21u031452 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Tue, 30 Dec 2014 04:46:02 GMT Received: from xmb-aln-x07.cisco.com ([169.254.2.173]) by xhc-aln-x03.cisco.com ([173.36.12.77]) with mapi id 14.03.0195.001; Mon, 29 Dec 2014 22:46:02 -0600 From: "Sujith Sankar (ssujith)" To: "Wu, Jingjing" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v6 5/6] enicpmd: DPDK-ENIC PMD interface Thread-Index: AQHQCNVlq9yCe0dqw0mAcoBC1jW8dZym0iOAgAG0AIA= Date: Tue, 30 Dec 2014 04:45:33 +0000 Message-ID: References: <1416936405-25333-1-git-send-email-ssujith@cisco.com> <1416936405-25333-6-git-send-email-ssujith@cisco.com> <9BB6961774997848B5B42BEC655768F8B6647D@SHSMSX104.ccr.corp.intel.com> In-Reply-To: <9BB6961774997848B5B42BEC655768F8B6647D@SHSMSX104.ccr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.3.9.131030 x-originating-ip: [10.65.71.150] Content-Type: text/plain; charset="us-ascii" Content-ID: <6C929FAF8746484AA480558256439025@emea.cisco.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "Prasad Rao \(prrao\)" Subject: Re: [dpdk-dev] [PATCH v6 5/6] enicpmd: DPDK-ENIC PMD interface X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2014 04:46:04 -0000 On 29/12/14 1:45 pm, "Wu, Jingjing" wrote: >Hi, ssujith > >> + .tx_queue_release =3D enicpmd_dev_tx_queue_release, >> + .dev_led_on =3D NULL, >> + .dev_led_off =3D NULL, >> + .flow_ctrl_get =3D NULL, >> + .flow_ctrl_set =3D NULL, >> + .priority_flow_ctrl_set =3D NULL, >> + .mac_addr_add =3D enicpmd_add_mac_addr, >> + .mac_addr_remove =3D enicpmd_remove_mac_addr, >> + .fdir_add_signature_filter =3D NULL, >> + .fdir_update_signature_filter =3D NULL, >> + .fdir_remove_signature_filter =3D NULL, >> + .fdir_infos_get =3D enicpmd_fdir_info_get, >> + .fdir_add_perfect_filter =3D enicpmd_fdir_add_perfect_filter, >> + .fdir_update_perfect_filter =3D enicpmd_fdir_add_perfect_filter, >> + .fdir_remove_perfect_filter =3D enicpmd_fdir_remove_perfect_filter, >> + .fdir_set_masks =3D 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 > >So, do you have any plan to migrate the fdir in enic to the filter_ctrl >API? > >Jingjing > >Thanks! > >> +struct enic *enicpmd_list_head =3D 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 =3D pmd_priv(eth_dev); >> + >> + ENICPMD_FUNC_TRACE(); >> + >> + enic->rte_dev =3D eth_dev; >> + eth_dev->dev_ops =3D &enicpmd_eth_dev_ops; >> + eth_dev->rx_pkt_burst =3D &enicpmd_recv_pkts; >> + eth_dev->tx_pkt_burst =3D &enicpmd_xmit_pkts; >> + >> + pdev =3D eth_dev->pci_dev; >> + enic->pdev =3D pdev; >> + addr =3D &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 =3D { >> + { >> + .name =3D "rte_enic_pmd", >> + .id_table =3D pci_id_enic_map, >> + .drv_flags =3D RTE_PCI_DRV_NEED_MAPPING, >> + }, >> + .eth_dev_init =3D eth_enicpmd_dev_init, >> + .dev_private_size =3D 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 =3D { >> + .type =3D PMD_PDEV, >> + .init =3D rte_enic_pmd_init, >> +}; >> + >> +PMD_REGISTER_DRIVER(rte_enic_driver); >> + >> -- >> 1.9.1 >