netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Jason Cobham <jcobham@questertangent.com>
Cc: Daniel Mack <daniel@zonque.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Ido Schimmel <idosch@idosch.org>, Jiri Pirko <jiri@resnulli.us>,
	Ivan Vecera <ivecera@redhat.com>,
	Florian Fainelli <f.fainelli@gmail.com>
Subject: Re: Question on DSA switches, IGMP forwarding and switchdev
Date: Sat, 20 Jun 2020 00:36:06 +0200	[thread overview]
Message-ID: <20200619223606.GO279339@lunn.ch> (raw)
In-Reply-To: <72f92622c69143b0880125dfe9f9a955@questertangent.com>

> I've run into the same issue. To resolve it,  In my case, in the same file, I've had to send all IGMP control traffic to the CPU:
> 	skb->offload_fwd_mark = 1;
> 	switch (ih->type) {
> 		case IGMP_HOST_MEMBERSHIP_REPORT:
> 		case IGMPV2_HOST_MEMBERSHIP_REPORT:
> 		case IGMPV3_HOST_MEMBERSHIP_REPORT:
> 		case IGMP_HOST_MEMBERSHIP_QUERY:
> 		case IGMP_HOST_LEAVE_MESSAGE:
> 			skb->offload_fwd_mark = 0;
> 		break;
> 	}
> 
> I'd be interested if there is a better way.

It might depend on the switch generation, but i think some switches
indicate the sort of packet in the DSA header. For 6390, Octet 3 of
the header, bits 3-5 contains a code.

0=BDPU
1=Frame2Reg
2=IGMP/MLD
3=Policy
4=ARP Mirror
5=Policy Mirror

We can look at these bits and not set skb->offload_fwd_mark depending
on its value.

The 6352 family has the same bits. 6161 has a few less bits, but does
have IGMP/MLD. I don't know about the 6085. Do you have the datasheet?

     Andrew

  reply	other threads:[~2020-06-19 22:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-19 21:31 Question on DSA switches, IGMP forwarding and switchdev Daniel Mack
2020-06-19 21:58 ` Andrew Lunn
2020-06-19 22:05   ` Jason Cobham
2020-06-19 22:36     ` Andrew Lunn [this message]
2020-06-20  6:02       ` Daniel Mack
2020-06-20 14:35         ` Andrew Lunn
2020-06-20 18:01           ` Daniel Mack
2020-06-20  5:32   ` Daniel Mack

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=20200619223606.GO279339@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=daniel@zonque.org \
    --cc=f.fainelli@gmail.com \
    --cc=idosch@idosch.org \
    --cc=ivecera@redhat.com \
    --cc=jcobham@questertangent.com \
    --cc=jiri@resnulli.us \
    --cc=netdev@vger.kernel.org \
    /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).