-a DBDF,representor=sf[1,3,5]
-a DBDF,representor=sf[0-1023]
-a DBDF,representor=sf[0,2-4,7,9-11]
+ -a DBDF,representor=pf1vf0
+ -a DBDF,representor=pf[0-1]sf[0-127]
+ -a DBDF,representor=pf1
Note: PMDs are not required to support the standard device arguments and users
should consult the relevant PMD documentation to see support devargs.
* **Enhanced ethdev representor syntax.**
- * Introduced representor type of VF, SF.
+ * Introduced representor type of VF, SF and PF.
* Supported sub-function in representor syntax::
representor=# [0,2-4] /* Legacy VF compatible. */
- representor=sf# sf[0,2-1023] /* 1023 SFs. */
+ representor=[pf#]vf# pf2vf3 /* VF 3 on PF 2. */
+ representor=[pf#]sf# sf[0,2-1023] /* 1023 SFs. */
+ representor=pf# pf[0,1] /* 2 PFs. */
* **Updated Broadcom bnxt driver.**
*
* Representor format:
* #: range or single number of VF representor - legacy
- * vf#: VF port representor/s
- * sf#: SF port representor/s
+ * [pf#]vf#: VF port representor/s
+ * [pf#]sf#: SF port representor/s
+ * pf#: PF port representor/s
*
* Examples of #:
* 2 - single
{
struct rte_eth_devargs *eth_da = data;
+ if (str[0] == 'p' && str[1] == 'f') {
+ eth_da->type = RTE_ETH_REPRESENTOR_PF;
+ str += 2;
+ str = rte_eth_devargs_process_list(str, eth_da->ports,
+ ð_da->nb_ports, RTE_DIM(eth_da->ports));
+ if (str == NULL || str[0] == '\0')
+ goto done;
+ }
if (str[0] == 'v' && str[1] == 'f') {
eth_da->type = RTE_ETH_REPRESENTOR_VF;
str += 2;
eth_da->type = RTE_ETH_REPRESENTOR_SF;
str += 2;
} else {
+ /* 'pf' must followed by 'vf' or 'sf'. */
+ if (eth_da->type == RTE_ETH_REPRESENTOR_PF) {
+ str = NULL;
+ goto done;
+ }
eth_da->type = RTE_ETH_REPRESENTOR_VF;
}
str = rte_eth_devargs_process_list(str, eth_da->representor_ports,
ð_da->nb_representor_ports,
RTE_DIM(eth_da->representor_ports));
+done:
if (str == NULL)
RTE_LOG(ERR, EAL, "wrong representor format: %s\n", str);
return str == NULL ? -1 : 0;
RTE_ETH_REPRESENTOR_NONE, /**< not a representor. */
RTE_ETH_REPRESENTOR_VF, /**< representor of Virtual Function. */
RTE_ETH_REPRESENTOR_SF, /**< representor of Sub Function. */
+ RTE_ETH_REPRESENTOR_PF, /**< representor of Physical Function. */
};
/**