def set_offload(devname, **kwargs):
 for (param, value) in kwargs.items():
  if (param == 'tcp_segmentation_offload'):
   value = (((value == 'on') and 1) or 0)
   try:
    ethtool.set_tso(devname, value)
   except IOError:
    return 'Not supported'
 return show_offload(devname)

def set_offload ( devname , ** kwargs ) : for ( param , value ) in kwargs . items ( ) : if ( param == 'tcp_segmentation_offload' ) : value = ( ( ( value == 'on' ) and 1 ) or 0 ) try : ethtool . set_tso ( devname , value ) except IOError : return 'Not supported' return show_offload ( devname )
changes the offload parameters and other features of the specified network device cli example: .