DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Gaëtan Rivet" <gaetan.rivet@6wind.com>
To: Ophir Munk <ophirmu@mellanox.com>
Cc: dev@dpdk.org, Thomas Monjalon <thomas@monjalon.net>,
	Olga Shern <olgas@mellanox.com>,
	Shahaf Shuler <shahafs@mellanox.com>
Subject: Re: [dpdk-dev] [PATCH v1] net/failsafe: add an RSS hash update callback
Date: Fri, 11 May 2018 10:31:54 +0200	[thread overview]
Message-ID: <20180511083154.fjgmzoeggqfjy2lo@bidouze.vm.6wind.com> (raw)
In-Reply-To: <1525963090-17097-1-git-send-email-ophirmu@mellanox.com>

Hi Ophir,

On Thu, May 10, 2018 at 02:38:10PM +0000, Ophir Munk wrote:
> Add an RSS hash update callback to eth_dev_ops.
> 
> Signed-off-by: Ophir Munk <ophirmu@mellanox.com>

Thank you for submitting this, the patch is clean.

Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>

> ---
>  drivers/net/failsafe/failsafe_ops.c | 27 +++++++++++++++++++++++++++
>  1 file changed, 27 insertions(+)
> 
> diff --git a/drivers/net/failsafe/failsafe_ops.c b/drivers/net/failsafe/failsafe_ops.c
> index 089f114..d04277b 100644
> --- a/drivers/net/failsafe/failsafe_ops.c
> +++ b/drivers/net/failsafe/failsafe_ops.c
> @@ -13,6 +13,7 @@
>  #include <rte_malloc.h>
>  #include <rte_flow.h>
>  #include <rte_cycles.h>
> +#include <rte_ethdev.h>
>  
>  #include "failsafe_private.h"
>  
> @@ -947,6 +948,31 @@ fs_mac_addr_set(struct rte_eth_dev *dev, struct ether_addr *mac_addr)
>  }
>  
>  static int
> +fs_rss_hash_update(struct rte_eth_dev *dev,
> +			struct rte_eth_rss_conf *rss_conf)
> +{
> +	struct sub_device *sdev;
> +	uint8_t i;
> +	int ret;
> +
> +	fs_lock(dev, 0);
> +	FOREACH_SUBDEV_STATE(sdev, i, dev, DEV_ACTIVE) {
> +		ret = rte_eth_dev_rss_hash_update(PORT_ID(sdev), rss_conf);
> +		ret = fs_err(sdev, ret);
> +		if (ret) {
> +			ERROR("Operation rte_eth_dev_rss_hash_update"
> +				" failed for sub_device %d with error %d",
> +				i, ret);
> +			fs_unlock(dev, 0);
> +			return ret;
> +		}
> +	}
> +	fs_unlock(dev, 0);
> +
> +	return 0;
> +}
> +
> +static int
>  fs_filter_ctrl(struct rte_eth_dev *dev,
>  		enum rte_filter_type type,
>  		enum rte_filter_op op,
> @@ -1005,5 +1031,6 @@ const struct eth_dev_ops failsafe_ops = {
>  	.mac_addr_remove = fs_mac_addr_remove,
>  	.mac_addr_add = fs_mac_addr_add,
>  	.mac_addr_set = fs_mac_addr_set,
> +	.rss_hash_update = fs_rss_hash_update,
>  	.filter_ctrl = fs_filter_ctrl,
>  };
> -- 
> 2.7.4
> 

-- 
Gaëtan Rivet
6WIND

  reply	other threads:[~2018-05-11  8:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-10 14:38 Ophir Munk
2018-05-11  8:31 ` Gaëtan Rivet [this message]
2018-05-11 16:18   ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180511083154.fjgmzoeggqfjy2lo@bidouze.vm.6wind.com \
    --to=gaetan.rivet@6wind.com \
    --cc=dev@dpdk.org \
    --cc=olgas@mellanox.com \
    --cc=ophirmu@mellanox.com \
    --cc=shahafs@mellanox.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).