def set_ring(devname, **kwargs):
 try:
  ring = ethtool.get_ringparam(devname)
 except IOError:
  log.error('Ring parameters not supported on {0}'.format(devname))
  return 'Not supported'
 changed = False
 for (param, value) in kwargs.items():
  if (param in ethtool_ring_map):
   param = ethtool_ring_map[param]
   if (param in ring):
    if (ring[param] != value):
     ring[param] = value
     changed = True
 try:
  if changed:
   ethtool.set_ringparam(devname, ring)
  return show_ring(devname)
 except IOError:
  log.error('Invalid ring arguments on {0}: {1}'.format(devname, ring))
  return 'Invalid arguments'

def set_ring ( devname , ** kwargs ) : try : ring = ethtool . get_ringparam ( devname ) except IOError : log . error ( 'Ring parameters not supported on {0}' . format ( devname ) ) return 'Not supported' changed = False for ( param , value ) in kwargs . items ( ) : if ( param in ethtool_ring_map ) : param = ethtool_ring_map [ param ] if ( param in ring ) : if ( ring [ param ] != value ) : ring [ param ] = value changed = True try : if changed : ethtool . set_ringparam ( devname , ring ) return show_ring ( devname ) except IOError : log . error ( 'Invalid ring arguments on {0}: {1}' . format ( devname , ring ) ) return 'Invalid arguments'
changes the rx/tx ring parameters of the specified network device cli example: .