Topic: configure configurable switches with swconfig

In case you want to configure your switch manually, you would use swconfig directly.

Unhurried people continue using the UCI configuration files, UCI will invoke swconfig et al. with the correct parameters for you.

Re: configure configurable switches with swconfig

Hi Orca !

Are You sure ?

I suppose that it depends on what version You are using.
In trunk some of configurable options via swconfig will not be available in UCI.

Regards,
Ralph

Re: configure configurable switches with swconfig

Wrong. Every option swconfig supports is also settable with uci.

Re: configure configurable switches with swconfig

jow wrote:

Wrong. Every option swconfig supports is also settable with uci.

Thank You for clarifying this.

Leading me to another question:
Would UCI also support patched versions e.g. https://dev.openwrt.org/ticket/7977 ?
Does UCI call swconfig with simply passing all parameters to swconfig
or does UCI read the driver's options directly from the driver ?

Regards,
Ralph

Re: configure configurable switches with swconfig

Swconfig links libuci and uses uci as native persistent config format.

Re: configure configurable switches with swconfig

sagemol wrote:
jow wrote:

Wrong. Every option swconfig supports is also settable with uci.

Thank You for clarifying this.

Leading me to another question:
Would UCI also support patched versions e.g. https://dev.openwrt.org/ticket/7977 ?
Does UCI call swconfig with simply passing all parameters to swconfig
or does UCI read the driver's options directly from the driver ?

Regards,
Ralph

Hi sagemol,
I am also using patched driver of the switch controller (rtl8366rb) and confirm it is working (also via UCI)

root@Core-Sf:~# swconfig dev rtl8366rb port 1 get priority       
0

# Modifying /etc/config/network
....................
config 'switch_port'
        option 'device' 'rtl8366rb'
        option 'port' '1'
        option 'pvid' '1'
        option 'led' '6'
        option 'priority' '7'
...............
root@Core-Sf:~# swconfig dev rtl8366rb load /etc/config/network 
root@Core-Sf:~# swconfig dev rtl8366rb port 1 get priority
7

Thanks to you, for contributing to this patch as well.
BR

Re: configure configurable switches with swconfig

jow wrote:

Swconfig links libuci and uses uci as native persistent config format.

Thank You again, that makes sense, now I understand the workflow much better...


dir2cas wrote:

Thanks to you, for contributing to this patch as well.

You're welcome.
Although I did it mainly for my own convenience... :-)

Regards
Ralph

Re: configure configurable switches with swconfig

@sagemol,

I asked in another thread, but got no answer, hope that you may know.

Do you know if there is a similar driver enhancement for rtl8366s found in WNDR3700 like the one for rtl8366rb found in 1034ND?

Could someone alter this one to be applicable for rtl8366s or it would not be that easy?

Re: configure configurable switches with swconfig

Sorry for late response, been on holiday...

I didn't review the code for the rtl8366s driver, but the driver should be very similar to rtl8366rb,
since the rtl8366rb was created from source of the rtl8366s.
Should not be to much work to make the rtl8366rb-patches available for rtl8366s.
But You'll have to find someone who owns a rtl8366s to do that...

Regards,
Ralph