XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    RTL8153 Compile

    Scheduled Pinned Locked Moved Development
    88 Posts 14 Posters 44.9k Views 11 Watching
    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.
    • G Offline
      geant90
      last edited by

      Check it out

      Fully Functional

      Going to see if I can get it to call the vendor and device from the usb manu and product ids so it is all pretty and what not.

      1 Reply Last reply Reply Quote 0
      • olivierlambertO Offline
        olivierlambert Vates 🪐 Co-Founder CEO
        last edited by

        So you did modified the script? Can you share it somewhere? (so we could test it and include it for future update)

        G 1 Reply Last reply Reply Quote 0
        • G Offline
          geant90 @olivierlambert
          last edited by

          @olivierlambert

          Did not get to the script yet but I will. I just wanted to be 100 percent sure that the only reason its named side is because that script cannot handle it due to the unknown bus location. If we can get the script to recognize the location then that would likely be the end for all usb nic troubles as it will then be able to properly assign the ethx name for xapi to correctly pick up without any addition user interaction.Thus again putting XCP-NG ahead of the game. As we would not have to put a halt to dynamic naming for interfaces and the nic will be retained through a reboot.

          1 Reply Last reply Reply Quote 0
          • olivierlambertO Offline
            olivierlambert Vates 🪐 Co-Founder CEO
            last edited by

            Okay, keep us posted then šŸ™‚ Thanks for your contribution!

            1 Reply Last reply Reply Quote 0
            • G Offline
              geant90
              last edited by

              Anyone knows where is the database for USB vendors and product ids? Would like to put an edit in there to see if that would generate proper info.

              1 Reply Last reply Reply Quote 0
              • G Offline
                geant90
                last edited by geant90

                @olivierlambert @r1 @stormi

                Any one knows the file location for usb vendor and product ID?

                Nevermind found it!

                1 Reply Last reply Reply Quote 0
                • G Offline
                  geant90
                  last edited by

                  Got it showing in lsusb properly now time to figure xapi

                  [root@CNP-MOBILE ~]# xe pif-param-list uuid=9212a2c9-b68c-9ac6-cb76-d9baa6af2c5e
                  uuid ( RO)                       : 9212a2c9-b68c-9ac6-cb76-d9baa6af2c5e
                                       device ( RO): eth10
                                          MAC ( RO): 50:3e:aa:85:b6:ae
                                     physical ( RO): true
                                      managed ( RO): true
                           currently-attached ( RO): false
                                          MTU ( RO): 1500
                                         VLAN ( RO): -1
                               bond-master-of ( RO):
                                bond-slave-of ( RO): <not in database>
                        sriov-physical-PIF-of ( RO):
                         sriov-logical-PIF-of ( RO):
                         tunnel-access-PIF-of ( RO):
                      tunnel-transport-PIF-of ( RO):
                                   management ( RO): false
                                 network-uuid ( RO): 4a3277cb-f48b-47cc-ba69-7d73f02d814f
                           network-name-label ( RO): Pool-wide network associated with eth10
                                    host-uuid ( RO): af183f35-2629-4472-9538-90c2b37dca85
                              host-name-label ( RO): CNP-MOBILE
                        IP-configuration-mode ( RO): None
                                           IP ( RO):
                                      netmask ( RO):
                                      gateway ( RO):
                      IPv6-configuration-mode ( RO): None
                                         IPv6 ( RO):
                                 IPv6-gateway ( RO):
                         primary-address-type ( RO): IPv4
                                          DNS ( RO):
                                   properties (MRO): gro: on
                                 capabilities (SRO):
                                  io_read_kbs ( RO): 0.000
                                 io_write_kbs ( RO): 0.000
                                      carrier ( RO): false
                                    vendor-id ( RO):
                                  vendor-name ( RO):
                                    device-id ( RO):
                                  device-name ( RO):
                                        speed ( RO): 0 Mbit/s
                                       duplex ( RO): unknown
                              disallow-unplug ( RW): false
                                 pci-bus-path ( RO): 2-1:1.0
                                 other-config (MRW):
                         igmp-snooping-status ( RO): unknown
                  
                  
                  [root@CNP-MOBILE ~]# lsusb
                  Bus 002 Device 002: ID 2357:0601 TP-LINK USB 10/100/1000 LAN
                  Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
                  Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
                  [root@CNP-MOBILE ~]#
                  
                  
                  1 Reply Last reply Reply Quote 0
                  • olivierlambertO Offline
                    olivierlambert Vates 🪐 Co-Founder CEO
                    last edited by

                    Okay great šŸ™‚ Can you share with us all the modification you had to made? What can we do to have this integrated in XCP-ng? (ie not a too specific code ideally that would work with other network USB devices)

                    Thanks!

                    G 1 Reply Last reply Reply Quote 0
                    • G Offline
                      geant90 @olivierlambert
                      last edited by geant90

                      @olivierlambert

                      Of course. Right now I just got enough information to start the modification on the script which I start tomorrow. In fact, all that is needed to get usbnics working properly in xapi is simply being able to identify usb locations. THAT'S IT! All NICs if you look in the logs are initially named side then because the rename script runs and after properly identifying it assigns a ethxx name which the api will work with. All this would take is an import command and a few if commands. I got the logic down so now it is just about editing, trial and error.

                      Question regarding:

                      import sys, logging
                      from optparse import OptionParser, OptionGroup
                      from os.path import join as joinpath, normpath, exists as pathexists
                      from subprocess import Popen
                      
                      try:
                          import cStringIO as StringIO
                      except ImportError:
                          import StringIO
                      
                      import xcp.logger as LOG
                      from xcp.pci import PCI
                      from xcp.net.biosdevname import all_devices_all_names
                      from xcp.net.ip import ip_link_set_name
                      from xcp.net.ifrename.logic import rename
                      from xcp.net.ifrename.macpci import MACPCI
                      from xcp.net.ifrename.static import StaticRules
                      from xcp.net.ifrename.dynamic import DynamicRules
                      from xcp.net.ifrename.util import niceformat
                      from xcp.net.mac import MAC
                      

                      for the import command as my google fu was no help for the above xcp.net and xcp.pci what is it specifically referring to?
                      What I have that down we simply need to add and import for usb then modify a few existing calls with the first being if device location = usb format then run the modify version of the script that would have the edited fields to pull the proper usb locations etc. For the vendor and device it would be best and most simple if we refer to the usbvidpid list it can simply call the info from an already large existing database which can also be easily updated and/or modified for an entry. Functionality wise all that is needed is those if commands to make a usb location referable. Then any usb NIC (so long as drivers provided) would be truly plug and play and we could use the existing config to chose a specific ethxx name based on MAC so they survive reboots without further editing anything.

                      Got it is referring to the python libary / libs

                      1 Reply Last reply Reply Quote 0
                      • B Offline
                        BillyC
                        last edited by

                        Has there been any more work on this? I'm testing XCP-NG 8 beta and was hoping to try and test out similar usb nic?

                        1 Reply Last reply Reply Quote 0
                        • PeekP Offline
                          Peek
                          last edited by

                          This post is deleted!
                          1 Reply Last reply Reply Quote 0
                          • PeekP Offline
                            Peek
                            last edited by

                            This post is deleted!
                            1 Reply Last reply Reply Quote 0
                            • PeekP Offline
                              Peek
                              last edited by

                              Here's another willing script tester šŸ˜Ž

                              1 Reply Last reply Reply Quote 0
                              • P Offline
                                Pen2
                                last edited by

                                has enyone get this usb nic to work?

                                1 Reply Last reply Reply Quote 0
                                • R Offline
                                  r1 XCP-ng Team
                                  last edited by

                                  @Pen2 I think most people have šŸ™‚

                                  I think the rename script modification to recognize PCI and USB device was the key.

                                  P 1 Reply Last reply Reply Quote 0
                                  • P Offline
                                    Professor-X-Tech @r1
                                    last edited by

                                    @r1 any way you can share how to do it? I have the same issue I’m with the usb 3 Ethernet Adapter I have.

                                    1 Reply Last reply Reply Quote 0
                                    • R Offline
                                      r1 XCP-ng Team
                                      last edited by

                                      @Professor-X-Tech please go though the thread once and share us the commands used, errors seen.

                                      P 1 Reply Last reply Reply Quote 0
                                      • P Offline
                                        Professor-X-Tech @r1
                                        last edited by Professor-X-Tech

                                        @r1

                                        Naming is showing incorrect like others, have reported.

                                        Let me know if you need anything else.

                                        listing and scanning the USB Nic - side-861-eth0

                                        2020-06-26 17_16_38-Clipboard.png

                                        interface-rename -l (Giving an Error.)
                                        952ddb72-3e87-4303-be85-f466d9451e01-image.png

                                        xsconsole showing it but not connected

                                        a6ae1e62-4041-46e1-9c04-c7b24326a939-image.png

                                        lsusb

                                        62160e1f-65c3-4008-892c-9f089768b0ed-image.png

                                        dmesg with vendor ID

                                        9ee15ced-0bb9-46b2-9b8c-57ed52d61291-image.png

                                        1 Reply Last reply Reply Quote 0
                                        • P Offline
                                          Pen2
                                          last edited by

                                          i find patch solution
                                          just make file /etc/udev/rules.d/70-persistent-net.rules
                                          and put your all nic in it like this:

                                          SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="6a:66:e8:33:0f:1c", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
                                          SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="ed:8c:c1:ba:cb:b9", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
                                          SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="7c:3f:5f:fa:e4:a3", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"
                                          

                                          just change your own mac address. reboot and then xe pif-forget=(side-xxx uuid)
                                          and reboot.

                                          P 1 Reply Last reply Reply Quote 1
                                          • P Offline
                                            Professor-X-Tech @Pen2
                                            last edited by Professor-X-Tech

                                            @Pen2 Dude! you the man! lol thanks for this. šŸ¤™ saving this for the book so I don't forget in case it gets changed some day.

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post