Do we really need to touch the framework for this? I'm of the opinion that these debugging overrides might better be handled as driver-private tunables ("private properties"), without making the framework aware of them explicitly.
Admittedly, its not that big a deal one way or the other.... - Garrett Sebastien Roy wrote: > I'm sponsoring this fast-track for Vasumathi Sundaram, the timer expires > on 06/15/2009. > > LSO and HW TX Checksum properties in dladm > ------------------------------------------ > > 1. Summary > ---------- > > This case proposes to add two properties "lso" and "hw_tx_cksum" to > dladm, to allow the LSO and Transmit HW checksum properties of the > driver to be updated on the fly at runtime. > > Release binding: > Patch > > 2. Description > -------------- > > To ensure the correct operation of any driver that supports LSO and > hardware checksum, it is often required to turn the properties on or > off for debugging. An example will be the nxge driver, that has > different values for the hardware checksum capability to workaround > hardware bugs. > > Currently, to enable/disable the Transmit HW checksums and LSO > properties in a driver, the driver's .conf file needs to be updated to > set the capabilities, and the interface has to be unplumbed and > plumbed for the settings to take effect. When the interface is > replumbed, the driver announces its LSO/HW Checksum capabilities to > GLD which is then passed up to its clients. > > Since dladm provides more consistent interfaces to set link > properties, LSO and TX HW checksum should be added as link properties > that can be enabled or disabled at runtime without requiring to modify > the driver's .conf file and the unplumb/plumb sequence. > > To support this, the command 'dladm show-linkprop' will now display > two additional properties "lso" and "hw_tx_cksum" for each driver. > This is achieved by adding two new MAC properties MAC_PROP_LSO and > MAC_PROP_HCKSUM to the enum mac_prop_id_t in > /usr/src/uts/common/sys/mac.h. These properties will apply to all > datalinks of type DL_ETHER. > > Each driver that supports LSO and TX Hardware checksum should include > cases for MAC_PROP_LSO and MAC_PROP_TX_HCKSUM in <driver>_m_setprop() > and <driver>_m_getprop() callback functions to set and get the current > and possible values. dladm will not list these properties for those > drivers that do not support them. Whenever one of these properties is > enabled or disabled through <driver>_m_setprop(), the driver should > call mac_capab_update (MAC_NOTE_CAPAB_CHG) to initiate capability > renegotiation with upper layers, which prevents the needs for the > unplumb-plumb of the interface. > > 3. Interface changes > -------------------- > > | Interfaces Exported | > |______________________|__________________________|_______________________| > | Interface | Classification | Comments | > |______________________|__________________________|_______________________| > | | | | > | MAC_PROP_LSO | Consolidation Private | <sys/mac.h> | > | MAC_PROP_HCKSUM | Consolidation Private | <sys/mac.h> | > | lso | Committed | dladm property name | > | hw_tx_cksum | Committed | dladm property name | > |______________________|__________________________|_______________________| > > > A sample output is as follows: > LINK PROPERTY PERMS VALUE DEFAULT POSSIBLE > e1000g0 lso rw 1 1 1,0 > e1000g0 hw_tx_cksum rw 1 1 1,0 > > >