From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=p8Ei/+USqSQNLYELImmwpp9d9SAwokQzHe7qcDvIf3M=; b=XL8InEpH54lOrx3+vLgLS0K7XWUP/mFPqe0VshfiH5gzW3uT6OW7NZHVRumGTNSK2Q 9RGYJHp5AZ4hk5ajaoeAAnBJAPtEAXcdhZTnbhFVI86vonMHgINiv7fcqyyTwLxzFogo irXoRakHdBnqa74ZV7frFCdHHNrTrLw4SOj2QWjCivAmfxOWrNbFlfywR983BimJTI3m M5k0K9WeORiI0/37p1Cz0R5ff6CUu7+ILGdUcmB1OrVVMovPIPWaXugLz6GcsF6Ii1sC CDAf1/QFvToOBpiNBYQagMX4SYL56h29XoqZQCWnQPGXX2WoS4J27r2k2EnsypREIqrU T1lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=p8Ei/+USqSQNLYELImmwpp9d9SAwokQzHe7qcDvIf3M=; b=h48fHZwr9V9gzpAEE4GcyYc6IKW5snJ+jUfSeWhnzf+haY4LuoU1wiYALjCN2AncbI MH0WlzGcuJTTnHkv2A2/MOWGY3QB85Dpe/qOZ6sTr6puRpRr+ec8KyKSXqYFv2IxS5we kRVDio2GMgAn46k4MtFrBS7IXSVrRkH3/S73qdfHZ72FA0WfzOEnsEy1mp3WjmK2YU/h WVe7CMWaYZlqhGovG1lzxapdj7Rp5sppbgTpcMOvgLmwmMTtTtQOHMQnNnV+cCfdhSRc SI2LeDAi8Ql5z+cPIi8FgUvDUzS2OoIHbl8c4eNMq6uqDVgobd5O8IuwD8uQZDKe33dH w+pA== X-Gm-Message-State: AODbwcCJhuf/NBhOioms2pxymtWTe2eHm6FrVet/oiaByE1nBZ95Zxi4 oCSoL3xfUDXcGO3G X-Received: by 10.223.131.67 with SMTP id 61mr9139913wrd.37.1496045429217; Mon, 29 May 2017 01:10:29 -0700 (PDT) Received: from 6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id l190sm12981242wmb.18.2017.05.29.01.10.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 May 2017 01:10:28 -0700 (PDT) Date: Mon, 29 May 2017 10:10:22 +0200 From: Adrien Mazarguil To: Tomasz Kulasek Cc: dev@dpdk.org, declan.doherty@intel.com 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 Content-Disposition: inline In-Reply-To: <1495884464-3548-2-git-send-email-tomaszx.kulasek@intel.com> Subject: Re: [dpdk-dev] [PATCH 1/2] LACP control packet filtering offload X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 08:10:29 -0000 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