netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Murali Karicheri <m-karicheri2@ti.com>
Cc: w-kwok2@ti.com, linux-kernel@vger.kernel.org,
	davem@davemloft.net, netdev@vger.kernel.org, nsekhar@ti.com,
	grygorii.strashko@ti.com
Subject: Re: [net-next 2/2] net: netcp: ethss: k2g: add promiscuous mode support
Date: Mon, 2 Apr 2018 18:47:08 +0200	[thread overview]
Message-ID: <20180402164708.GD14165@lunn.ch> (raw)
In-Reply-To: <1522685839-9497-3-git-send-email-m-karicheri2@ti.com>

On Mon, Apr 02, 2018 at 12:17:19PM -0400, Murali Karicheri wrote:
> +static int gbe_set_rx_mode(void *intf_priv, bool promisc)
> +{
> +	struct gbe_intf *gbe_intf = intf_priv;
> +	struct gbe_priv *gbe_dev = gbe_intf->gbe_dev;
> +	struct cpsw_ale *ale = gbe_dev->ale;
> +	unsigned long timeout;
> +	int i, ret = -ETIMEDOUT;
> +
> +	/* Disable(1)/Enable(0) Learn for all ports (host is port 0 and
> +	 * slaves are port 1 and up
> +	 */
> +	for (i = 0; i <= gbe_dev->num_slaves; i++) {
> +		cpsw_ale_control_set(ale, i,
> +				     ALE_PORT_NOLEARN, !!promisc);
> +		cpsw_ale_control_set(ale, i,
> +				     ALE_PORT_NO_SA_UPDATE, !!promisc);
> +	}

Hi Murali

Does this mean that in promisc mode, switching of frames between ports
in hardware is disabled? You are relying on the software bridge to
perform such bridging between ports?

You might want to look at skb->offload_fwd_mark. By setting this, you
can tell the software bridge the hardware has already bridged the
frame. You might then be able to have promisc enabled, and the
hardware still doing the forwarding.

	 Andrew

  reply	other threads:[~2018-04-02 16:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-02 16:17 [net-next 0/2] Add promiscous mode support in k2g network driver Murali Karicheri
2018-04-02 16:17 ` [net-next 1/2] net: netcp: add api to support set rx mode in netcp modules Murali Karicheri
2018-04-02 16:17 ` [net-next 2/2] net: netcp: ethss: k2g: add promiscuous mode support Murali Karicheri
2018-04-02 16:47   ` Andrew Lunn [this message]
2018-04-02 18:40     ` Murali Karicheri
2018-04-02 16:28 ` [net-next 0/2] Add promiscous mode support in k2g network driver David Miller
2018-04-02 18:42   ` Murali Karicheri

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=20180402164708.GD14165@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=grygorii.strashko@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m-karicheri2@ti.com \
    --cc=netdev@vger.kernel.org \
    --cc=nsekhar@ti.com \
    --cc=w-kwok2@ti.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).