[ofa-general] Re: [PATCH RFC v2] IB/ipoib: enable IGMP for userpsace multicast IB apps

Or Gerlitz ogerlitz at voltaire.com
Tue Oct 2 01:07:22 PDT 2007


Roland Dreier wrote:
>> options ib_ipoib umcast_allowed=1
>> line to /etc/modprobe.conf to make this setting persistent across
>> module unload/load (eg reboots) and be applied to all the devices
>> created by ipoib. A sysfs entry has to be explicitly written following
>> each device creation.

> The umcast setting could be made persistent with a script that runs at
> ipoib interface hotplug too.  In fact surely OFED must have this
> infrastructure for setting connected mode, mtu, etc.

> I really want to push back as much as possible on creating new module
> parameters since we have too many as it is.

I understand this desire... just need a little clarification from you re 
hotplug. First, as for OFED, looking on the openibd service script 
(excerpts below) installed by OFED 1.3 I see that mode and mtu are set 
"manually", that is the user sets/provides the mode and mtu params for 
the script and the script uses sysfs to configure the device. This does 
not address devices created after the service has started nor seem a 
very elegant way to do so.

I understand that you think hotplug is the correct way to go, but its 
not pci hot plug as being used for the low level hw drivers (mthca, mlx4 
, etc) what rules one should set for the hotplug to act when a new 
interface is created (eg the default interfaces created by ipoib for 
each <hca,port> or child interface for a pkey created by the user)?

Assuming hotplug can be used to configure allowing umcast, I will remove 
the module param from the patch.

Or.

> set_ipoib_cm()
> {
>         local i=$1
>         shift
> 
>         if [ ! -e /sys/class/net/${i}/mode ]; then
>                 echo "Failed to configure IPoIB connected mode for ${i}"
>                 return 1
>         fi
> 
>         echo connected > /sys/class/net/${i}/mode
>         /sbin/ifconfig ${i} mtu ${IPOIB_MTU}
> }
....
> bring_up()
> {
>         local i=$1
>         shift
> 
>         case $DISTRIB in
>                 RedHat|Rocks)
>                     if [ $IS_FEDORA -eq 0 ]; then       
>                             /sbin/ifup ${i}
>                     else
>                             . ${NETWORK_CONF_DIR}/ifcfg-${i}
>                 if [ ! -z ${IPADDR} ] && [ ! -z ${NETMASK} ] && [ ! -z ${BROADCAST} ]; then
>                     /sbin/ifconfig ${i} ${IPADDR} netmask ${NETMASK} broadcast ${BROADCAST} > /dev/null 2>&1
>                 else
>                             /sbin/ifup ${i}
>                 fi
>                     fi
>                 ;;
>                 SuSE)
>                     if [ "$KPREFIX" == "26" ]; then
>                         ifconfig ${i} up > /dev/null 2>&1
>                     fi    
>                             # Workaround for ifup issue: two devices with the same IP address
>                         . ${NETWORK_CONF_DIR}/ifcfg-${i}
>                 if [ ! -z ${IPADDR} ] && [ ! -z ${NETMASK} ] && [ ! -z ${BROADCAST} ]; then
>                     /sbin/ifconfig ${i} ${IPADDR} netmask ${NETMASK} broadcast ${BROADCAST} > /dev/null 2>&1
>                 else
>                             /sbin/ifup ${i}
>                 fi
>                     # /sbin/ifup ${i} > /dev/null 2>&1
>                 ;;
>                 *)
>                     /sbin/ifup ${i}
>                 ;;
>         esac 
>         
>         if [ "X${SET_IPOIB_CM}" == "Xyes" ]; then
>                 set_ipoib_cm ${i}
>         fi
> 
>         return $?
> }










More information about the general mailing list