From: Andrew Lunn <andrew@lunn•ch>
To: Steve Williams <steve.williams@getcruise•com>
Cc: netdev@vger•kernel.org
Subject: Re: [PATCH net-next] net/hanic: Add the hanic network interface for high availability links
Date: Tue, 22 Nov 2022 01:40:54 +0100 [thread overview]
Message-ID: <Y3wallEfG+ygdwvu@lunn.ch> (raw)
In-Reply-To: <20221118232639.13743-1-steve.williams@getcruise.com>
> +Output R-TAG filter
> +===================
> +
> +In a realistic system, some destinations do not support 802.1cb,
> +or don't need it. The hanic driver has a means to call out these
> +destinations by vlan or by mac and vlan together. For example, if
> +all the destinations on vlan=11 (0x000b) should not receive r-TAG'ed
> +packets, then that can be arranged like so::
> +
> + $ echo 000b: prime > /sys/class/net/\<nic\>/hanic/filters_vlan
Please use netlink for all configuration, not sysfs.
> +Creating interfaces
> +===================
> +
> +The way to create interfaces is with a command like this::
> +
> + $ echo +hanic0 > /sys/class/net/hanic_interfaces
ip link add hanic0 type hanic
> +
> +It is also possible to destroy interfaces thusly::
> +
> + $ echo -hanic0 > /sys/class/net/hanic_interfaces
ip link del handic0
> +The standard IP commands can be used to do the enlistment, like so::
> +
> + $ ip link set sandlan0a master hanic0
> + $ ip link set sandlan0b master hanic0
It is not clear if sandland is going to get merged, so you probably
should just use eth0 and eth1 in the examples.
> +* /sys/class/net/\<nic\>/hanic/test_drop_packet_in
> +
> +Inject faults by dropping input packets from some port. Write to this
> +file the port number and the number of packets to drop. For example,
> +to tell port 1 to drop the next 5 input packets::
The normal way to do this is TC. Please don't reinvent what the kernel
already has.
Probably nobody will look at the code in too much detail until your
get your uAPI accepted. uAPI is nearly impossible to change once it is
merged, so it is important to get correct. So please throw away all
your sysfs code and replace it with netlink.
Andrew
next prev parent reply other threads:[~2022-11-22 0:41 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-18 23:26 [PATCH net-next] net/hanic: Add the hanic network interface for high availability links Steve Williams
2022-11-22 0:40 ` Andrew Lunn [this message]
2022-11-22 3:58 ` Jakub Kicinski
2022-11-22 11:34 ` Vladimir Oltean
2022-11-22 19:54 ` Andrew Lunn
2022-11-22 21:01 ` [EXT] " Steve Williams
2022-11-22 20:51 ` Steve Williams
2022-11-23 14:26 ` Vladimir Oltean
2022-11-23 14:52 ` Jiri Pirko
2022-11-23 15:12 ` Andrew Lunn
2023-02-21 11:03 ` Ferenc Fejes
2022-11-23 15:25 ` Vladimir Oltean
2022-11-23 16:36 ` Jiri Pirko
2022-11-29 22:38 ` Steve Williams
2022-11-22 12:49 ` Jiri Pirko
2022-11-22 13:55 ` Vladimir Oltean
2022-11-22 14:06 ` Jiri Pirko
2022-11-22 20:57 ` [EXT] " Steve Williams
2022-11-23 12:46 ` Jiri Pirko
2023-02-21 10:56 ` Ferenc Fejes
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=Y3wallEfG+ygdwvu@lunn.ch \
--to=andrew@lunn$(echo .)ch \
--cc=netdev@vger$(echo .)kernel.org \
--cc=steve.williams@getcruise$(echo .)com \
/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