Ejemplo n.º 1
0
def pretuneTCP(opts):
    """ Make any pre-test adjustments to TCP. """

    # If bully mode we replace AIMD with our own
    if opts.bully:
        one, ssthresh=1, 2*cvar.baseMSS
        vWADNoAI=libweb100.web100_var_find(cvar.gtune, "WAD_NoAI")
        libweb100.web100_raw_write(vWADNoAI, cvar.conn, one)
	try:
	    vLimSsthresh=libweb100.web100_var_find(cvar.gtune, "LimSsthresh")
	except Exception, e:
            runlog("F", "No LimSsthresh - Check for a newer Web100 kernel!")
	    sys.exit(1)
        libweb100.web100_raw_write(vLimSsthresh, cvar.conn, ssthresh)
        runlog("W", "Set bully mode %d"%(libweb100.web100_raw_read(vLimSsthresh, cvar.conn)))
Ejemplo n.º 2
0
def pretuneTCP(opts):
    """ Make any pre-test adjustments to TCP. """

    # If bully mode we replace AIMD with our own
    if opts.bully:
        one, ssthresh = 1, 2 * cvar.baseMSS
        vWADNoAI = libweb100.web100_var_find(cvar.gtune, "WAD_NoAI")
        libweb100.web100_raw_write(vWADNoAI, cvar.conn, one)
        try:
            vLimSsthresh = libweb100.web100_var_find(cvar.gtune, "LimSsthresh")
        except Exception, e:
            runlog("F", "No LimSsthresh - Check for a newer Web100 kernel!")
            sys.exit(1)
        libweb100.web100_raw_write(vLimSsthresh, cvar.conn, ssthresh)
        runlog(
            "W", "Set bully mode %d" %
            (libweb100.web100_raw_read(vLimSsthresh, cvar.conn)))
Ejemplo n.º 3
0
	def write(self, name, val):
		"""Write a value to a single variable."""
		
		try:
			var = self.agent.write_vars[name]
		except KeyError:
			raise error("No writable variable '%s' found."%name)
		buf = var.valtobuf(val, self.agent.bufp)
		if libweb100.web100_raw_write(var._var, self._connection, buf) != \
		   libweb100.WEB100_ERR_SUCCESS:
			libweb100_err()
Ejemplo n.º 4
0
    def write(self, name, val):
        """Write a value to a single variable."""

        try:
            var = self.agent.write_vars[name]
        except KeyError:
            raise error("No writable variable '%s' found." % name)
        buf = var.valtobuf(val, self.agent.bufp)
        if libweb100.web100_raw_write(var._var, self._connection, buf) != \
           libweb100.WEB100_ERR_SUCCESS:
            libweb100_err()