* [PATCH iproute2-next 0/2] lib: add profinet and ethercat as link layer protocol
@ 2022-02-28 13:45 Daniel Braunwarth
2022-02-28 13:45 ` [PATCH iproute2-next 1/2] lib: add profinet and ethercat as link layer protocol names Daniel Braunwarth
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Daniel Braunwarth @ 2022-02-28 13:45 UTC (permalink / raw)
To: netdev; +Cc: daniel
Update the llproto_names array to allow users to reference the PROFINET
and EtherCAT protocols with the names 'profinet' and 'ethercat'.
These patches depends on the below referenced patch, which extends if_ether.h
with the used ETH_P_xxx defines.
Link: https://lore.kernel.org/netdev/20220228133029.100913-1-daniel@braunwarth.dev/
Daniel Braunwarth (2):
lib: add profinet and ethercat as link layer protocol names
tc: bash-completion: Add profinet and ethercat to procotol completion
list
bash-completion/tc | 8 ++++----
lib/ll_proto.c | 2 ++
2 files changed, 6 insertions(+), 4 deletions(-)
--
2.35.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH iproute2-next 1/2] lib: add profinet and ethercat as link layer protocol names
2022-02-28 13:45 [PATCH iproute2-next 0/2] lib: add profinet and ethercat as link layer protocol Daniel Braunwarth
@ 2022-02-28 13:45 ` Daniel Braunwarth
2022-02-28 17:21 ` Stephen Hemminger
2022-02-28 13:45 ` [PATCH iproute2-next 2/2] tc: bash-completion: Add profinet and ethercat to procotol completion list Daniel Braunwarth
2022-03-04 16:30 ` [PATCH iproute2-next 0/2] lib: add profinet and ethercat as link layer protocol patchwork-bot+netdevbpf
2 siblings, 1 reply; 7+ messages in thread
From: Daniel Braunwarth @ 2022-02-28 13:45 UTC (permalink / raw)
To: netdev; +Cc: daniel
Update the llproto_names array to allow users to reference the PROFINET
and EtherCAT protocols with the names 'profinet' and 'ethercat'.
Signed-off-by: Daniel Braunwarth <daniel@braunwarth.dev>
---
lib/ll_proto.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/ll_proto.c b/lib/ll_proto.c
index 78179311..342ea2ee 100644
--- a/lib/ll_proto.c
+++ b/lib/ll_proto.c
@@ -75,7 +75,9 @@ __PF(CONTROL,control)
__PF(IRDA,irda)
__PF(ECONET,econet)
__PF(TIPC,tipc)
+__PF(PROFINET,profinet)
__PF(AOE,aoe)
+__PF(ETHERCAT,ethercat)
__PF(8021Q,802.1Q)
__PF(8021AD,802.1ad)
__PF(MPLS_UC,mpls_uc)
--
2.35.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH iproute2-next 2/2] tc: bash-completion: Add profinet and ethercat to procotol completion list
2022-02-28 13:45 [PATCH iproute2-next 0/2] lib: add profinet and ethercat as link layer protocol Daniel Braunwarth
2022-02-28 13:45 ` [PATCH iproute2-next 1/2] lib: add profinet and ethercat as link layer protocol names Daniel Braunwarth
@ 2022-02-28 13:45 ` Daniel Braunwarth
2022-03-04 16:30 ` [PATCH iproute2-next 0/2] lib: add profinet and ethercat as link layer protocol patchwork-bot+netdevbpf
2 siblings, 0 replies; 7+ messages in thread
From: Daniel Braunwarth @ 2022-02-28 13:45 UTC (permalink / raw)
To: netdev; +Cc: daniel
Add the 'profinet' and 'ethercat' protocols to bash completion.
Signed-off-by: Daniel Braunwarth <daniel@braunwarth.dev>
---
bash-completion/tc | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/bash-completion/tc b/bash-completion/tc
index 086cb7f6..9f16d0d4 100644
--- a/bash-completion/tc
+++ b/bash-completion/tc
@@ -127,10 +127,10 @@ _tc_direct_complete()
protocol) # list comes from lib/ll_proto.c
COMPREPLY+=( $( compgen -W ' 802.1Q 802.1ad 802_2 802_3 LLDP aarp \
all aoe arp atalk atmfate atmmpoa ax25 bpq can control cust \
- ddcmp dec diag dna_dl dna_rc dna_rt econet ieeepup ieeepupat \
- ip ipv4 ipv6 ipx irda lat localtalk loop mobitex ppp_disc \
- ppp_mp ppp_ses ppptalk pup pupat rarp sca snap tipc tr_802_2 \
- wan_ppp x25' -- "$cur" ) )
+ ddcmp dec diag dna_dl dna_rc dna_rt econet ethercat ieeepup \
+ ieeepupat ip ipv4 ipv6 ipx irda lat localtalk loop mobitex \
+ ppp_disc ppp_mp ppp_ses ppptalk profinet pup pupat rarp sca \
+ snap tipc tr_802_2 wan_ppp x25' -- "$cur" ) )
return 0
;;
prio)
--
2.35.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH iproute2-next 1/2] lib: add profinet and ethercat as link layer protocol names
2022-02-28 13:45 ` [PATCH iproute2-next 1/2] lib: add profinet and ethercat as link layer protocol names Daniel Braunwarth
@ 2022-02-28 17:21 ` Stephen Hemminger
2022-03-01 18:26 ` daniel
0 siblings, 1 reply; 7+ messages in thread
From: Stephen Hemminger @ 2022-02-28 17:21 UTC (permalink / raw)
To: Daniel Braunwarth; +Cc: netdev
On Mon, 28 Feb 2022 14:45:19 +0100
Daniel Braunwarth <daniel@braunwarth.dev> wrote:
> Update the llproto_names array to allow users to reference the PROFINET
> and EtherCAT protocols with the names 'profinet' and 'ethercat'.
>
> Signed-off-by: Daniel Braunwarth <daniel@braunwarth.dev>
This is legacy table. Original author did choose to use stanard
file /etc/ethertypes. Not sure why??
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH iproute2-next 1/2] lib: add profinet and ethercat as link layer protocol names
2022-02-28 17:21 ` Stephen Hemminger
@ 2022-03-01 18:26 ` daniel
2022-03-01 19:58 ` Stephen Hemminger
0 siblings, 1 reply; 7+ messages in thread
From: daniel @ 2022-03-01 18:26 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: netdev
February 28, 2022 6:21 PM, "Stephen Hemminger" <stephen@networkplumber.org> wrote:
> This is legacy table. Original author did choose to use stanard
> file /etc/ethertypes. Not sure why??
I tried to extend /etc/ethertypes with the following line:
ETHERCAT 88A4 ethercat
I would expect the following command to successfully run:
tc filter add dev eno1 protocol ethercat matchall action drop
Unfortunately all I get is:
Error: argument "ethercat" is wrong: invalid protocol
With my patches applied, the command runs without any error.
I wasn't able to find any hint in the code, where /etc/ethertypes is supposed to be parsed. Could you give me a hint?
Thanks
Daniel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH iproute2-next 1/2] lib: add profinet and ethercat as link layer protocol names
2022-03-01 18:26 ` daniel
@ 2022-03-01 19:58 ` Stephen Hemminger
0 siblings, 0 replies; 7+ messages in thread
From: Stephen Hemminger @ 2022-03-01 19:58 UTC (permalink / raw)
To: daniel; +Cc: netdev
On Tue, 01 Mar 2022 18:26:10 +0000
daniel@braunwarth.dev wrote:
> February 28, 2022 6:21 PM, "Stephen Hemminger" <stephen@networkplumber.org> wrote:
> > This is legacy table. Original author did choose to use stanard
> > file /etc/ethertypes. Not sure why??
>
> I tried to extend /etc/ethertypes with the following line:
> ETHERCAT 88A4 ethercat
>
> I would expect the following command to successfully run:
> tc filter add dev eno1 protocol ethercat matchall action drop
>
> Unfortunately all I get is:
> Error: argument "ethercat" is wrong: invalid protocol
>
> With my patches applied, the command runs without any error.
>
>
> I wasn't able to find any hint in the code, where /etc/ethertypes is supposed to be parsed. Could you give me a hint?
>
>
> Thanks
>
> Daniel
Right, iproute2 has its own built in table.
There is nothing that parses and loads ethertypes.
I am suggesting that there ought to read and cache the file; assuming it doesn't slow things down too much.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH iproute2-next 0/2] lib: add profinet and ethercat as link layer protocol
2022-02-28 13:45 [PATCH iproute2-next 0/2] lib: add profinet and ethercat as link layer protocol Daniel Braunwarth
2022-02-28 13:45 ` [PATCH iproute2-next 1/2] lib: add profinet and ethercat as link layer protocol names Daniel Braunwarth
2022-02-28 13:45 ` [PATCH iproute2-next 2/2] tc: bash-completion: Add profinet and ethercat to procotol completion list Daniel Braunwarth
@ 2022-03-04 16:30 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 7+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-03-04 16:30 UTC (permalink / raw)
To: Daniel Braunwarth; +Cc: netdev
Hello:
This series was applied to iproute2/iproute2-next.git (main)
by David Ahern <dsahern@kernel.org>:
On Mon, 28 Feb 2022 14:45:18 +0100 you wrote:
> Update the llproto_names array to allow users to reference the PROFINET
> and EtherCAT protocols with the names 'profinet' and 'ethercat'.
>
> These patches depends on the below referenced patch, which extends if_ether.h
> with the used ETH_P_xxx defines.
>
> Link: https://lore.kernel.org/netdev/20220228133029.100913-1-daniel@braunwarth.dev/
>
> [...]
Here is the summary with links:
- [iproute2-next,1/2] lib: add profinet and ethercat as link layer protocol names
https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=75061b357f06
- [iproute2-next,2/2] tc: bash-completion: Add profinet and ethercat to procotol completion list
https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=712ec66e6f3e
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-03-04 16:30 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-28 13:45 [PATCH iproute2-next 0/2] lib: add profinet and ethercat as link layer protocol Daniel Braunwarth
2022-02-28 13:45 ` [PATCH iproute2-next 1/2] lib: add profinet and ethercat as link layer protocol names Daniel Braunwarth
2022-02-28 17:21 ` Stephen Hemminger
2022-03-01 18:26 ` daniel
2022-03-01 19:58 ` Stephen Hemminger
2022-02-28 13:45 ` [PATCH iproute2-next 2/2] tc: bash-completion: Add profinet and ethercat to procotol completion list Daniel Braunwarth
2022-03-04 16:30 ` [PATCH iproute2-next 0/2] lib: add profinet and ethercat as link layer protocol patchwork-bot+netdevbpf
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).