From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f49.google.com (mail-wm0-f49.google.com [74.125.82.49]) by dpdk.org (Postfix) with ESMTP id DB2632BA1 for ; Mon, 11 Jul 2016 12:06:26 +0200 (CEST) Received: by mail-wm0-f49.google.com with SMTP id i5so9104317wmg.0 for ; Mon, 11 Jul 2016 03:06:26 -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:mail-followup-to:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=YErPIuxnQ2/KhilOzS1M7F86iOJiz1o2cebsSZOdAQo=; b=oWiWwie04bKPfG9HhkBsAr//8iTRW8/3q/8AyLsMZoNb3/I4XcJIcHFaC0lCCuLkxa LSkoToy5hHf8Hk9m46Q7cpFeVchb4AyPqNMcWch9MMkNMfOgDWTvdvma7aOXfg9SOxq0 1102PPJO4bhAfdBdz4aMsPQs2KfNQp9IK/CW8VJ3G9eYpdqVzc0hXRzuQgtaXRBwptCY rbfC4Sor7dbdS7McOyqQgwNYs62rPEycIfRzLi86eZSZlvv/jRElyd0nQ+8gVLgsJn2h caGYO40DITo7pgYjUYKJgQq/JbZQbuCa5Z0DhhTZFA29oBz0vCKet/vsHVWufYBC/upI RCMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :content-transfer-encoding:in-reply-to; bh=YErPIuxnQ2/KhilOzS1M7F86iOJiz1o2cebsSZOdAQo=; b=L7gytfZEmCbJpCepr9dD6TNgboW7T/Ce0jiv6YgkgcogotCPQeIiwvYdRGOTepigsk 2wOPSno2rw5HIJTJjni3TFtRj7eUl646pNO9Yf4lWAk6VXOpAX5ZF8qrSy2VMdQA5BL5 lO2X0Ixizr7GimADeOobKjes013bJSfMyjeifzbgl+H+BwT5yMnhP6CX288C7XxGESxT 0z8PVEZJnN1V0USA+Sa5wbLwenYQcWt0yXU0adERv1I0iG3bbHdw+r+kWIKhY2Xrdplr 4POoAEH6QewtjqfB5NaPXBelZq6xL1bUnGre95h5UQEXDfvmkt5kkQv89KD4n520oD5i sKDw== X-Gm-Message-State: ALyK8tLTc++BF8IuJfDRNzkQlszMjFpKL0oYzqcuONyVRqAnSk33vEEh2EPavHrfznFThw7x X-Received: by 10.28.132.149 with SMTP id g143mr13785571wmd.100.1468231586634; Mon, 11 Jul 2016 03:06:26 -0700 (PDT) Received: from 6wind.com (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by smtp.gmail.com with ESMTPSA id v70sm4666252wmf.18.2016.07.11.03.06.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Jul 2016 03:06:25 -0700 (PDT) Date: Mon, 11 Jul 2016 12:06:22 +0200 From: Adrien Mazarguil To: "Liang, Cunming" Cc: "dev@dpdk.org" , Thomas Monjalon , "Zhang, Helin" , "Wu, Jingjing" , Rasesh Mody , Ajit Khaparde , Rahul Lakkireddy , "Lu, Wenzhuo" , Jan Medala , John Daley , "Chen, Jing D" , "Ananyev, Konstantin" , Matej Vido , Alejandro Lucero , Sony Chacko , Jerin Jacob , "De Lara Guarch, Pablo" , Olga Shern Message-ID: <20160711100621.GJ7621@6wind.com> Mail-Followup-To: "Liang, Cunming" , "dev@dpdk.org" , Thomas Monjalon , "Zhang, Helin" , "Wu, Jingjing" , Rasesh Mody , Ajit Khaparde , Rahul Lakkireddy , "Lu, Wenzhuo" , Jan Medala , John Daley , "Chen, Jing D" , "Ananyev, Konstantin" , Matej Vido , Alejandro Lucero , Sony Chacko , Jerin Jacob , "De Lara Guarch, Pablo" , Olga Shern References: <20160705181646.GO7621@6wind.com> <577F8A60.2000409@intel.com> <20160708132544.GE7621@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Subject: Re: [dpdk-dev] [RFC] Generic flow director/filtering/classification API 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: Mon, 11 Jul 2016 10:06:27 -0000 On Mon, Jul 11, 2016 at 03:18:19AM +0000, Liang, Cunming wrote: [...] > > > >When several actions are combined in a flow rule, they should all have > > > >different types (e.g. dropping a packet twice is not possible). However > > > >considering the VOID type is an exception to this rule, the defined behavior > > > >is for PMDs to only take into account the last action of a given type found > > > >in the list. PMDs still perform error checking on the entire list. > > > > > > > >*Note that PASSTHRU is the only action able to override a terminating rule.* > > > [LC] I'm wondering how to address the meta data carried by mbuf, there's no > > > mentioned here. > > > For packets hit one specific flow, usually there's something for CPU to > > > identify the flow. > > > FDIR and RSS as an example, has id or key in mbuf. In addition, some meta > > > may pointed by userdata in mbuf. > > > Any view on it ? > > > > Yes, this is defined as the ID action. It is described in 4.1.6.4 (ID) and > > there is an example how a FDIR rule would be converted to use it in 5.7 > > (FDIR to most item types → QUEUE, DROP, PASSTHRU). > [LC] So in RSS cases, the actions would be {RSS, ID}, in which ID represent for RSS key, right? Well, the ID action is always the same regardless of other actions, it takes an arbitrary 32 bit value to be returned back as meta data with matched packets, no side effect on RSS is expected. If you are talking about the RSS action (4.1.6.9), RSS configuration (key and algorithm to use) are provided in their specific structure along with the list of target queues (see struct rte_flow_action_rss in [1]). Note the RSS action is independent, it is unrelated to the port-wide RSS configuration. Devices may not be able to support both simultaneously, for instance creating multiple queues with RSS enabled globally may prevent requesting a flow rule with a RSS action later. Likewise, such a rule may possibly be defined only once depending on capabilities. For devices supporting both, think of it as multiple level RSS. Flow rules perform RSS on selected packets first, then the default global RSS configuration takes care of packets that haven't hit a terminating flow rule. This is the same as the QUEUE action except RSS is additionally performed to spread packet among several queues. Thus applications can request RSS with ID to get both RSS _and_ their arbitrary 32 bit value as meta data. Once again, HW support for this combination is not mandatory. PMDs can assist HW to work around such limitations sometimes as described in 4.4.4 (Unsupported actions) as long as the software cost is kept minimal. [1] https://raw.githubusercontent.com/6WIND/rte_flow/master/rte_flow.h -- Adrien Mazarguil 6WIND