Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Igb or igc in tunables?

    Scheduled Pinned Locked Moved Hardware
    25 Posts 2 Posters 4.2k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      jsmiddleton4
      last edited by

      How do I know whether to use igb or igc in tunable variables?

      My NIC’s are listed as igc0, igc1, etc. So I’m thinking the tunable variables should be igc.

      Not sure however.

      If I want to turn EEE off the examples I’ve seen use igb. Is that right when my NIC’s get labeled igc?

      stephenw10S 1 Reply Last reply Reply Quote 0
      • stephenw10S
        stephenw10 Netgate Administrator @jsmiddleton4
        last edited by stephenw10

        igb tunables will do nothing for the igc driver. You need to use igc values for igc NICs.
        Not all tunables exist for all NICs/drivers. The eee setting does though:

        [22.01-BETA][admin@6100.stevew.lan]/root: sysctl hw.igc
        hw.igc.max_interrupt_rate: 8000
        hw.igc.eee_setting: 1
        hw.igc.rx_process_limit: 100
        hw.igc.sbp: 1
        hw.igc.smart_pwr_down: 0
        hw.igc.rx_abs_int_delay: 66
        hw.igc.tx_abs_int_delay: 66
        hw.igc.rx_int_delay: 0
        hw.igc.tx_int_delay: 66
        hw.igc.disable_crc_stripping: 0
        

        Steve

        J 2 Replies Last reply Reply Quote 0
        • J
          jsmiddleton4 @stephenw10
          last edited by jsmiddleton4

          @stephenw10

          Thanks. Using igb didn’t seem to make sense but don’t know enough about PFSENSE or BSD to be certain.

          ? Your examples there’s no 0,1,2 etc., for more than one NIC. Are those global and not needed?

          1 Reply Last reply Reply Quote 0
          • stephenw10S
            stephenw10 Netgate Administrator
            last edited by

            The 'hw.igc' values are global. Individual values are 'dev.igc.0.xxx'.

            The global values are usually read-only in the sysctls and need to be set as loader variables.

            See: https://www.freebsd.org/cgi/man.cgi?query=igc#LOADER_TUNABLES

            Steve

            J 1 Reply Last reply Reply Quote 1
            • J
              jsmiddleton4 @stephenw10
              last edited by

              @stephenw10
              PFSense just told me I can’t do them in Tunables….

              :)

              J 1 Reply Last reply Reply Quote 0
              • J
                jsmiddleton4 @jsmiddleton4
                last edited by jsmiddleton4

                So far these appear to be working. No error messages at boot. All in System Tunables. I have 3 Intel 2.5gb NIC’s. 1-WAN, 2-LAN

                All 0.
                dev.igc.1.eee_control
                dev.igc.2.eee_control
                dev.igc.1.fc
                dev.igc.2.fc
                dev.igc.0.eee_control
                dev.igc.0.fc

                All 1.
                dev.igc.0.enable_aim
                dev.igc.1.enable_aim
                dev.igc.2.enable_aim

                If I understand this correctly:

                1. Some variables may be and must be set in System Tunables directly.
                2. Some variables may be and must be set in loader config directly.
                3. Some variables to be set have to be placed in loader config first and then a corresponding entry in System Tunables.
                stephenw10S 1 Reply Last reply Reply Quote 0
                • stephenw10S
                  stephenw10 Netgate Administrator @jsmiddleton4
                  last edited by

                  @jsmiddleton4 said in Igb or igc in tunables?:

                  Some variables may be and must be set in System Tunables directly.
                  Some variables may be and must be set in loader config directly.
                  Some variables to be set have to be placed in loader config first and then a corresponding entry in System Tunables.

                  Yes.
                  Yes.
                  No.

                  You can often read the loader variables from the sysctl interface but not set them. I'm not aware of anything you have to set in both places. Some can be set in either place.
                  Values that need to be set before the driver loads are added as loader variables. Anything that can be set after the driver has loaded and attached to the hardware can be in sysctls.

                  Steve

                  1 Reply Last reply Reply Quote 1
                  • J
                    jsmiddleton4 @stephenw10
                    last edited by

                    @stephenw10

                    hw.igc.eee_setting: 1

                    If its in the loader.config.local “1” is off but if a Tunable “0” is off?

                    stephenw10S 1 Reply Last reply Reply Quote 0
                    • stephenw10S
                      stephenw10 Netgate Administrator @jsmiddleton4
                      last edited by

                      The file must be /boot/loader.conf.local.

                      I expect these values to be the same:

                      [22.01-BETA][admin@6100.stevew.lan]/root: sysctl hw.igc.eee_setting
                      hw.igc.eee_setting: 1
                      [22.01-BETA][admin@6100.stevew.lan]/root: sysctl dev.igc.0.eee_control
                      dev.igc.0.eee_control: 1
                      

                      Are you not seeing that?

                      J 2 Replies Last reply Reply Quote 0
                      • J
                        jsmiddleton4 @stephenw10
                        last edited by jsmiddleton4

                        @stephenw10

                        I’m reading the PFSENSE docs about the System Tunables and the information regarding loader.config.local for igc driver variables.

                        I’ll go back and check. Thought in tunables to turn a variable off its “0” and if turning a variable off in loader.config.local its “1”.

                        Yes, in tunables “0” is “no flow control”.

                        O,1,2,3 choices.

                        Gotta keep reading. I’m getting lost on which variables “1” turns them off, “0” turns them off, etc.

                        hw.igc.smart_pwr_down: 0

                        Does that turn smart power down on or off?

                        “ hw.em.smart_pwr_down: Set to true to leave smart power down enabled on newer adapters”

                        What is “true”, 1 or 0?

                        1 Reply Last reply Reply Quote 0
                        • J
                          jsmiddleton4 @stephenw10
                          last edited by

                          @stephenw10

                          Sorry had to take a moment.

                          This is what I see;
                          dev.igc.0.eee_control: 0

                          1 Reply Last reply Reply Quote 0
                          • stephenw10S
                            stephenw10 Netgate Administrator
                            last edited by

                            On should be 1 (true) and off should be 0 (false) in both places.

                            To be honest I don't think you will gain anything by setting any of those values. But it doesn't hurt to try. 😉

                            J 1 Reply Last reply Reply Quote 1
                            • J
                              jsmiddleton4 @stephenw10
                              last edited by jsmiddleton4

                              @stephenw10

                              I agree. The primary goal is to learn about some of these options though.

                              “eee” variable should be “0” in loader.config? I have it “0” in System Tunables.

                              “ hw.igc.eee_setting: 1”

                              Is confusing me.

                              Or is the variable in loader.config….. just telling the OS that the variable can be set?

                              1 Reply Last reply Reply Quote 1
                              • stephenw10S
                                stephenw10 Netgate Administrator
                                last edited by

                                I expect it to be 0 in both places if you want to disable eee on the NIC.

                                For a variable like that I would expect the loader variable to set the driver default option and then the system tunable to be available per NIC if you want it enabled only on one for example.

                                Steve

                                J 1 Reply Last reply Reply Quote 0
                                • J
                                  jsmiddleton4 @stephenw10
                                  last edited by jsmiddleton4

                                  @stephenw10

                                  Your eee is enabled?

                                  If I do the igc eee setting in loader.config not needed for individual NIC’s?

                                  So much easier in Windows and setting the network card’s options in Advance tab.

                                  1 Reply Last reply Reply Quote 0
                                  • stephenw10S
                                    stephenw10 Netgate Administrator
                                    last edited by

                                    Yes, it's enabled in my output above.

                                    J 2 Replies Last reply Reply Quote 1
                                    • J
                                      jsmiddleton4 @stephenw10
                                      last edited by jsmiddleton4

                                      @stephenw10

                                      Thanks for your help. I’ve seen you responding in other threads regarding Tunables and Loader questions.

                                      My #3 that was not true, now it makes more sense. There are variables that can go in both places.

                                      hw.igc.eee_setting: 0

                                      Doesn’t seem to be setting anything from my loader.config.local.

                                      The tunables work.

                                      hw.igc.max_interrupt_rate: 8000
                                      hw.igc.eee_setting: 1
                                      hw.igc.rx_process_limit: 100
                                      hw.igc.sbp: 1
                                      hw.igc.smart_pwr_down: 0
                                      hw.igc.rx_abs_int_delay: 66
                                      hw.igc.tx_abs_int_delay: 66
                                      hw.igc.rx_int_delay: 0
                                      hw.igc.tx_int_delay: 66
                                      hw.igc.disable_crc_stripping: 0

                                      Edit. I keep typing config. My file is loader.conf.local. My bad.

                                      1 Reply Last reply Reply Quote 1
                                      • J
                                        jsmiddleton4 @stephenw10
                                        last edited by

                                        @stephenw10

                                        This says “1” is disabled.

                                        https://www.freebsd.org/cgi/man.cgi?query=igc#LOADER_TUNABLES

                                        1 Reply Last reply Reply Quote 0
                                        • stephenw10S
                                          stephenw10 Netgate Administrator
                                          last edited by

                                          Hmm, curious. Well it guess it pays to always read the man page! Nice catch.

                                          J 1 Reply Last reply Reply Quote 1
                                          • J
                                            jsmiddleton4 @stephenw10
                                            last edited by jsmiddleton4

                                            @stephenw10

                                            What does the command IF wanted to put them in loader.conf.local actually look like?

                                            hw.igc.eee_setting=“1”

                                            Also there’s no mention of loader.conf.local. That page says everything goes in loader.conf.

                                            If the default already turns off eee why bother with any tunable for eee?

                                            Edit: Also this is why I'm a bit confused regarding 0's and 1's. Some times 1 disables and some times 0?

                                            stephenw10S 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.