How to Enable and Disable Packet Forwarding Engine (PFE) at Runtime in Linux

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to Enable and Disable Packet Forwarding Engine (PFE) at Runtime in Linux

Jump to solution
1,974 Views
irfank
Contributor III

Hello;

I am seeking a method to deactivate/partially disable /constrain/disable power the PFE in runtime.

0 Kudos
Reply
1 Solution
1,944 Views
chenyin_h
NXP Employee
NXP Employee

Hello, @irfank

Thanks for the questions

Sorry that I am not sure which version BSP you are using nor which device referred to(S32G2 or G3?), let me take S32G2RDB2 with BSP40 for example.

Currently, the PM runtime feature is enabled by default in PFE Linux driver.

By default, the device PM control policy is “auto”, which means to allow the device to be power managed at run time. If you want to disable the run time PM, you may change it to “on”, which to prevent the device from being power managed, logs below for your reference.

root@s32g274ardb2:~# cat /sys/devices/platform/soc/46000000.pfe/power/control

auto

root@s32g274ardb2:~# echo "on" > /sys/devices/platform/soc/46000000.pfe/power/control

root@s32g274ardb2:~# cat /sys/devices/platform/soc/46000000.pfe/power/control

on 

 

Best Regards

Chenyin

View solution in original post

1 Reply
1,945 Views
chenyin_h
NXP Employee
NXP Employee

Hello, @irfank

Thanks for the questions

Sorry that I am not sure which version BSP you are using nor which device referred to(S32G2 or G3?), let me take S32G2RDB2 with BSP40 for example.

Currently, the PM runtime feature is enabled by default in PFE Linux driver.

By default, the device PM control policy is “auto”, which means to allow the device to be power managed at run time. If you want to disable the run time PM, you may change it to “on”, which to prevent the device from being power managed, logs below for your reference.

root@s32g274ardb2:~# cat /sys/devices/platform/soc/46000000.pfe/power/control

auto

root@s32g274ardb2:~# echo "on" > /sys/devices/platform/soc/46000000.pfe/power/control

root@s32g274ardb2:~# cat /sys/devices/platform/soc/46000000.pfe/power/control

on 

 

Best Regards

Chenyin

%3CLINGO-SUB%20id%3D%22lingo-sub-1848645%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EHow%20to%20Enable%20and%20Disable%20Packet%20Forwarding%20Engine%20(PFE)%20at%20Runtime%20in%20Linux%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1848645%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CSPAN%3EHello%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EI%20am%20seeking%20a%20method%20to%20deactivate%2Fpartially%20disable%20%2Fconstrain%2Fdisable%20power%20the%20PFE%20in%20runtime.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1849474%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20How%20to%20Enable%20and%20Disable%20Packet%20Forwarding%20Engine%20(PFE)%20at%20Runtime%20in%20Linux%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1849474%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%20%40%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F212774%22%20target%3D%22_blank%22%3Eirfank%3C%2FA%3E%3C%2FP%3E%0A%3CP%3EThanks%20for%20the%20questions%3C%2FP%3E%0A%3CP%3ESorry%20that%20I%20am%20not%20sure%20which%20version%20BSP%20you%20are%20using%20nor%20which%20device%20referred%20to(S32G2%20or%20G3%3F)%2C%20let%20me%20take%20S32G2RDB2%20with%20BSP40%20for%20example.%3C%2FP%3E%0A%3CP%3ECurrently%2C%20the%20PM%20runtime%20feature%20is%20enabled%20by%20default%20in%20PFE%20Linux%20driver.%3C%2FP%3E%0A%3CP%3EBy%20default%2C%20the%20device%20PM%20control%20policy%20is%20%E2%80%9Cauto%E2%80%9D%2C%20which%20means%20to%20allow%20the%20device%20to%20be%20power%20managed%20at%20run%20time.%20If%20you%20want%20to%20disable%20the%20run%20time%20PM%2C%20you%20may%20change%20it%20to%20%E2%80%9Con%E2%80%9D%2C%20which%20to%20prevent%20the%20device%20from%20being%20power%20managed%2C%20logs%20below%20for%20your%20reference.%3C%2FP%3E%0A%3CP%3Eroot%40s32g274ardb2%3A~%23%20cat%20%2Fsys%2Fdevices%2Fplatform%2Fsoc%2F46000000.pfe%2Fpower%2Fcontrol%3C%2FP%3E%0A%3CP%3Eauto%3C%2FP%3E%0A%3CP%3Eroot%40s32g274ardb2%3A~%23%20echo%20%22on%22%20%26gt%3B%20%2Fsys%2Fdevices%2Fplatform%2Fsoc%2F46000000.pfe%2Fpower%2Fcontrol%3C%2FP%3E%0A%3CP%3Eroot%40s32g274ardb2%3A~%23%20cat%20%2Fsys%2Fdevices%2Fplatform%2Fsoc%2F46000000.pfe%2Fpower%2Fcontrol%3C%2FP%3E%0A%3CP%3Eon%26nbsp%3B%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EBest%20Regards%3C%2FP%3E%0A%3CP%3EChenyin%3C%2FP%3E%3C%2FLINGO-BODY%3E