public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: roopa <roopa@cumulusnetworks•com>
To: sfeldma@gmail•com
Cc: netdev@vger•kernel.org, jiri@resnulli•us,
	simon.horman@netronome•com, ronen.arad@intel•com,
	john.r.fastabend@intel•com, andrew@lunn•ch, f.fainelli@gmail•com,
	linux@roeck-us•net, davidch@broadcom•com,
	stephen@networkplumber•org
Subject: Re: [RFC PATCH net-next 1/4] net: don't reforward packets already forwarded by offload device
Date: Mon, 15 Jun 2015 07:21:21 -0700	[thread overview]
Message-ID: <557EDF61.8010709@cumulusnetworks.com> (raw)
In-Reply-To: <1434218670-43821-2-git-send-email-sfeldma@gmail.com>

On 6/13/15, 11:04 AM, sfeldma@gmail•com wrote:
> diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
> index 6f5f71f..181b08f 100644
> --- a/include/linux/netdevice.h
> +++ b/include/linux/netdevice.h
> @@ -1444,6 +1444,8 @@ enum netdev_priv_flags {
>    *
>    *	@xps_maps:	XXX: need comments on this one
>    *
> + *	@fwd_mark:		Offload device fwding mark
> + *
>    *	@trans_start:		Time (in jiffies) of last Tx
>    *	@watchdog_timeo:	Represents the timeout that is used by
>    *				the watchdog ( see dev_watchdog() )
> @@ -1681,6 +1683,10 @@ struct net_device {
>   	struct xps_dev_maps __rcu *xps_maps;
>   #endif
>   
> +#ifdef CONFIG_NET_SWITCHDEV
> +	u32			fwd_mark;
> +#endif
> +
>   
scott, Just calling out a few other use-cases to make sure this flag can 
be used in a generic way in the future:
- avoid updating acl counters in the kernel when hardware acl counters 
have already accounted for this packet
- ability to conditionally clear the mark  by other protocols  in the 
kernel before xmit: one use case is the bridge driver allowing software 
forwarding of some protocol packets when hardware forwarding of these is 
turned off eg igmp (As I understand, This is possible with your patch 
series if we need to in the future)

PS: Maybe the name should be generic enough to suite other use-cases in 
the future (i like the name i had hw_offloaded better ;).

  parent reply	other threads:[~2015-06-15 14:21 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-13 18:04 [RFC PATCH net-next 0/4] switchdev: avoid duplicate packet forwarding sfeldma
2015-06-13 18:04 ` [RFC PATCH net-next 1/4] net: don't reforward packets already forwarded by offload device sfeldma
2015-06-14  6:51   ` Jiri Pirko
2015-06-15 14:21   ` roopa [this message]
2015-06-13 18:04 ` [RFC PATCH net-next 2/4] switchdev: add fwd_mark generator helper sfeldma
2015-06-14  6:56   ` Jiri Pirko
2015-06-14 17:50     ` Scott Feldman
2015-06-15  5:46       ` Jiri Pirko
2015-06-15 13:52         ` Scott Feldman
2015-06-15 14:09           ` Sergei Shtylyov
2015-06-15 15:17   ` roopa
2015-06-13 18:04 ` [RFC PATCH net-next 3/4] rocker: add fwd_mark support sfeldma
2015-06-14  7:02   ` Jiri Pirko
2015-06-14 18:00     ` Scott Feldman
2015-06-15  5:49       ` Jiri Pirko
2015-06-13 18:04 ` [RFC PATCH net-next 4/4] switchdev: update documentation for fwd_mark sfeldma
2015-06-15 13:54 ` [RFC PATCH net-next 0/4] switchdev: avoid duplicate packet forwarding roopa
2015-06-15 14:23 ` roopa
2015-06-15 23:25 ` David Miller
2015-06-16  6:04   ` Jiri Pirko
2015-06-16 16:47     ` Scott Feldman
2015-06-16 21:11       ` Jiri Pirko
2015-06-16 23:53         ` Scott Feldman
2015-06-17  6:30           ` Jiri Pirko
2015-06-17  7:02             ` Scott Feldman
2015-06-17 10:23         ` Jamal Hadi Salim

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=557EDF61.8010709@cumulusnetworks.com \
    --to=roopa@cumulusnetworks$(echo .)com \
    --cc=andrew@lunn$(echo .)ch \
    --cc=davidch@broadcom$(echo .)com \
    --cc=f.fainelli@gmail$(echo .)com \
    --cc=jiri@resnulli$(echo .)us \
    --cc=john.r.fastabend@intel$(echo .)com \
    --cc=linux@roeck-us$(echo .)net \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=ronen.arad@intel$(echo .)com \
    --cc=sfeldma@gmail$(echo .)com \
    --cc=simon.horman@netronome$(echo .)com \
    --cc=stephen@networkplumber$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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