All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: vda@port.imtp.ilyichevsk.odessa.ua
Cc: Adam Kropelin <akropel1@rochester.rr.com>,
	linux-kernel@vger.kernel.org, Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: Looking for testers with these NICs
Date: Wed, 09 Oct 2002 11:20:10 -0700	[thread overview]
Message-ID: <3DA4735A.4020402@candelatech.com> (raw)
In-Reply-To: 200210091744.g99HiKp31184@Port.imtp.ilyichevsk.odessa.ua

Denis Vlasenko wrote:
> On 9 October 2002 15:14, Adam Kropelin wrote:
> 
>>On Wed, Oct 09, 2002 at 07:31:17PM -0200, Denis Vlasenko wrote:
>>
>>>ewrk3.c
>>
>>I've got a few of these laying around. Send whatever patches you want
>>tested and I'll give it a shot.
> 
> 
> Please do your best in trying to break it, especially since you say you have
> more than one. Can you plug them all in one box?
> 
> I'd suggest SMP/preempt heavy IO. Is there stress test software for NICs?
> What is pktgen?

pktgen will definately stress the nics.  Try sending to yourself
as well so you can test the pkt receive code..it's normally the weakest.

Ben

> --
> vda
> 
> diff -u --recursive linux-2.5.40org/drivers/net/ewrk3.c linux-2.5.40/drivers/net/ewrk3.c
> --- linux-2.5.40org/drivers/net/ewrk3.c	Tue Oct  1 05:06:58 2002
> +++ linux-2.5.40/drivers/net/ewrk3.c	Thu Oct  3 12:09:46 2002
> @@ -930,6 +930,7 @@
>  	spin_unlock(&lp->hw_lock);
>  }
> 
> +/* Called with lp->hw_lock held */
>  static int ewrk3_rx(struct net_device *dev)
>  {
>  	struct ewrk3_private *lp = (struct ewrk3_private *) dev->priv;
> @@ -1055,8 +1056,9 @@
>  }
> 
>  /*
> -   ** Buffer sent - check for TX buffer errors.
> - */
> +** Buffer sent - check for TX buffer errors.
> +** Called with lp->hw_lock held
> +*/
>  static int ewrk3_tx(struct net_device *dev)
>  {
>  	struct ewrk3_private *lp = (struct ewrk3_private *) dev->priv;
> @@ -1631,6 +1633,7 @@
>  	u_long iobase = dev->base_addr;
>  	int i, j, status = 0;
>  	u_char csr;
> +	unsigned long flags;
>  	union ewrk3_addr {
>  		u_char addr[HASH_TABLE_LEN * ETH_ALEN];
>  		u_short val[(HASH_TABLE_LEN * ETH_ALEN) >> 1];
> @@ -1745,19 +1748,26 @@
>  		}
> 
>  		break;
> -	case EWRK3_GET_STATS:	/* Get the driver statistics */
> -		cli();
> -		ioc->len = sizeof(lp->pktStats);
> -		if (copy_to_user(ioc->data, &lp->pktStats, ioc->len))
> -			status = -EFAULT;
> -		sti();
> +	case EWRK3_GET_STATS: { /* Get the driver statistics */
> +		typeof(lp->pktStats) *tmp_stats =
> +        		kmalloc(sizeof(lp->pktStats), GFP_KERNEL);
> +		if (!tmp_stats) return -ENOMEM;
> +
> +		spin_lock_irqsave(&lp->hw_lock, flags);
> +		memcpy(tmp_stats, &lp->pktStats, sizeof(lp->pktStats));
> +		spin_unlock_irqrestore(&lp->hw_lock, flags);
> 
> +		ioc->len = sizeof(lp->pktStats);
> +		if (copy_to_user(ioc->data, tmp_stats, sizeof(lp->pktStats)))
> +    			status = -EFAULT;
> +		kfree(tmp_stats);
>  		break;
> +	}
>  	case EWRK3_CLR_STATS:	/* Zero out the driver statistics */
>  		if (capable(CAP_NET_ADMIN)) {
> -			cli();
> +			spin_lock_irqsave(&lp->hw_lock, flags);
>  			memset(&lp->pktStats, 0, sizeof(lp->pktStats));
> -			sti();
> +			spin_unlock_irqrestore(&lp->hw_lock,flags);
>  		} else {
>  			status = -EPERM;
>  		}
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 


-- 
Ben Greear <greearb@candelatech.com>       <Ben_Greear AT excite.com>
President of Candela Technologies Inc      http://www.candelatech.com
ScryMUD:  http://scry.wanfear.com     http://scry.wanfear.com/~greear



  parent reply	other threads:[~2002-10-09 18:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-09 21:31 Looking for testers with these NICs Denis Vlasenko
2002-10-09 17:11 ` Alan Cox
2002-10-09 17:14 ` Adam Kropelin
2002-10-09 22:37   ` Denis Vlasenko
2002-10-09 17:57     ` Martin Josefsson
2002-10-10 11:42       ` Denis Vlasenko
2002-10-09 18:20     ` Ben Greear [this message]
2002-10-09 19:08     ` Adam Kropelin
2002-10-10  1:53     ` [PATCH] ewrk3: Add support for multiple NICs when modular (WAS: Looking for testers...) Adam Kropelin
2002-10-11  0:53     ` Looking for testers with these NICs Adam Kropelin
2002-10-09 19:05 ` Derek Fawcus
2002-10-10 11:33   ` Denis Vlasenko

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=3DA4735A.4020402@candelatech.com \
    --to=greearb@candelatech.com \
    --cc=akropel1@rochester.rr.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vda@port.imtp.ilyichevsk.odessa.ua \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.