After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 647578 - support for CTC adapters on s390(x) is broken
support for CTC adapters on s390(x) is broken
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: ModemManager
git master
Other Linux
: Normal normal
: ---
Assigned To: Dan Williams
Depends on:
Blocks:
 
 
Reported: 2011-04-12 16:04 UTC by Dan Horák
Modified: 2011-04-13 09:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix support for CTC adapters on s390(x) (4.55 KB, patch)
2011-04-12 16:04 UTC, Dan Horák
none Details | Review
lsudev tool (4.71 KB, text/plain)
2011-04-12 20:16 UTC, Dan Williams
  Details

Description Dan Horák 2011-04-12 16:04:58 UTC
Created attachment 185797 [details] [review]
fix support for CTC adapters on s390(x)

The support for CTC adapters on the mainframe aka s390(x) is broken, see the attached patch and also https://bugzilla.redhat.com/show_bug.cgi?id=641986
Comment 1 Dan Williams 2011-04-12 19:49:43 UTC
Any chance you could attach a valid CTC ifcfg file that I can add to the testcases?
Comment 2 Dan Williams 2011-04-12 20:10:55 UTC
Nevermind, I found one here, hopefully it's still valid:

http://www.centos.org/docs/4/4.5/rhel-ig-s390-multi-en-4/s3-s390info-ctc.html

If not, feel free to attach one of your own.
Comment 3 Dan Williams 2011-04-12 20:16:27 UTC
Next, can you build and run the attached tool on a system that has a ctc device already configured?  (the ctc0 device should at least be present on the system, but doesn't have to have an IP address or anything).  Build the tool like so:

gcc -o lsudev `pkg-config --libs --cflags glib-2.0 gudev-1.0` lsudev.c

and then run it like so, and paste in the output:

sudo lsudev net

Ctl+C when you've got everything, it just waits for hotplug events after that.  I don't really like the strncmp(iface, "ctc", 3) thing in the code and this might allow us to detect ctc devices based on driver instead of interface name.
Comment 4 Dan Williams 2011-04-12 20:16:53 UTC
Created attachment 185831 [details]
lsudev tool
Comment 5 Dan Williams 2011-04-12 20:31:58 UTC
Next up, is it OK to omit TYPE=CTC when writing out a modified ifcfg file?
Comment 6 Dan Williams 2011-04-12 21:00:44 UTC
In any case, should be fixed as of:

8407a9f92c653d159861051bc3c2a3133d2c05f6 (master)
e476360cacff60aab13f79c262d13e4ee8d6f146 (0.8.x)
Comment 7 Dan Horák 2011-04-13 09:50:36 UTC
(In reply to comment #5)
> Next up, is it OK to omit TYPE=CTC when writing out a modified ifcfg file?

I've checked the code in the classic network setup scripts in the initscripts package (the type is detected from interface name) and also did a quick test without the TYPE variable set and everything works as expected. So I assume it's safe to remove it.
Comment 8 Dan Horák 2011-04-13 09:51:30 UTC
(In reply to comment #3)
> Next, can you build and run the attached tool on a system that has a ctc device
> already configured?  (the ctc0 device should at least be present on the system,
> but doesn't have to have an IP address or anything).  Build the tool like so:
> 
> gcc -o lsudev `pkg-config --libs --cflags glib-2.0 gudev-1.0` lsudev.c
> 
> and then run it like so, and paste in the output:
> 
> sudo lsudev net

------------------------------------------------------
Name:     ctc0
Type:     (null)
Subsys:   net
Number:   0
Path:     /sys/devices/ctcm/0.0.0600/net/ctc0
Driver:   (null)
Action:   (null)
Seq Num:  0
Dev File: (null)

Properties:
  UDEV_LOG:       3
  DEVPATH:        /devices/ctcm/0.0.0600/net/ctc0
  INTERFACE:      ctc0
  IFINDEX:        2
  SUBSYSTEM:      net
  INTERFACE_NAME: ctc0

    ------------------------------------------------------
    Name:     0.0.0600
    Type:     (null)
    Subsys:   ccwgroup
    Number:   0600
    Path:     /sys/devices/ctcm/0.0.0600
    Driver:   ctcm
    Action:   (null)
    Seq Num:  0
    Dev File: (null)
    
    Properties:
      UDEV_LOG:  3
      DEVPATH:   /devices/ctcm/0.0.0600
      DRIVER:    ctcm
      SUBSYSTEM: ccwgroup
    
        ------------------------------------------------------
        Name:     ctcm
        Type:     (null)
        Subsys:   (null)
        Number:   (null)
        Path:     /sys/devices/ctcm
        Driver:   (null)
        Action:   (null)
        Seq Num:  0
        Dev File: (null)
        
        Properties:
          UDEV_LOG: 3
          DEVPATH:  /devices/ctcm
        

------------------------------------------------------
Name:     lo
Type:     (null)
Subsys:   net
Number:   (null)
Path:     /sys/devices/virtual/net/lo
Driver:   (null)
Action:   (null)
Seq Num:  0
Dev File: (null)

Properties:
  UDEV_LOG:  3
  DEVPATH:   /devices/virtual/net/lo
  INTERFACE: lo
  IFINDEX:   1
  SUBSYSTEM: net


^C** Message: Caught signal 2, shutting down...
Comment 9 Dan Horák 2011-04-13 09:52:05 UTC
(In reply to comment #2)
> Nevermind, I found one here, hopefully it's still valid:
> 
> http://www.centos.org/docs/4/4.5/rhel-ig-s390-multi-en-4/s3-s390info-ctc.html
> 
> If not, feel free to attach one of your own.

Yes, this config is still valid.