From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f176.google.com (mail-wr0-f176.google.com [209.85.128.176]) by dpdk.org (Postfix) with ESMTP id CC9ED1B60B for ; Wed, 4 Oct 2017 10:37:09 +0200 (CEST) Received: by mail-wr0-f176.google.com with SMTP id b21so8096987wrg.7 for ; Wed, 04 Oct 2017 01:37:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=tXTj8ELIOi5Z0jYdnGf3uaEq8gpsAhZzbVDlayRppSQ=; b=0xKJGigJitdyLxYq7vHZI5d62PhpPM0lTytGDimztp7qqFR7DKE7Wned2AZtjKXY8g AN1Knd/nn47dQqoRvKtlkOo5JWZ/w6ofoAyYdXDhRLd2mYaLYivFUkROBY7uw6Jzuqt9 Sml4IrYqcJotGLyVhsEC7pfRiZkhsYgwu9QEJjvW6QmNJmnzpVIuJZxhnfCyhZOZKRrk Aioq1+6BbYO1S5+orNeM7nsMgnVWvoPoPLPvy1dgCrCsqM77B0DJg2LtIqPZS+PxuA6h w/7oyrSDqE7p3CRaPdnobx8HIrad22pTk9f4qUjclMgzrB1MYUFpDCXNPTiTDqenJudW RP7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=tXTj8ELIOi5Z0jYdnGf3uaEq8gpsAhZzbVDlayRppSQ=; b=gB0Mdb9yveIESk06ZIi64lc46ABJkny8+91zuCIcuPeW2++1ebuo7kvaQ9mEWTeqt8 lYzUXlLOlQJuwWrwroHohi7WATULr7P7JUCBLtJIxxTwieciXwMi6nKEND2JiaEY0aC7 1KGmKUF5biWMgW/s2ytCcWq/gqrpija+7LJktqNM87s2aZErTBmmtDuOtr+ifAnTQREA K5HSBT1XbNCODIDl3jCgyZcdl2pYyn5gFEl7j/QfE5z540m0LFIqFb6uZ7EzDaXSeZUa ZmVMXwPmT3VHrwpgahb95L3hWWk3gvVvuadPOd5vz332bcAfvPAPFA8veo/lBFfS7fXj lxzw== X-Gm-Message-State: AMCzsaWKsuSORWGczd3KiQf0MK4quRuh4VgdXlcz4kl9oazFHWd2rhN8 7ZzvFiVNylnGsp/i5usY7nHK5zfU75Y= X-Google-Smtp-Source: AOwi7QAEGgoULG3rhvgqzok/oN3Uxhcw/KIrLGxPxZXULiB/+FS/xmWh/hekK4FlkkX4ShwzboAPLA== X-Received: by 10.223.160.51 with SMTP id k48mr13201850wrk.187.1507106229150; Wed, 04 Oct 2017 01:37:09 -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 50sm5115807wry.84.2017.10.04.01.37.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Oct 2017 01:37:08 -0700 (PDT) From: Pascal Mazon 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> Message-ID: <93510ae3-736c-8a2c-f04b-534f3b545eed@6wind.com> Date: Wed, 4 Oct 2017 10:37:15 +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: 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:37:09 -0000 Hi, I was a little too quick earlier. The line breaks are justified because they follow the list of variable declarations. So I ack the whole patch series. Acked-by: Pascal Mazon On 04/10/2017 10:19, Pascal Mazon wrote: > 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; >> }