>Number: 174213 >Category: misc >Synopsis: OFED sysfs/sysctl compat does not handle show/set attribute >functions >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Dec 06 01:20:00 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Anthony Cornehl >Release: 9.1-RC2 >Organization: EMC Isilon >Environment: FreeBSD Waltraute 9.1-RC2 FreeBSD 9.1-RC2 #2: Wed Dec 5 21:38:19 PST 2012 root@Waltraute:/usr/obj/usr/src/sys/KERN_IB amd64 >Description: Thread is here: http://lists.freebsd.org/pipermail/freebsd-infiniband/2012-November/000002.html
Mellanox Connect-X VPI cards allow the QSFP ports to be used for InfiniBand or Ethernet communication, by setting the port mode in sysfs/sysctl. But it appears that a sysfs/sysctl abstraction didn't get carried over all the for FreeBSD... --- # sysctl sys.device.mlx4_core0.mlx4_port1 sys.device.mlx4_core0.mlx4_port1: ib # sysctl sys.device.mlx4_core0.mlx4_port1=ib sys.device.mlx4_core0.mlx4_port1: ib sysctl: sys.device.mlx4_core0.mlx4_port1: Invalid argument --- The problem is that sysfs allows our MLX4 code to use two functions in an attribute structure, .store and .show. The compat header for sysfs in `sys/ofed/include/linux/sysfs.h` is doing something wrong and never calls the .store function in `sys/ofed/drivers/net/mlx4/main.c` for this sysctl. It looks like sysctl_handle_attr() should be handling this, but I'm not sure how. Yet. >How-To-Repeat: # pciconf -lv | grep -C2 'ConnectX VPI' # kldload mlx4 # sysctl sys.device.mlx4_core0.mlx4_port1=eth The value from `sysctl sys.device.mlx4_core0.mlx4_port1` should be "eth". >Fix: >Release-Note: >Audit-Trail: >Unformatted: _______________________________________________ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"