From: Ursula Braun <ubr...@linux.vnet.ibm.com> Date: Thu, 24 Nov 2016 16:06:33 +0100
> Connection creation with SMC-R starts through an internal > TCP-connection. The Ethernet interface for this TCP-connection is not > restricted to the Ethernet interface of a RoCE device. Any existing > Ethernet interface belonging to the same physical net can be used, as > long as there is a defined relation between the Ethernet interface and > some RoCE devices. This relation is defined with the help of an > identification string called "Physical Net ID" or short "pnet ID". > Information about defined pnet IDs and their related Ethernet > interfaces and RoCE devices is stored in the SMC-R pnet table. > > This patch adds pnet table configuration support as a set of > sysfs files listed under /sys/kernel/smc. Attribute files > exist to add and delete pnet IDs and to map RoCE devices and > ethernet interfaces to an individual pnet ID. > > There is no cross check if ethernet interfaces or infiniband > devices really exist in the system. This enables the configuration of > the pnet table after module load even if interfaces or devices might > not yet be available. > > Signed-off-by: Thomas Richter <tmri...@linux.vnet.ibm.com> > Signed-off-by: Ursula Braun <ubr...@linux.vnet.ibm.com> Please do not use sysfs to configure your subsystems IB and eth mappings. Instead use a properly formed genetlink interface that will properly integrate with other subsystems, and also allow for proper event monitoring. I also fundamentally disagree with allowing references to devices that do not even exist yet. It implies a string --> device conversion in places where that cost should be avoided.