From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adrien Mazarguil Subject: Re: [PATCH 1/2] LACP control packet filtering offload Date: Mon, 29 May 2017 10:10:22 +0200 Message-ID: <20170529081022.GM1758@6wind.com> References: <1495884464-3548-1-git-send-email-tomaszx.kulasek@intel.com> <1495884464-3548-2-git-send-email-tomaszx.kulasek@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org, declan.doherty@intel.com To: Tomasz Kulasek Return-path: Received: from mail-wm0-f51.google.com (mail-wm0-f51.google.com [74.125.82.51]) by dpdk.org (Postfix) with ESMTP id 764327CC8 for ; Mon, 29 May 2017 10:10:29 +0200 (CEST) Received: by mail-wm0-f51.google.com with SMTP id b84so45565876wmh.0 for ; Mon, 29 May 2017 01:10:29 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1495884464-3548-2-git-send-email-tomaszx.kulasek@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 [...] > 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