[dpdk-dev] [PATCH v5 3/8] ethdev: reserve capability flags for PMD-specific API
Ananyev, Konstantin
konstantin.ananyev at intel.com
Wed Jan 4 15:21:08 CET 2017
Hi Twei,
> -----Original Message-----
> From: Bie, Tiwei
> Sent: Wednesday, January 4, 2017 7:22 AM
> To: dev at dpdk.org
> Cc: adrien.mazarguil at 6wind.com; Lu, Wenzhuo <wenzhuo.lu at intel.com>; Mcnamara, John <john.mcnamara at intel.com>;
> olivier.matz at 6wind.com; thomas.monjalon at 6wind.com; Ananyev, Konstantin <konstantin.ananyev at intel.com>; Zhang, Helin
> <helin.zhang at intel.com>; Dai, Wei <wei.dai at intel.com>; Wang, Xiao W <xiao.w.wang at intel.com>
> Subject: [PATCH v5 3/8] ethdev: reserve capability flags for PMD-specific API
>
> Reserve a Tx capability flag and a Rx capability flag, that can be
> used by PMD to define its own capability flags when implementing the
> PMD-specific API.
>
> Suggested-by: Adrien Mazarguil <adrien.mazarguil at 6wind.com>
> Signed-off-by: Tiwei Bie <tiwei.bie at intel.com>
> Acked-by: Wenzhuo Lu <wenzhuo.lu at intel.com>
> ---
> lib/librte_ether/rte_ethdev.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
> index d465825..8800b39 100644
> --- a/lib/librte_ether/rte_ethdev.h
> +++ b/lib/librte_ether/rte_ethdev.h
> @@ -857,6 +857,7 @@ struct rte_eth_conf {
> #define DEV_RX_OFFLOAD_TCP_LRO 0x00000010
> #define DEV_RX_OFFLOAD_QINQ_STRIP 0x00000020
> #define DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM 0x00000040
> +#define DEV_RX_OFFLOAD_RESERVED_0 0x00000080 /**< Used for PMD-specific API. */
>
> /**
> * TX offload capabilities of a device.
> @@ -874,6 +875,7 @@ struct rte_eth_conf {
> #define DEV_TX_OFFLOAD_GRE_TNL_TSO 0x00000400 /**< Used for tunneling packet. */
> #define DEV_TX_OFFLOAD_IPIP_TNL_TSO 0x00000800 /**< Used for tunneling packet. */
> #define DEV_TX_OFFLOAD_GENEVE_TNL_TSO 0x00001000 /**< Used for tunneling packet. */
> +#define DEV_TX_OFFLOAD_RESERVED_0 0x00002000 /**< Used for PMD-specific API. */
>
> /**
> * Ethernet device information
> --
> 2.7.4
I am not sure how that supposed to work and how user should know that DEV_RX_OFFLOAD_RESERVED_0
is actually a MACSEC for ixgbe?
Another question what to do if you would like to create a bonded device over two devices with different NIC types?
As I understand you can end up in situation when DEV_RX_OFFLOAD_RESERVED_0 would mean different capabilities.
Why not to have this MACSEC capability and ol_flag value as generic ones, as you have them in previous versions of your patch?
Konstantin
More information about the dev
mailing list