All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <simon.horman@netronome.com>
To: sfeldma@gmail.com
Cc: netdev@vger.kernel.org, jiri@resnulli.us, roopa@cumulusnetworks.com
Subject: Re: [PATCH net-next 4/5] rocker: add offload_fwd_mark support
Date: Thu, 9 Jul 2015 13:26:09 +0900	[thread overview]
Message-ID: <20150709042606.GA16603@vergenet.net> (raw)
In-Reply-To: <1436397403-62412-5-git-send-email-sfeldma@gmail.com>

Hi Scott,

On Wed, Jul 08, 2015 at 04:16:42PM -0700, sfeldma@gmail.com wrote:
> From: Scott Feldman <sfeldma@gmail.com>
> 
> If device flags ingress packet as "fwd offload", mark the
> skb->offlaod_fwd_mark using the ingress port's dev->offlaod_fwd_mark.  This
> will be the hint to the kernel that this packet has already been forwarded
> by device to egress ports matching skb->offlaod_fwd_mark.
> 
> For rocker, derive port dev->offlaod_fwd_mark based on device switch ID and
> port ifindex.  If port is bridged, use the bridge ifindex rather than the
> port ifindex.
> 
> Signed-off-by: Scott Feldman <sfeldma@gmail.com>

[snip]

> diff --git a/drivers/net/ethernet/rocker/rocker.c b/drivers/net/ethernet/rocker/rocker.c
> index c005167..a4ced91 100644
> --- a/drivers/net/ethernet/rocker/rocker.c
> +++ b/drivers/net/ethernet/rocker/rocker.c

[snip] 

> @@ -4938,11 +4944,13 @@ static int rocker_probe_port(struct rocker *rocker, unsigned int port_number)
>  	}
>  	rocker->ports[port_number] = rocker_port;
>  
> +	switchdev_port_fwd_mark_set(rocker_port->dev, NULL, false);
> +
>  	rocker_port_set_learning(rocker_port, SWITCHDEV_TRANS_NONE);
>  
>  	err = rocker_port_ig_tbl(rocker_port, SWITCHDEV_TRANS_NONE, 0);
>  	if (err) {
> -		dev_err(&pdev->dev, "install ig port table failed\n");
> +		netdev_err(rocker_port->dev, "install ig port table failed\n");
>  		goto err_port_ig_tbl;
>  	}

It is unclear to me how the above *_err change and...

>  
> @@ -4962,6 +4970,7 @@ err_untagged_vlan:
>  	rocker_port_ig_tbl(rocker_port, SWITCHDEV_TRANS_NONE,
>  			   ROCKER_OP_FLAG_REMOVE);
>  err_port_ig_tbl:
> +	rocker->ports[port_number] = NULL;
>  	unregister_netdev(dev);
>  err_register_netdev:
>  	free_netdev(dev);

... the above ports[] change relate to the rest of this patch.

[snip]

  reply	other threads:[~2015-07-09  4:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-08 23:16 [PATCH net-next 0/5] switchdev: avoid duplicate packet forwarding sfeldma
2015-07-08 23:16 ` [PATCH net-next 1/5] net: don't reforward packets already forwarded by offload device sfeldma
2015-07-09 22:22   ` David Miller
2015-07-08 23:16 ` [PATCH net-next 2/5] net: add phys ID compare helper to test if two IDs are the same sfeldma
2015-07-09 12:15   ` Sergei Shtylyov
2015-07-08 23:16 ` [PATCH net-next 3/5] switchdev: add offload_fwd_mark generator helper sfeldma
2015-07-08 23:16 ` [PATCH net-next 4/5] rocker: add offload_fwd_mark support sfeldma
2015-07-09  4:26   ` Simon Horman [this message]
2015-07-09  5:35     ` Scott Feldman
2015-07-08 23:16 ` [PATCH net-next 5/5] switchdev: update documentation for offload_fwd_mark sfeldma
2015-07-09  4:27   ` Simon Horman
2015-07-09  5:57     ` Scott Feldman

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=20150709042606.GA16603@vergenet.net \
    --to=simon.horman@netronome.com \
    --cc=jiri@resnulli.us \
    --cc=netdev@vger.kernel.org \
    --cc=roopa@cumulusnetworks.com \
    --cc=sfeldma@gmail.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.