All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yongseok Koh <yskoh@mellanox.com>
To: Ori Kam <orika@mellanox.com>
Cc: Shahaf Shuler <shahafs@mellanox.com>, "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [PATCH 2/3] net/mlx5: fix Direct Verbs flow tunnel
Date: Mon, 5 Nov 2018 05:37:42 +0000	[thread overview]
Message-ID: <20181105053732.GE15737@mtidpdk.mti.labs.mlnx> (raw)
In-Reply-To: <AM4PR05MB3425E7F27404B6A7BFC93D67DBC90@AM4PR05MB3425.eurprd05.prod.outlook.com>

On Sun, Nov 04, 2018 at 01:22:34AM -0700, Ori Kam wrote:
> 
> > -----Original Message-----
> > From: Yongseok Koh
> > Sent: Friday, November 2, 2018 11:08 PM
> > To: Shahaf Shuler <shahafs@mellanox.com>
> > Cc: dev@dpdk.org; Yongseok Koh <yskoh@mellanox.com>; Ori Kam
> > <orika@mellanox.com>
> > Subject: [PATCH 2/3] net/mlx5: fix Direct Verbs flow tunnel
> > 
> > 1) Fix layer parsing
> > In translation of tunneled flows, dev_flow->layers must not be used to
> > check tunneled layer as it contains all the layers parsed from
> > flow_drv_prepare(). Checking tunneled layer is needed to distinguish
> > between outer and inner item. This should be based on dynamic parsing. With
> > dev_flow->layers on a tunneled flow, items will always be interpreted as
> > inner as dev_flow->layer already has all the items. Dynamic parsing
> > (item_flags) is added as there's no such code.
> > 
> > 2) Refactoring code
> > - flow_dv_create_item() and flow_dv_create_action() are merged into
> >   flow_dv_translate() for consistency with Verbs and *_validate().
> 
> I don't like the idea of combining 2 distinct functions into one.
> I think a function should be as short as possible and do only one thing,
> if there is no good reason why two functions should be combined they should not
> be combined.
> If you want to align both the Direct Verbs and  Verbs I think we can split the Verbs
> code.

Look at the other lengthy switch-case clauses in validate/prepare/translate in
each driver. This DV translate is the only exception. I'd rather like to ask
why. I didn't like the lengthy function from the beginning but you wanted to
keep it. Of course, I considered to split the Verbs one but that's the reason
why I chose to merge DV code. If we feel this lengthy func is really complex and
gets error prone, then we can refactor all the code at once later. Or, I still
prefer the graph approach. That would be simpler.

Thanks,
Yongseok

  reply	other threads:[~2018-11-05  5:37 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-02 21:08 [PATCH 1/3] net/mlx5: fix Verbs flow tunnel Yongseok Koh
2018-11-02 21:08 ` [PATCH 2/3] net/mlx5: fix Direct " Yongseok Koh
2018-11-04  8:22   ` Ori Kam
2018-11-05  5:37     ` Yongseok Koh [this message]
2018-11-05  6:08       ` Ori Kam
2018-11-05  6:43         ` Yongseok Koh
2018-11-02 21:08 ` [PATCH 3/3] net/mlx5: remove flags setting from flow preparation Yongseok Koh
2018-11-04  8:29   ` Ori Kam
2018-11-05  5:39     ` Yongseok Koh
2018-11-04  8:17 ` [PATCH 1/3] net/mlx5: fix Verbs flow tunnel Ori Kam
2018-11-05  7:20 ` [PATCH v2 0/3] net/mlx5: fix tunnel flow Yongseok Koh
2018-11-05  7:20   ` [PATCH v2 1/3] net/mlx5: fix Verbs flow tunnel Yongseok Koh
2018-11-05  7:20   ` [PATCH v2 2/3] net/mlx5: fix Direct " Yongseok Koh
2018-11-05  7:31     ` Ori Kam
2018-11-05  7:20   ` [PATCH v2 3/3] net/mlx5: remove flags setting from flow preparation Yongseok Koh
2018-11-05  7:32     ` Ori Kam
2018-11-05  8:09   ` [PATCH v2 0/3] net/mlx5: fix tunnel flow Shahaf Shuler

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=20181105053732.GE15737@mtidpdk.mti.labs.mlnx \
    --to=yskoh@mellanox.com \
    --cc=dev@dpdk.org \
    --cc=orika@mellanox.com \
    --cc=shahafs@mellanox.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.