From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f176.google.com (mail-wi0-f176.google.com [209.85.212.176]) by dpdk.org (Postfix) with ESMTP id 279198005 for ; Wed, 29 Oct 2014 10:47:06 +0100 (CET) Received: by mail-wi0-f176.google.com with SMTP id h11so1155189wiw.3 for ; Wed, 29 Oct 2014 02:55:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=0/a/uqQiTfSR+U3WSIqWtpXAl1/F8g8Nx3uTkIq/rUs=; b=KBND8kzJz+X+fJFE79gEFqziba5gfYoqvJhXyPm5ik5tseEjBcG9dangO4g/ovanBN eNEuXsYk3Wi51jvBPazpA70rPa95uz6ZnFIOeJ/T1a0MPuFckijkmhHz2nCnnqyopw6X XK3h1K2G1HBvf5EHyXblCGlFsWCPg3LwW6cOCg4W9tCaErX9h3gLRlVCdRSEoEfk4Xlg v7AZSIqq3w1MR24jfjNAbmF68vYkmNtlP2UNMKp1DA/ii6gqZgIw9wgFYTOBzOvj7/zd biiIKOKJImGt+xP4B5duFyvU36qfLxGNsv4TOlyxYnzomod9kNf3lAr+dQDEABzPYb/Q RTug== X-Gm-Message-State: ALoCoQmM2KqUcj3DQqxSajo/iAE19ssrxWBcocyMXqliLSUCo+GJgKcfpxOl7xq3+wCK1m7PfwhD X-Received: by 10.180.12.136 with SMTP id y8mr20969526wib.73.1414576557229; Wed, 29 Oct 2014 02:55:57 -0700 (PDT) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id l10sm18142761wif.20.2014.10.29.02.55.55 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Oct 2014 02:55:56 -0700 (PDT) From: Thomas Monjalon To: "Wu, Jingjing" Date: Wed, 29 Oct 2014 10:55:38 +0100 Message-ID: <5004228.PGr5ZRLVhe@xps13> Organization: 6WIND User-Agent: KMail/4.14.2 (Linux/3.17.1-1-ARCH; KDE/4.14.2; x86_64; ; ) In-Reply-To: <9BB6961774997848B5B42BEC655768F8B24FC7@SHSMSX104.ccr.corp.intel.com> References: <1411711418-12881-1-git-send-email-jingjing.wu@intel.com> <5358622.rv8SXXlaQB@xps13> <9BB6961774997848B5B42BEC655768F8B24FC7@SHSMSX104.ccr.corp.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v4 16/21] ethdev: define structures for configuring flexible payload X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Oct 2014 09:47:06 -0000 2014-10-29 03:21, Wu, Jingjing: > > > -----Original Message----- > > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > > Sent: Tuesday, October 28, 2014 10:15 PM > > To: Wu, Jingjing > > Cc: dev@dpdk.org > > Subject: Re: [dpdk-dev] [PATCH v4 16/21] ethdev: define structures for > > configuring flexible payload > > > > 2014-10-22 09:01, Jingjing Wu: > > > +/** > > > + * A structure defined a field vector to specify each field. > > > + */ > > > +struct rte_eth_field_vector { > > > + uint8_t offset; /**< Source word offset */ > > > + uint8_t size; /**< Field Size defined in word units */ > > > +}; > > > > I'm sorry but I don't understand this patch at all. > > I think the reason is that I need more information about flex filter. > > > > Yes, it is a little difficult to understand the behavior. Let me explain it as I can. > <1> flex words: > We can select where the 8 flex words are. It can be constituted of 1-3 partitions. > Each partition is defined as rte_eth_field_vector. > For example: > if we set > rte_eth_flex_payload_cfg = { > .type = RTE_ETH_L4_PAYLOAD; > .nb_field = 1; > .field = { > {0, 8}, /*offset = 0, size =8*/ > }; > }; > This means the 8 words from the beginning of l4 payload will be consider as flex words. > If we set > rte_eth_flex_payload_cfg = { > .type = RTE_ETH_L4_PAYLOAD; > .nb_field = 1; > .field = { > {0, 2}, /*offset = 0, size =2*/ > {4, 6}, /*offset = 4, size =6*/ > }; > }; > This means the 2 words from the beginning of l4 payload plus 6 words form the offset 4 > will be consider as flex words. > > <2> flex mask: > As the <1> configuration, we already select 8 words as flex words. Then the flex mask > Will help us to define whether these word will participate in comparing. > The flex mask can be constituted of 2 partitions. One is word mask, another is bit mask. > Word mask is defined in rte_eth_fdir_flex_masks.words_mask, it means bit i enables word i of flex words. > rte_eth_fdir_flex_masks.field specify each word's bit mask, Fortville support 2 word bitmask. OK thanks. The most difficult task will be to explain it in the doxygen comment :) Please try to be precise and concise in doxygen comments. It must be a reference when using the API. If more examples are required, the developer can look into the programmer's guide. -- Thomas