Subject: Re: [RFC PATCH net-next 02/12] selftests: forwarding: Add a test for FDB learning

From: Ido Schimmel <[email-masked]>
Date: Mon, 15 Jan 2018 22:05:20 +0200

Hi Andrew,

On Mon, Jan 15, 2018 at 08:41:46PM +0100, Andrew Lunn wrote:
> On Mon, Jan 15, 2018 at 09:18:43PM +0200, Ido Schimmel wrote:
> > Send a packet with a specific destination MAC, make sure it was learned
> > on the ingress port and then aged-out.
> 
> It would be interesting to show the hardware actually uses the FDB,
> not just learns it. Send some packets back, and ensure they go out the
> intended port. Also, check they don't go out a third port, i.e. make
> sure the hardware is not flooding. Once it has aged-out, then test is
> is flooding out all ports.

Good idea. We can actually do that with only two ports. Disable flooding
on port A, check packets with DMAC A don't egress the port. Inject a
packet with SMAC A through port A, check packets with DMAC A egress the
port.