[openib-general] [PATCH 8/10] sysfs interface implementation
Ramachandra K
rkuchimanchi at silverstorm.com
Tue Oct 3 06:59:58 PDT 2006
Bryan O'Sullivan wrote:
> Ramachandra K wrote:
>>
>> +/*
>> + * target eiocs are added by writing
>> + *
>> + * ioc_guid=<EIOC GUID>,dgid=<dest
>> GID>,pkey=<P_key>,name=<interface_name>
>> + * to the create_primary sysfs attribute.
>> + */
>> +enum {
>> + VNIC_OPT_ERR = 0,
>> + VNIC_OPT_IOC_GUID = 1 << 0,
>> + VNIC_OPT_DGID = 1 << 1,
>> + VNIC_OPT_PKEY = 1 << 2,
>> + VNIC_OPT_NAME = 1 << 3,
>> + VNIC_OPT_INSTANCE = 1 << 4,
>> + VNIC_OPT_RXCSUM = 1 << 5,
>> + VNIC_OPT_TXCSUM = 1 << 6,
>> + VNIC_OPT_HEARTBEAT = 1 << 7,
>> + VNIC_OPT_ALL = (VNIC_OPT_IOC_GUID |
>> + VNIC_OPT_DGID | VNIC_OPT_NAME | VNIC_OPT_PKEY),
>> +};
>
> This is not OK. You can't pass in multiple values to a sysfs file.
> Either set the values separately or (if they have to be set all at once)
> find some other way to do this work. Also, putting all of this parsing
> cruft in a driver is a sign you're trying to do something you shouldn't be.
>
This is similar to what is done in the SRP driver. In fact I had chosen this
approach of adding targets looking at the SRP driver as the input parameters
that are required here are almost same as that of the SRP driver.
Regards,
Ram
More information about the general
mailing list