[dpdk-dev] [PATCH v4 3/5] drivers/net/i40e: add Port Representor functionality

Ferruh Yigit ferruh.yigit at intel.com
Tue Jan 9 23:09:09 CET 2018


On 1/8/2018 2:37 PM, Remy Horton wrote:
> Port Representors provide a logical presentation in DPDK of VF (virtual
> function) ports for the purposes of control and monitoring. Each port
> representor device represents a single VF and is associated with it's
> parent physical function (PF) PMD which provides the back-end hooks for
> the representor device ops and defines the control domain to which that
> port belongs. This allows to use existing DPDK APIs to monitor and control
> the port without the need to create and maintain VF specific APIs.
> 
> This patch adds to the i40e PMD the functions required to enable port
> representor functionality.
> 
> Signed-off-by: Declan Doherty <declan.doherty at intel.com>
> Signed-off-by: Mohammad Abdul Awal <mohammad.abdul.awal at intel.com>
> Signed-off-by: Remy Horton <remy.horton at intel.com>

<...>

> @@ -85,6 +85,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e_fdir.c
>  SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e_flow.c
>  SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += rte_pmd_i40e.c
>  SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e_tm.c
> +SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e_prep_ops.c

This library should be a dependency to the driver now right? May need to update
both LDLIBS here.

<...>

> @@ -1428,6 +1440,10 @@ eth_i40e_dev_uninit(struct rte_eth_dev *dev)
>  	pci_dev = RTE_ETH_DEV_TO_PCI(dev);
>  	intr_handle = &pci_dev->intr_handle;
>  
> +	/* free port representor pmds */
> +	if (rte_representor_enabled())
> +		rte_representor_broker_uninit(pf->broker);

Shouldn't this free the "broker" allocated by i40e_port_representor_broker_init?

<...>

> +int
> +rte_pmd_i40e_remove_vf_mac_addr(uint8_t port, uint16_t vf_id,
> +	struct ether_addr *mac_addr)

port_id should be uint16_t

<...>

>  /**
> + * Remove the VF MAC address.
> + *
> + * @param port
> + *   The port identifier of the Ethernet device.
> + * @param vf_id
> + *   VF id.
> + * @param mac_addr
> + *   VF MAC address.
> + * @return
> + *   - (0) if successful.
> + *   - (-ENODEV) if *port* invalid.
> + *   - (-EINVAL) if *vf* or *mac_addr* is invalid.
> + */
> +int
> +rte_pmd_i40e_remove_vf_mac_addr(uint8_t port, uint16_t vf_id,
> +	struct ether_addr *mac_addr);
> +

New PMD specific API requires updating .map file for shared library.



More information about the dev mailing list