All the format issue will be rechecked in the next version > -----Original Message----- > From: Xing, Beilei <beilei.x...@intel.com> > Sent: Tuesday, September 8, 2020 19:35 > To: Yang, Qiming <qiming.y...@intel.com>; dev@dpdk.org > Cc: Zhang, Qi Z <qi.z.zh...@intel.com>; Yang, Qiming > <qiming.y...@intel.com> > Subject: RE: [dpdk-dev] [PATCH 1/2] net/ice: add dcf port representor > infrastructure > > > > > -----Original Message----- > > From: dev <dev-boun...@dpdk.org> On Behalf Of Qiming Yang > > Sent: Wednesday, September 2, 2020 2:38 PM > > To: dev@dpdk.org > > Cc: Zhang, Qi Z <qi.z.zh...@intel.com>; Yang, Qiming > > <qiming.y...@intel.com> > > Subject: [dpdk-dev] [PATCH 1/2] net/ice: add dcf port representor > > infrastructure > > > > Defines data structures and code to init/uninit VF representors during > > pci_probe and pci_remove respectively. > > Most of the dev_ops for the VF representor are just stubs for now and > > will be will be filled out in next patch > > > > Signed-off-by: Qiming Yang <qiming.y...@intel.com> > > --- > > drivers/net/ice/Makefile | 1 + > > drivers/net/ice/ice_dcf_ethdev.c | 66 +++++- > > drivers/net/ice/ice_dcf_ethdev.h | 11 + > > drivers/net/ice/ice_dcf_vf_representor.c | 245 > > +++++++++++++++++++++++ > > 4 files changed, 321 insertions(+), 2 deletions(-) create mode > > 100644 drivers/net/ice/ice_dcf_vf_representor.c > > > > diff --git a/drivers/net/ice/Makefile b/drivers/net/ice/Makefile index > > 34cd4024b..f9eb34a87 100644 > > --- a/drivers/net/ice/Makefile > > +++ b/drivers/net/ice/Makefile > > @@ -88,6 +88,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_ICE_PMD) += > > ice_generic_flow.c > > > > SRCS-$(CONFIG_RTE_LIBRTE_ICE_PMD) += ice_dcf.c > > SRCS-$(CONFIG_RTE_LIBRTE_ICE_PMD) += ice_dcf_ethdev.c > > +SRCS-$(CONFIG_RTE_LIBRTE_ICE_PMD) += ice_dcf_vf_representor.c > > SRCS-$(CONFIG_RTE_LIBRTE_ICE_PMD) += ice_dcf_parent.c > > > > <...> > > > + > > +static int > > +ice_dcf_representor_tx_queue_setup(__rte_unused struct rte_eth_dev > *dev, > > + __rte_unused uint16_t rx_queue_id, > Should be tx_queue_id which is more readable? > > > + __rte_unused uint16_t nb_rx_desc, > Should be nb_tx_desc?
typo > > > + __rte_unused unsigned int socket_id, > > + __rte_unused const struct rte_eth_txconf *tx_conf) > { > > + return 0; > > +} > > + > > <...> > > > + > > + /* No data-path, but need stub Rx/Tx functions to avoid crash > > + * when testing with the likes of testpmd. > > + */ > > + ethdev->rx_pkt_burst = ice_dcf_representor_rx_burst; > > + ethdev->tx_pkt_burst = ice_dcf_representor_tx_burst; > > + > > + ethdev->data->dev_flags |= RTE_ETH_DEV_REPRESENTOR; > > + ethdev->data->representor_id = representor->vf_id; > > + > > + struct rte_ether_addr mac_addr; > Why not move this to the beginning of the function? Format error > > > + > > + memset(&mac_addr, 0, sizeof(mac_addr)); > > + ethdev->data->mac_addrs = &mac_addr; > > + > > + return 0; > > +} > > + > > +int > > +ice_dcf_vf_representor_uninit(struct rte_eth_dev *ethdev) { > > + ethdev->data->mac_addrs = NULL; > > + > > + return 0; > > +} > > + > > -- > > 2.17.1