From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f54.google.com (mail-wm0-f54.google.com [74.125.82.54]) by dpdk.org (Postfix) with ESMTP id A9AED1B61F for ; Wed, 4 Oct 2017 10:19:28 +0200 (CEST) Received: by mail-wm0-f54.google.com with SMTP id b189so17222583wmd.4 for ; Wed, 04 Oct 2017 01:19:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=YXaMuBlnpXGMfs5lLPzuH3PsYyc48FJKrKFtCT3MGWs=; b=yfiEBZ4w/6SXKHtVmd/ib2N3EEGdk/KDWOZNd/SI6pIVirFEF85Qr5sU+oXoOaRu+m q1CAg4V9VblMS3/xDB6rEz3HrTQo001ttsy7pf+GWxGkxY5IARW2yIKglQcglKKQhdYa PB5Jgy/O7S1GlbPF4FZOJHg4ZKZqOP1jxoKCALXY7ZvC9zBd/qHsE6vDt4YMvjmuKmhE thpYvQEIULRbdTQRMAvz6O4AvQbJqAPRbzYgalM39ryfvYH/QBe30WvrbOXwE3r7Sd+p cffg2kpWjTl3EWCstXchmB0m0QPcC0WK/NBwYEg+1LkHUwo9BqChdJge9e7M6jwOKwJN mbQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=YXaMuBlnpXGMfs5lLPzuH3PsYyc48FJKrKFtCT3MGWs=; b=VjDx2YHU3HTogKYSxUuT4Ai8b1dLeo/Birgn/626c4dawpjwdr6xUrx55UZoKiWex7 boTBMfWvTzmUVoJLwRZBcdaSNwZW8YQ4Gr0/S8Lw2yXl3Sd+8PA+8ry4rfsWjdBJWq6k K7DbstP16GIggnCj4ePQrL1a7HIAT+dqVdQ8mnQURXqem/QgHKX8YIK30etbFaYCVtoW IE2CpThDzK84zzGp/3khCdzdaFHn+O9QlWNthJgOFpwYPzmSa6aEWZWNwYJ86dd2APOU BHmHfyIObw5C5dwO2wwqXy9LBoDtsPp0OUzIztXQ6Q9sK8dys1B/Gv8IAEw1olohlx+W qwpQ== X-Gm-Message-State: AHPjjUh7eF943WtcQcDVA++Rd9LBpnnfWrg5y3n4S/3UhBWwfktSl26t uo9UqI6NqW1CL3iTq8thDmv2Q9EqPV8= X-Google-Smtp-Source: AOwi7QDFxxopTS3iIPvWB4d6uN/G0LdzqCGs9eeSjt99pGTSeh/fEXIMu9HIwKXTbGPlr6t1IsDk1g== X-Received: by 10.80.165.200 with SMTP id b8mr28883660edc.186.1507105168193; Wed, 04 Oct 2017 01:19:28 -0700 (PDT) Received: from [10.16.18.139] (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id r13sm7739768edc.83.2017.10.04.01.19.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Oct 2017 01:19:27 -0700 (PDT) To: Matan Azrad Cc: dev@dpdk.org References: <1507042556-9839-1-git-send-email-matan@mellanox.com> <1507042556-9839-2-git-send-email-matan@mellanox.com> From: Pascal Mazon Message-ID: Date: Wed, 4 Oct 2017 10:19:34 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <1507042556-9839-2-git-send-email-matan@mellanox.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US Subject: Re: [dpdk-dev] [PATCH 2/2] net/tap: allow RSS flow action 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: Wed, 04 Oct 2017 08:19:28 -0000 Hi, What you say stands to reason, I'm basically ok with your patch, except for one remark. The rest of the file has no line breaks anywhere, please remove the two you added. Best regards, Pascal On 03/10/2017 16:55, Matan Azrad wrote: > One of the main identified use cases for the tap PMD is to be used in > combination with the fail-safe PMD as a fallback for a physical device. > > Fail-safe is very strict about making sure its current configuration is > properly applied to all slave devices, they get rejected otherwise in > order to maintain a consistent state. > > The problem is that tap's RSS support is currently limited to the > default (non-Toeplitz) balancing performed by the kernel on all Rx > queues. While proper RSS support emulation in the tap PMD is a work in > progress, the lack of rte_flow counterpart prevents validation of the > above use case in the meantime. > > Given that unlike most PMDs, tap is more about convenience than > performance, support for the RSS action can be temporarily faked with > a minimum amount of code and mostly correct behavior by treating it > like a QUEUE action. Traffic is directed to the first queue of the set. > > Signed-off-by: Matan Azrad > --- > drivers/net/tap/tap_flow.c | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/drivers/net/tap/tap_flow.c b/drivers/net/tap/tap_flow.c > index aa33960..28d793f 100644 > --- a/drivers/net/tap/tap_flow.c > +++ b/drivers/net/tap/tap_flow.c > @@ -1089,6 +1089,7 @@ struct tap_flow_items { > const struct rte_flow_action_queue *queue = > (const struct rte_flow_action_queue *) > actions->conf; > + > if (action) > goto exit_action_not_supported; > action = 1; > @@ -1097,6 +1098,20 @@ struct tap_flow_items { > goto exit_action_not_supported; > if (flow) > err = add_action_skbedit(flow, queue->index); > + } else if (actions->type == RTE_FLOW_ACTION_TYPE_RSS) { > + /* Fake RSS support. */ > + const struct rte_flow_action_rss *rss = > + (const struct rte_flow_action_rss *) > + actions->conf; > + > + if (action) > + goto exit_action_not_supported; > + action = 1; > + if (!rss || rss->num < 1 || > + (rss->queue[0] > pmd->dev->data->nb_rx_queues - 1)) > + goto exit_action_not_supported; > + if (flow) > + err = add_action_skbedit(flow, rss->queue[0]); > } else { > goto exit_action_not_supported; > }