netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Fastabend <john.fastabend@gmail.com>
To: Hadar Hen Zion <hadarh@mellanox.com>,
	"David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org, Saeed Mahameed <saeedm@mellanox.com>,
	Jiri Pirko <jiri@mellanox.com>, Amir Vadai <amirva@mellanox.com>,
	Or Gerlitz <ogerlitz@mellanox.com>, Roi Dayan <roid@mellanox.com>
Subject: Re: [PATCH net-next 8/8] net/mlx5e: Support adding ingress tc rule when egress device flag is set
Date: Wed, 30 Nov 2016 08:36:23 -0800	[thread overview]
Message-ID: <583F0007.3090507@gmail.com> (raw)
In-Reply-To: <1480516895-29545-9-git-send-email-hadarh@mellanox.com>

On 16-11-30 06:41 AM, Hadar Hen Zion wrote:
> When ndo_setup_tc is called with an egress_dev flag set, it means that
> the ndo call was executed on the mirred action (egress) device and not
> on the ingress device.
> 
> In order to support this kind of ndo_setup_tc call, and insert the
> correct decap rule to the hardware, the uplink device on the same eswitch
> should be found.
> 
> Currently, we use this resolution between the mirred device and the
> uplink on the same eswitch to offload vxlan shared device decap rules.
> 
> Signed-off-by: Hadar Hen Zion <hadarh@mellanox.com>
> ---

Hi Hadar,

I started to dig through these patches and the last series here,

   Re: [PATCH net-next 00/13] Mellanox 100G SRIOV offloads tunnel_key
set/release

Can you explain how these two are related? I'm guessing in that first
series the actual redirect action to a tunnel device was being ignore?

Does this series clean up that bit of software/hardware alignment.

Thanks,
John


>  drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
> index 0868677..8503788 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
> @@ -289,6 +289,14 @@ static int mlx5e_rep_ndo_setup_tc(struct net_device *dev, u32 handle,
>  	if (TC_H_MAJ(handle) != TC_H_MAJ(TC_H_INGRESS))
>  		return -EOPNOTSUPP;
>  
> +	if (tc->egress_dev) {
> +		struct mlx5_eswitch *esw = priv->mdev->priv.eswitch;
> +		struct net_device *uplink_dev = mlx5_eswitch_get_uplink_netdev(esw);
> +
> +		return uplink_dev->netdev_ops->ndo_setup_tc(uplink_dev, handle,
> +							    proto, tc);
> +	}
> +
>  	switch (tc->type) {
>  	case TC_SETUP_CLSFLOWER:
>  		switch (tc->cls_flower->command) {
> 

  reply	other threads:[~2016-11-30 16:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-30 14:41 [PATCH net-next 0/8] Offloading tc rules using underline Hardware device Hadar Hen Zion
2016-11-30 14:41 ` [PATCH net-next 1/8] net/sched: Add separate check for skip_hw flag Hadar Hen Zion
2016-11-30 14:41 ` [PATCH net-next 2/8] net/sched: cls_flower: Try to offload only if skip_hw flag isn't set Hadar Hen Zion
2016-11-30 14:41 ` [PATCH net-next 3/8] net/sched: cls_flower: Provide a filter to replace/destroy hardware filter functions Hadar Hen Zion
2016-11-30 14:41 ` [PATCH net-next 4/8] net/sched: act_mirred: Add new tc_action_ops get_dev() Hadar Hen Zion
2016-11-30 14:41 ` [PATCH net-next 5/8] net/sched: cls_flower: Add offload support using egress Hardware device Hadar Hen Zion
2016-12-01  8:11   ` kbuild test robot
2016-12-01  9:42   ` kbuild test robot
2016-11-30 14:41 ` [PATCH net-next 6/8] net/mlx5e: Bring back representor's ndos that were accidentally removed Hadar Hen Zion
2016-11-30 14:41 ` [PATCH net-next 7/8] net/mlx5e: Save the represntor netdevice as part of the representor Hadar Hen Zion
2016-11-30 14:41 ` [PATCH net-next 8/8] net/mlx5e: Support adding ingress tc rule when egress device flag is set Hadar Hen Zion
2016-11-30 16:36   ` John Fastabend [this message]
2016-11-30 17:10     ` Or Gerlitz

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=583F0007.3090507@gmail.com \
    --to=john.fastabend@gmail.com \
    --cc=amirva@mellanox.com \
    --cc=davem@davemloft.net \
    --cc=hadarh@mellanox.com \
    --cc=jiri@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=ogerlitz@mellanox.com \
    --cc=roid@mellanox.com \
    --cc=saeedm@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 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).