[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <eb6b5f84-2a5a-1938-0657-0eac9f2390df@zonque.org>
Date: Sat, 20 Jun 2020 08:02:28 +0200
From: Daniel Mack <daniel@...que.org>
To: Andrew Lunn <andrew@...n.ch>,
Jason Cobham <jcobham@...stertangent.com>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Ido Schimmel <idosch@...sch.org>,
Jiri Pirko <jiri@...nulli.us>,
Ivan Vecera <ivecera@...hat.com>,
Florian Fainelli <f.fainelli@...il.com>
Subject: Re: Question on DSA switches, IGMP forwarding and switchdev
On 6/20/20 12:36 AM, Andrew Lunn wrote:
>> 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?
Sorry, I was mistaken in the model the board is using, it's a 6352.
So yes, we can read the code here, but I'm wondering which packet types
would then get this flag set, and which won't. Because in case of
IGMP/MLD, the packets are in fact forwarded, but the meaning of the flag
in skb is to prevent the skb from being forwarded further, which seems
wrong in all cases.
I'm thinking maybe the flag should never be set?
Thanks,
Daniel
Powered by blists - more mailing lists