[dpdk-dev] [PATCH] net/mlx5: return RSS hash result in mbuf
Nélio Laranjeiro
nelio.laranjeiro at 6wind.com
Tue Sep 27 16:29:49 CEST 2016
Hi Bruce,
On Tue, Sep 27, 2016 at 03:11:10PM +0100, Bruce Richardson wrote:
> On Wed, Sep 14, 2016 at 10:16:05AM +0200, Nelio Laranjeiro wrote:
> > Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro at 6wind.com>
> > ---
> > drivers/net/mlx5/mlx5_rxq.c | 1 +
> > drivers/net/mlx5/mlx5_rxtx.c | 6 +++++-
> > drivers/net/mlx5/mlx5_rxtx.h | 2 ++
> > 3 files changed, 8 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
> > index f6f4315..65c264b 100644
> > --- a/drivers/net/mlx5/mlx5_rxq.c
> > +++ b/drivers/net/mlx5/mlx5_rxq.c
> > @@ -926,6 +926,7 @@ rxq_ctrl_setup(struct rte_eth_dev *dev, struct rxq_ctrl *rxq_ctrl,
> > .rxq = {
> > .elts_n = log2above(desc),
> > .mp = mp,
> > + .rss_hash = !!(priv->rxqs_n > 1),
> > },
>
> Two comments on this:
> 1. I don't think the !! is needed, since this is a comparison which will result
> in 0 or 1, rather than an int value that needs to be clamped to those values.
Ok for this one.
> 2. Why limit the use of RSS to when there is more than one RX queues? Sometimes
> it might be useful to have a precomputed hash for a packet even when not
> spreading packets among RX queues. For example, when using a single RX queue,
> but doing a hash table lookup for each packet, the RSS value could be used
> as the lookup hash.
>
> /Bruce
ConnectX-4 NICs does not return a hash value for a single queue as
software does not request RSS in this situation, that is why it is not
filled.
I will send a v2 to also fix a bug discovered since concerning the hash
result which is not retrieve from the right place when Completion Queue
Entry is compressed.
Regards,
--
Nélio Laranjeiro
6WIND
More information about the dev
mailing list