[dpdk-dev] [PATCH 1/2] LACP control packet filtering offload

Adrien Mazarguil adrien.mazarguil at 6wind.com
Mon May 29 10:10:22 CEST 2017


Hi Tomasz,

On Sat, May 27, 2017 at 01:27:43PM +0200, Tomasz Kulasek wrote:
> New API funtions implemented:
> 
>    rte_eth_bond_8023ad_slow_queue_enable(uint8_t port_id);
>    rte_eth_bond_8023ad_slow_queue_disable(uint8_t port_id);
> 
> rte_eth_bond_8023ad_slow_queue_enable should be called before bonding port
> start to enable new path.
> 
> When this option is enabled all slaves must support flow director's
> filtering by ethernet type and support one additional queue on slaves
> tx/rx.
> 
> Signed-off-by: Tomasz Kulasek <tomaszx.kulasek at intel.com>
[...]
> diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
> index 82959ab..558682c 100644
> --- a/drivers/net/bonding/rte_eth_bond_pmd.c
> +++ b/drivers/net/bonding/rte_eth_bond_pmd.c
> @@ -59,6 +59,12 @@
>  /* Table for statistics in mode 5 TLB */
>  static uint64_t tlb_last_obytets[RTE_MAX_ETHPORTS];
>  
> +#if  __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
> +#define _htons(x) ((uint16_t)((((x) & 0x00ffU) << 8) | (((x) & 0xff00U) >> 8)))
> +#else
> +#define _htons(x) (x)
> +#endif
> +
[...]
>  static inline size_t
>  get_vlan_offset(struct ether_hdr *eth_hdr, uint16_t *proto)
>  {
> @@ -133,6 +139,215 @@
>  		(subtype == SLOW_SUBTYPE_MARKER || subtype == SLOW_SUBTYPE_LACP));
>  }
>  
> +/*****************************************************************************
> + * Flow director's setup for mode 4 optimization
> + */
> +
> +static struct rte_flow_item_eth flow_item_eth_type_8023ad = {
> +	.dst.addr_bytes = { 0 },
> +	.src.addr_bytes = { 0 },
> +	.type = _htons(ETHER_TYPE_SLOW),
> +};

Might I interest you in a more generic alternative [1]?

[1] http://dpdk.org/ml/archives/dev/2017-May/066097.html

-- 
Adrien Mazarguil
6WIND


More information about the dev mailing list