From: Patrick McHardy <kaber@trash.net>
To: Ramachandra K <ramachandra.kuchimanchi@qlogic.com>
Cc: rdreier@cisco.com, general@lists.openfabrics.org,
netdev@vger.kernel.org, poornima.kamath@qlogic.com,
amar.mudrankit@qlogic.com
Subject: Re: [PATCH v4 14/14] QLogic VNIC: sysfs Documentation
Date: Wed, 11 Jun 2008 08:47:59 +0200 [thread overview]
Message-ID: <484F751F.7030407@trash.net> (raw)
In-Reply-To: <20080610210918.11186.64253.stgit@dale>
Since I didn't receive anything but a "its too complex" in
response to my previous question, let me ask again: why are
you inventing a new sysfs interface (combined with ~15 module
parameters) instead of using the existing standard interfaces
for this?
Ramachandra K wrote:
> +sysfs interface:
> +----------------
> +
> +The QLogic Virtual NIC module when loaded on host creates following set of
> +files into the sysfs:
> +
> +/sys/class/infiniband_qlgc_vnic/interfaces
> +
> + create_vnic (0200) To create a new VNIC interface, write the name
> + of the interface to this file.
> +
> + delete_vnic (0200) To delete an existing VNIC interface, write
> + name of that VNIC interface to this file.
This is exactly what rtnl_link is for.
> +/sys/class/infiniband_qlgc_vnic/interfaces/<VNIC-interface-name>/
> +
> + vnic_state (0444) State of the VNIC interface.
This I don't understand - you seem to be registering and
unregistering the net_device based some state machine,
in some cases even triggered by timers.
Whats the idea behind this?
> +
> + current_path (0444) In case of failover configuration, which
> + connection among the primary and secondary is
> + currently being used.
> +
> + multicast (0644) Get/Set IB multicast value for the VNIC
> + interface. Only root can Enable/Disable IB
> + multicast for that VNIC interface.
> +
> + rx_csum (0644) Get/Set receive checksum boolean value for VNIC
> + interface. Only root can Enable/Disable the
> + receive checksum operation for that VNIC
> + interface.
> +
> + tx_csum (0644) Get/Set transmit checksum boolean value for VNIC
> + interface. Only root can Enable/Disable the
> + transmit checksum operation for that VNIC
> + interface.
Why is this not done using ethtool?
> +Example:
> +--------
> +
> +QLogic VNIC sysfs interface can be used directly to create a VNIC interface.
> +
> +# echo the name of new VNIC interface to create_vnic
> +echo -n veth1 > /sys/class/infiniband_qlgc_vnic/interfaces/create_vnic
> +
> +# echo parameters to configure the VNIC interface. Some of these are
> +# interface level parameters which needs to be passed only once per VNIC
> +# interface.
> +
> +echo -n true > /sys/class/infiniband_qlgc_vnic/interfaces/veth1/rx_csum
> +echo -n false > /sys/class/infiniband_qlgc_vnic/interfaces/veth1/tx_csum
> +echo -n false > /sys/class/infiniband_qlgc_vnic/interfaces/veth1/multicast
> +
> +echo -n 00066a01de000037 > /sys/class/infiniband_qlgc_vnic/interfaces/veth1/primary_path/ioc_guid
> +echo -n fe8000000000000100066a11de000037 > /sys/class/infiniband_qlgc_vnic/interfaces/veth1/primary_path/dgid
> +echo -n ffff > /sys/class/infiniband_qlgc_vnic/interfaces/veth1/primary_path/pkey
> +echo -n 0 > /sys/class/infiniband_qlgc_vnic/interfaces/veth1/primary_path/instance
> +echo -n 100 > /sys/class/infiniband_qlgc_vnic/interfaces/veth1/primary_path/heartbeat
> +string="EVIC in Chassis 0x00066a00db000010, Slot 4, Ioc 1"
> +echo -n $string > /sys/class/infiniband_qlgc_vnic/interfaces/veth1/primary_path/ioc_string
> +
> +# Trigger the connection establishment process for the path by choosing required
> +# HCA and IB port combination.
> +
> +echo -n veth1 > /sys/class/infiniband_qlgc_vnic/vnic-mlx4_0-1/create_primary
> +
> +# In case of failover configuration, pass the parameters of the failover
> +# connection to the driver and trigger its connection establishment
> +# process.
> +
> +echo -n 00066a01de000037 > /sys/class/infiniband_qlgc_vnic/interfaces/veth1/secondary_path/ioc_guid
> +echo -n fe8000000000000100066a11de000037 > /sys/class/infiniband_qlgc_vnic/interfaces/veth1/secondary_path/dgid
> +echo -n ffff > /sys/class/infiniband_qlgc_vnic/interfaces/veth1/secondary_path/pkey
> +echo -n 1 > /sys/class/infiniband_qlgc_vnic/interfaces/veth1/secondary_path/instance
> +echo -n 100 > /sys/class/infiniband_qlgc_vnic/interfaces/veth1/secondary_path/heartbeat
> +string="EVIC in Chassis 0x00066a00db000010, Slot 4, Ioc 1"
> +echo -n $string > /sys/class/infiniband_qlgc_vnic/interfaces/veth1/secondary_path/ioc_string
> +
> +echo -n veth1 > /sys/class/infiniband_qlgc_vnic/vnic-mlx4_0-2/create_secondary
> +
> +# An interface can be deleted by echoing the name of the interface to be deleted
> +# to delete_vnic file
> +echo -n veth1 > /sys/class/infiniband_qlgc_vnic/interfaces/delete_vnic
This clearly shows the advantage of being able to use echo
for configuration.
next prev parent reply other threads:[~2008-06-11 6:48 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-10 21:02 [ofa-general] [PATCH v4 00/14] QLogic VNIC Driver Ramachandra K
2008-06-10 21:02 ` [ofa-general] [PATCH v4 01/14] QLogic VNIC: Driver - netdev implementation Ramachandra K
2008-06-10 21:03 ` [ofa-general] [PATCH v4 02/14] QLogic VNIC: Netpath - abstraction of connection to EVIC/VEx Ramachandra K
2008-06-10 21:03 ` [ofa-general] [PATCH v4 03/14] QLogic VNIC: Implementation of communication protocol with EVIC/VEx Ramachandra K
2008-06-10 21:04 ` [ofa-general] [PATCH v4 04/14] QLogic VNIC: Implementation of Control path of communication protocol Ramachandra K
2008-06-10 22:21 ` Stephen Hemminger
2008-06-10 21:04 ` [ofa-general] [PATCH v4 05/14] QLogic VNIC: Implementation of Data " Ramachandra K
2008-06-10 21:05 ` [ofa-general] [PATCH v4 06/14] QLogic VNIC: IB core stack interaction Ramachandra K
2008-06-10 21:05 ` [ofa-general] [PATCH v4 07/14] QLogic VNIC: Handling configurable parameters of the driver Ramachandra K
2008-06-10 21:06 ` [ofa-general] [PATCH v4 08/14] QLogic VNIC: sysfs interface implementation for " Ramachandra K
2008-06-10 21:06 ` [ofa-general] [PATCH v4 09/14] QLogic VNIC: IB Multicast for Ethernet broadcast/multicast Ramachandra K
2008-06-10 21:07 ` [ofa-general] [PATCH v4 10/14] QLogic VNIC: Driver Statistics collection Ramachandra K
2008-06-10 21:07 ` [PATCH v4 11/14] QLogic VNIC: Driver utility file - implements various utility macros Ramachandra K
2008-06-10 21:08 ` [PATCH v4 12/14] QLogic VNIC: Driver Kconfig and Makefile Ramachandra K
2008-06-10 21:08 ` [ofa-general] [PATCH v4 13/14] QLogic VNIC: Modifications to IB " Ramachandra K
2008-06-10 21:09 ` [ofa-general] [PATCH v4 14/14] QLogic VNIC: sysfs Documentation Ramachandra K
2008-06-11 6:47 ` Patrick McHardy [this message]
2008-06-12 15:13 ` [ofa-general] " Amar Mudrankit
2008-06-12 15:18 ` Patrick McHardy
2008-06-12 15:29 ` Ramachandra K
2008-06-12 15:34 ` Patrick McHardy
2008-06-12 20:22 ` Jeff Garzik
2008-06-14 18:03 ` Roland Dreier
2008-06-14 19:03 ` Jason Gunthorpe
2008-06-16 8:54 ` Patrick McHardy
2008-06-18 12:32 ` Ramachandra K
2008-06-18 12:38 ` Patrick McHardy
2008-06-18 18:21 ` Jason Gunthorpe
2008-06-19 1:19 ` Patrick McHardy
2008-06-19 1:26 ` Patrick McHardy
2008-06-12 15:50 ` Ramachandra K
2008-06-12 16:03 ` Patrick McHardy
2008-06-12 21:09 ` Amar Mudrankit
2008-06-13 15:20 ` Patrick McHardy
2008-06-13 21:47 ` Amar Mudrankit
2008-06-14 8:08 ` Patrick McHardy
2008-06-16 19:44 ` Amar Mudrankit
2008-06-16 20:39 ` Patrick McHardy
2008-06-12 16:04 ` Karen Shaeffer
2008-06-12 15:21 ` [ofa-general] [PATCH v4 00/14] QLogic VNIC Driver Ramachandra K
2008-06-12 15:35 ` Patrick McHardy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=484F751F.7030407@trash.net \
--to=kaber@trash.net \
--cc=amar.mudrankit@qlogic.com \
--cc=general@lists.openfabrics.org \
--cc=netdev@vger.kernel.org \
--cc=poornima.kamath@qlogic.com \
--cc=ramachandra.kuchimanchi@qlogic.com \
--cc=rdreier@cisco.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).