Phy0tpt(or, phy1tpt) v/s netdev(activity parameters: link,rx,tx) - which one to choose?

What is the difference between setting led trigger as phy0tpt/phy1tpt and netdev(link,rx,tx) ?

How is phy0tpt or phy1tpt trigger different from netdev trigger ?

My undocumented guess is that phy0/1tpt is the physical to cpu links and netdev is a a network device as defined in /etc/config/network and this (netdev) is the recommended way to configure leds

1 Like

I only got the following reference but only in terms of flashing speed and physical/software interface :

The LED flashes on events triggered in physical interface, rather than in software network interface. Besides phy triggers have more events, it also provides possibility of static LED setup in case you want to monitor your 2.4 GHz radio (phy0 usually) and 5 GHz radio (phy1 usually) separately. netdev can’t guarantee this distinguishing since wlan0 may be referring to 2.4 GHz or 5 GHz radio based on current network setup.

Name	Type	Required	Default	Description
default	integer	no	        0	    LED state before trigger: 0 means OFF and 1 means ON
sysfs	string	yes	        (none)	LED device name
trigger	string	yes	        (none)	phy0rx, phy0tx, phy0assoc, phy0radio or phy0tpt

phy0rx -    flashes on reception.
phy0tx -    flashes on transmission.
phy0assoc - flashes on client association.
phy0radio - (unknown, this option did nothing on my tl-wr1043nd)
phy0tpt -   flashes slowly and steadily on network activity.in comparison to energetic flashes of tx and rx modes

Can you elaborate more on the cpu links which you refererred ?

Also no description for phy0radio or phy1radio. Any info available somewhere for it ?

Linux kernel sources (like github mirror)

1 Like

I'd guess i was somewhat wrong - these are most likely the 2 wifi radios

1 Like

yes as mentioned in post : Phy0tpt(or, phy1tpt) v/s netdev(activity parameters: link,rx,tx) - which one to choose? - #3 by purple-shed

Coudn't find it .Can you link it ?

1 Like

documentation:
https://docs.kernel.org/leds/leds-class.html

1 Like

Thanks @maurer and @ncompact I already checked the links you had provided before I opened this thread, but didn't find any mention of phy0/1tpt or phy0/1radio triggers either there or anywhere else.

Still its unknown as to what these do and how its different to netdev trigger. Can I leave this thread unclosed so that new info can be posted by people who discover something new ?

Well I'm not a moderator or decision maker around here (just an advanced user/member) so from my perspective it's ok to leave it open.

1 Like
2 Likes

I already checked this and mentioned relevant details in my post Phy0tpt(or, phy1tpt) v/s netdev(activity parameters: link,rx,tx) - which one to choose? - #3 by purple-shed , but it doesn't provide any sensible/elaborate details about them as to why they are present and what they do- both questions are left unanswered. So I will leave this thread open as unsolved.

Time to dig through the code:

If you search for 'tpt' through the API:

you can see how this is wired up in the kernel
Events for the drivers to flag to trigger on:

 * enum ieee80211_tpt_led_trigger_flags - throughput trigger flags
 * @IEEE80211_TPT_LEDTRIG_FL_RADIO: enable blinking with radio
 * @IEEE80211_TPT_LEDTRIG_FL_WORK: enable blinking when working
 * @IEEE80211_TPT_LEDTRIG_FL_CONNECTED: enable blinking when at least one
 *	interface is connected in some way, including being an AP

look through the drivers to find the blink speed for throughput:

 * @throughput: throughput in Kbit/sec
 * @blink_time: blink time in milliseconds
 *	(full cycle, ie. one off + one on period)

ath9k:

static const struct ieee80211_tpt_blink ath9k_tpt_blink[] = {
	{ .throughput = 0 * 1024, .blink_time = 334 },
	{ .throughput = 1 * 1024, .blink_time = 260 },

The ABI testing documentation is fairly descriptive for netdev triggers:


Configurable hardware controlled LEDs are currently a hot topic, with Ansuel doing significant work to try and improve support:

2 Likes

Thanks atleast some info got, though its somewhat new to me and difficult for me to understand the following one :

  • enum ieee80211_tpt_led_trigger_flags - throughput trigger flags
  • @IEEE80211_TPT_LEDTRIG_FL_RADIO: enable blinking with radio
  • @IEEE80211_TPT_LEDTRIG_FL_WORK: enable blinking when working
  • @IEEE80211_TPT_LEDTRIG_FL_CONNECTED: enable blinking when at least one
  • interface is connected in some way, including being an AP