From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dan.gora@gmail.com>
Received: from mail-wr0-f194.google.com (mail-wr0-f194.google.com
 [209.85.128.194]) by dpdk.org (Postfix) with ESMTP id 42D5B1B571
 for <dev@dpdk.org>; Wed, 20 Jun 2018 19:08:09 +0200 (CEST)
Received: by mail-wr0-f194.google.com with SMTP id w7-v6so270631wrn.6
 for <dev@dpdk.org>; Wed, 20 Jun 2018 10:08:09 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:sender:in-reply-to:references:from:date:message-id
 :subject:to:cc;
 bh=WZmuA5UL6GdyO0aOX/wKW9HHY/1j+KLVAKD2F+e02Rw=;
 b=mqW2j2Xfudp49wsOWQnJkGPvYk5AjyHl2eSkEgqyB1L/JKiRe4LVwJAW+n2c25PPtL
 REK7S7wRmEW7v03El/jnHpGmLPw93/K8fAJdP9vk1jFioId2LYnz8w5NfRpXI/iBrPg+
 LFXl9s1Gv+VOZQ/OgPQmwK/PeCGl2aD2dzcO5uYMZ1VfqQmkesZX+3SaZnToaqq5D6FZ
 793snVTO7xqpu46ffAwaSpCIksYbVDqeuy0ZJKnYwea0uQSi7U/PyXOVARNBNt3II8mx
 uikBxj8dEVNN1miuihXgCGmKs5vpD91vxv8Al6U+9vlYhxuxbzoYRLdk5MYwKuvpaCd6
 VdGg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:sender:in-reply-to:references:from
 :date:message-id:subject:to:cc;
 bh=WZmuA5UL6GdyO0aOX/wKW9HHY/1j+KLVAKD2F+e02Rw=;
 b=YnOxtM0Bbxy1Jmx9v0/AA79DOBt5FrJwvHGYLVZ+9orrllrX5dzHBvxOFjJ9VJTZBq
 XbYg4GjczodvNy8s+pVN+3gB3cizxSgHjIktDhyq1IYX2YhVrZAS0KzPJ4CTptrwf8nG
 ici+20MewWqk5RfaECMXkReuN1WEyDFJR1egFKnkz9tBF9jBbMj/KKu8uPoFVYJHeDlf
 ePk+P3No2OehJ+qrydfp8hkvCedjkba+FYIMSpcHHC5rmBV8e1tjdLdi5NG12s8h4qM0
 ZAGefFkZ/r7oT+HVcY+xEyPjBZ1WLK3KHRh5Ynt/FYIRxv+ek2kj06njm3qku51u9Tu6
 nFqQ==
X-Gm-Message-State: APt69E1LrVEcky4kOQOLOvw62lBht3GVyZLkydLSHwzIf7VMWBuQSeke
 EbWmG1JpVh04sfGeP2tT8KmSRYEtzOQtduxF9u4=
X-Google-Smtp-Source: ADUXVKJRHgO43yZ+UwujIL7PpRg7epKThdKCymuiAEIRmm8LqJ+aaSDe4hNOR8dXfMdICR3B+TqYXnjfLRYip1zS0M8=
X-Received: by 2002:adf:a792:: with SMTP id
 j18-v6mr19275492wrc.187.1529514488853; 
 Wed, 20 Jun 2018 10:08:08 -0700 (PDT)
MIME-Version: 1.0
Sender: dan.gora@gmail.com
Received: by 2002:adf:eb43:0:0:0:0:0 with HTTP; Wed, 20 Jun 2018 10:07:28
 -0700 (PDT)
In-Reply-To: <CAGyogRaDw0mLLY+3w9_7JqAF3E2cHDfKOUkiFgXbtkHMDdahBA@mail.gmail.com>
References: <20180620150122.45945-1-ferruh.yigit@intel.com>
 <d00e6b84-ac5a-dae0-fba6-5f40d0bf69b2@intel.com>
 <CAGyogRaDw0mLLY+3w9_7JqAF3E2cHDfKOUkiFgXbtkHMDdahBA@mail.gmail.com>
From: Dan Gora <dg@adax.com>
Date: Wed, 20 Jun 2018 10:07:28 -0700
X-Google-Sender-Auth: y_IMYT8x-uJyRMImgIk5ZQlnoDc
Message-ID: <CAGyogRZD1L5EWNd8EsNGuapGq+U=_BiiE-xt=rNuuA7Nd8GPdA@mail.gmail.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: dev@dpdk.org
Content-Type: text/plain; charset="UTF-8"
Subject: Re: [dpdk-dev] [PATCH] examples: fix RSS hash function configuration
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jun 2018 17:08:09 -0000

Hi Ferruh,

The documentation for rte_eth_dev_configure() should get updated as
well to document this requirement to strip the unsupported RSS hash
function bits.  The current documentation only refers to the tx/rx
offload bits:

 *     -  Any offloading set in eth_conf->[rt]xmode.offloads must be within
 *        the [rt]x_offload_capa returned from rte_eth_dev_infos_get().
 *        Any type of device supported offloading set in the input argument
 *        eth_conf->[rt]xmode.offloads to rte_eth_dev_configure() is enabled
 *        on all queues and it can't be disabled in rte_eth_[rt]x_queue_setup().

thanks
dan


On Wed, Jun 20, 2018 at 10:03 AM, Dan Gora <dg@adax.com> wrote:
> Hi Ferruh,
>
> Thanks for this.. I had started working on a patch to do this as well
> because I got bit by this error.
>
> Shouldn't all of the example applications also add the code to strip
> the unsupported Tx and Rx offload bits as well?  It would help new
> users (like me!) to understand that this is a requirement for all
> callers of rte_eth_dev_configure().
>
>     rte_eth_dev_info_get(port_id, &dev_info);
>
>     /* Only set the offload bits which are actually supported */
>     port_conf.txmode.offloads &= dev_info.tx_offload_capa;
>     port_conf.rxmode.offloads &= dev_info.rx_offload_capa;
>
> thanks
> dan