From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3BFF1A00E6 for ; Mon, 5 Aug 2019 10:11:14 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BE1F41BE0A; Mon, 5 Aug 2019 10:11:13 +0200 (CEST) Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) by dpdk.org (Postfix) with ESMTP id BA3831BE09 for ; Mon, 5 Aug 2019 10:11:12 +0200 (CEST) Received: by mail-wr1-f43.google.com with SMTP id r1so83367282wrl.7 for ; Mon, 05 Aug 2019 01:11:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=pXpcThGEqngG/ktlrBwA/WOiG9YJvmhTWyk8gk3A2rE=; b=WdBZ9Yfk+nq+2Pthmm/z4xDRjdCJKX8KAyvkzUxVmh7T253CLJ0gT2PDlgrWmzkG7D HZ/XbhHqz7gf5G8R9CJgGh2/GP3ULlOZEJsHVslRIrikvXIdLmaanzEHWXPEePVXJ+oS T49z5uWKalbvqF/VsvTqH2jp8oobFAe2P6TXlQf1J+HJTXHfz8V69TQ6ql09Eso0iZ1u DwDjsuci2pleCyMnyxB3MxSxIH2vh5lC+XFvDAKGIYK6VQ5AgXr2ere+eaKkGjVg1hxQ HCCvTuM9eMC6sWIdltR2gq+RIz+q6/4nuqntuqfyDnuhr28VT93ycbu2C4MYpDo5oha6 8Nrg== 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=pXpcThGEqngG/ktlrBwA/WOiG9YJvmhTWyk8gk3A2rE=; b=rrI+rLO5BMdTf0w+kuDHVOnVV1laXAA8ay8wME2tlMjNFIcop/bZfMc9+OayNqB4ce EoX5LAT56igZcZBP/lUyD9e4hy14pKXwfATlVNVwVDwxUgJwyRVW5fe+wPlNSKRtoG06 3cxdSH7HdoBckogg8A+wWVDDO0tV2MhgdnPPjC6J0Cr5+ofv6OWIslzqQvpQMO+VZXpZ wqQp2lDBEizJGUBdU0NFGlRZuXV2AbH6lMgtYFbMBuXLUMSooNs4l20rDwy1GAOyRPEk xUgnEqZFIS60srkgw415JBHgMqYgYKb4weR9ScWbfRVOwI/l+v6ASc4h9G+Istzk/XeA 0LaA== X-Gm-Message-State: APjAAAUW6+Ts7h4nKBPWIXXVSH1RxpSjUrbQ06rON0O6+LLbLQ7uxX2g 8PPcVN3USwvRzxrZ0FHk+7JAhw== X-Google-Smtp-Source: APXvYqxCJP7n+La7O4WMBwijuaDyvU+1NH9vgd0RV+7ZAFV/CLroEH48zuuzdeiMeuF08mlbNQILPQ== X-Received: by 2002:adf:e8d0:: with SMTP id k16mr17100777wrn.31.1564992672506; Mon, 05 Aug 2019 01:11:12 -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 y18sm79979683wmi.23.2019.08.05.01.11.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Aug 2019 01:11:11 -0700 (PDT) Date: Mon, 5 Aug 2019 10:11:10 +0200 From: Adrien Mazarguil To: Arvind Narayanan Cc: users Message-ID: <20190805081110.GI4512@6wind.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [dpdk-users] rte_flow multiple queues in same rule's action set X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org Sender: "users" On Fri, Aug 02, 2019 at 06:01:49PM -0500, Arvind Narayanan wrote: > Hi, > > In rte_flow docs, there is an example (Table 11.28) where the action > set consists of 4 actions: > > 1. queue(index=5) > 2. VOID > 3. queue(index=3) > 4. END > The docs further say such a rule effectively duplicates the traffic to > both queue 3 and 5. Does this mean "two different mbufs" exist for the > same incoming packet, or does it mean it only duplicates the mbuf > references? > > Any clarification is appreciated. Beware I'm not aware of any driver properly supporting this at the moment, so specifying QUEUE twice should usually result in an error, but I think some drivers don't quite expect it and will silently ignore one of them (that's a bug). In any case you're right, it's unspecified and we should fix that. There are 3 options: 1. Separate mbufs are returned. That was the original unwritten assumption (see below). 2. Separate mbufs are returned, but one of them is a clone so they actually share data and RTE_MBUF_CLONED() returns true for one of them. 3. The same mbuf pointer is returned, in which case at the very least, mbuf refcount should be 2 not to break rte_pktmbuf_free(). In practice drivers can normally not return the same mbuf from two distinct Rx queues at the same time since Rx mbufs are allocated independently for each Rx queue. Mbufs are preallocated during setup and replaced while doing Rx, right before returning them to the application to avoid starvation. I do not think DPDK applications are ready for 2 and 3 yet. Also due to the above, doing so would require extra work on the PMD side. -- Adrien Mazarguil 6WIND