Re: kern/180844: [panic] [re] Intermittent panic (re driver?)

2013-07-25 Thread linimon
Synopsis: [panic] [re] Intermittent panic (re driver?)

Responsible-Changed-From-To: freebsd-bugs->freebsd-net
Responsible-Changed-By: linimon
Responsible-Changed-When: Fri Jul 26 02:04:25 UTC 2013
Responsible-Changed-Why: 
Over to maintainer(s).

http://www.freebsd.org/cgi/query-pr.cgi?pr=180844
___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


[rfc] lacp sysctl fixes

2013-07-25 Thread Adrian Chadd
Hi,

This patch introduces a few things:

* there's now an lacp node, under net.link.lagg.{unit}
* There's a strict mode parameter now
* There's now a debug node
* .. and rx_test/tx_test sit under that.

http://people.freebsd.org/~adrian/netflix/20130725-lacp-debugging-1.diff

It's a pre-requisite for shifting the LACP debug/trace calls into a
per-lacp instance and extending things to be slightly more useful.
Right now it's almost an all-or-nothing thing.

Thanks!


-adrian
___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


Re: kern/180791: [ofed] [patch] Kernel crash on ifdown and kldunload mlxen

2013-07-25 Thread John Baldwin
The following reply was made to PR kern/180791; it has been noted by GNATS.

From: John Baldwin 
To: bug-follo...@freebsd.org,
 shah...@mellanox.com
Cc:  
Subject: Re: kern/180791: [ofed] [patch] Kernel crash on ifdown and kldunload 
mlxen
Date: Thu, 25 Jul 2013 15:18:06 -0400

 Thanks.  One note is that it seems like the state_lock should be held when
 stop is called.  Also, the callout used for stats should be drained during
 detach.  (If you use callot_init_mtx() instead of callout_init() then
 callout_stop() under the lock is race-free, though I'd still do the
 callout_drain() during detach to be safe.)
 
 Also, I had some other changes I made to this file to make the locking more
 consistent with other NIC drivers in the tree.  Can you look at this and
 test this patch please?
 
 Index: en_netdev.c
 ===
 --- en_netdev.c(revision 253547)
 +++ en_netdev.c(working copy)
 @@ -495,11 +495,6 @@ static void mlx4_en_do_get_stats(struct work_struc
  
queue_delayed_work(mdev->workqueue, &priv->stats_task, 
STATS_DELAY);
}
 -  if (mdev->mac_removed[MLX4_MAX_PORTS + 1 - priv->port]) {
 -  panic("mlx4_en_do_get_stats: Unexpected mac removed for %d\n",
 -  priv->port);
 -  mdev->mac_removed[MLX4_MAX_PORTS + 1 - priv->port] = 0;
 -  }
mutex_unlock(&mdev->state_lock);
  }
  
 @@ -688,8 +683,8 @@ int mlx4_en_start_port(struct net_device *dev)
mlx4_en_set_multicast(dev);
  
/* Enable the queues. */
 -  atomic_clear_int(&dev->if_drv_flags, IFF_DRV_OACTIVE);
 -  atomic_set_int(&dev->if_drv_flags, IFF_DRV_RUNNING);
 +  dev->if_drv_flags &= ~IFF_DRV_OACTIVE;
 +  dev->if_drv_flags |= IFF_DRV_RUNNING;
  
callout_reset(&priv->watchdog_timer, MLX4_EN_WATCHDOG_TIMEOUT,
mlx4_en_watchdog_timeout, priv);
 @@ -761,7 +756,7 @@ void mlx4_en_stop_port(struct net_device *dev)
  
callout_stop(&priv->watchdog_timer);
  
 -  atomic_clear_int(&dev->if_drv_flags, IFF_DRV_RUNNING);
 +  dev->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE);
  }
  
  static void mlx4_en_restart(struct work_struct *work)
 @@ -802,19 +797,30 @@ mlx4_en_init(void *arg)
  {
struct mlx4_en_priv *priv;
struct mlx4_en_dev *mdev;
 +
 +  priv = arg;
 +  mdev = priv->mdev;
 +  mutex_lock(&mdev->state_lock);
 +  mlx4_en_init_locked(priv);
 +  mutex_unlock(&mdev->state_lock);
 +}
 +
 +static void
 +mlx4_en_init_locked(struct mlx4_en_priv *priv)
 +{
 +
 +  struct mlx4_en_dev *mdev;
struct ifnet *dev;
int i;
  
 -  priv = arg;
dev = priv->dev;
mdev = priv->mdev;
 -  mutex_lock(&mdev->state_lock);
if (dev->if_drv_flags & IFF_DRV_RUNNING)
mlx4_en_stop_port(dev);
  
if (!mdev->device_up) {
en_err(priv, "Cannot open - device down/disabled\n");
 -  goto out;
 +  return;
}
  
/* Reset HW statistics and performance counters */
 @@ -835,9 +841,6 @@ mlx4_en_init(void *arg)
mlx4_en_set_default_moderation(priv);
if (mlx4_en_start_port(dev))
en_err(priv, "Failed starting port:%d\n", priv->port);
 -
 -out:
 -  mutex_unlock(&mdev->state_lock);
  }
  
  void mlx4_en_free_resources(struct mlx4_en_priv *priv)
 @@ -927,9 +930,14 @@ void mlx4_en_destroy_netdev(struct net_device *dev
if (priv->sysctl)
sysctl_ctx_free(&priv->conf_ctx);
  
 +  mutex_lock(&mdev->state_lock);
 +  mlx4_en_stop_port(dev);
 +  mutex_unlock(&mdev->state_lock);
 +
cancel_delayed_work(&priv->stats_task);
/* flush any pending task for this netdev */
flush_workqueue(mdev->workqueue);
 +  callout_drain(&priv->watchdog_timer);
  
/* Detach the netdev so tasks would not attempt to access it */
mutex_lock(&mdev->state_lock);
 @@ -1091,25 +1099,25 @@ static int mlx4_en_ioctl(struct ifnet *dev, u_long
error = -mlx4_en_change_mtu(dev, ifr->ifr_mtu);
break;
case SIOCSIFFLAGS:
 +  mutex_lock(&mdev->state_lock);
if (dev->if_flags & IFF_UP) {
 -  if ((dev->if_drv_flags & IFF_DRV_RUNNING) == 0) {
 -  mutex_lock(&mdev->state_lock);
 +  if ((dev->if_drv_flags & IFF_DRV_RUNNING) == 0)
mlx4_en_start_port(dev);
 -  mutex_unlock(&mdev->state_lock);
 -  } else
 +  else
mlx4_en_set_multicast(dev);
} else {
 -  mutex_lock(&mdev->state_lock);
if (dev->if_drv_flags & IFF_DRV_RUNNING) {
mlx4_en_stop_port(dev);
if_link_state_change(dev, LINK_STATE_DOWN);
 

Re: Recommendations for 10gbps NIC

2013-07-25 Thread Scott Long
We use both the chelsio and intel offerings

Scott

On Jul 25, 2013, at 2:10 PM, "Alexander V. Chernikov"  
wrote:

> On 25.07.2013 00:26, Boris Kochergin wrote:
>> Hi.
> Hello.
>> 
>> I am looking for recommendations for a 10gbps NIC from someone who has
>> successfully used it on FreeBSD. It will be used on FreeBSD 9.1-R/amd64
>> to capture packets. Some desired features are:
>> 
>> - PCIe
>> - LC connectors
>> - 10GBASE-SR
>> - Either single- or dual-port
>> - Multiqueue
> Intel 82598/99/X520
> Emulex OCe10102-NM
> Mellanox ConnectX
> Chelsio T4
>> 
>> Specific part numbers would be appreciated. Thank you.
>> 
>> -Boris
>> ___
>> freebsd-net@freebsd.org mailing list
>> http://lists.freebsd.org/mailman/listinfo/freebsd-net
>> To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"
> 
> ___
> freebsd-net@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"
___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


Re: Recommendations for 10gbps NIC

2013-07-25 Thread Luigi Rizzo
On Thu, Jul 25, 2013 at 8:10 PM, Alexander V. Chernikov
 wrote:
> On 25.07.2013 00:26, Boris Kochergin wrote:
>>
>> Hi.
>
> Hello.
>>
>>
>> I am looking for recommendations for a 10gbps NIC from someone who has
>> successfully used it on FreeBSD. It will be used on FreeBSD 9.1-R/amd64
>> to capture packets. Some desired features are:
>>

if you are into high speed packet capture i'd really suggest the intel,
is the only one that is supported by netmap and can give you true line rate

cheers
luigi

>> - PCIe
>> - LC connectors
>> - 10GBASE-SR
>> - Either single- or dual-port
>> - Multiqueue
>
> Intel 82598/99/X520
> Emulex OCe10102-NM
> Mellanox ConnectX
> Chelsio T4
>>
>>
>> Specific part numbers would be appreciated. Thank you.
>>
>> -Boris
>> ___
>> freebsd-net@freebsd.org mailing list
>> http://lists.freebsd.org/mailman/listinfo/freebsd-net
>> To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"
>>
>
> ___
> freebsd-net@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"



-- 
-+---
 Prof. Luigi RIZZO, ri...@iet.unipi.it  . Dip. di Ing. dell'Informazione
 http://www.iet.unipi.it/~luigi/. Universita` di Pisa
 TEL  +39-050-2211611   . via Diotisalvi 2
 Mobile   +39-338-6809875   . 56122 PISA (Italy)
-+---
___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


Re: Recommendations for 10gbps NIC

2013-07-25 Thread Alexander V. Chernikov

On 25.07.2013 00:26, Boris Kochergin wrote:

Hi.

Hello.


I am looking for recommendations for a 10gbps NIC from someone who has
successfully used it on FreeBSD. It will be used on FreeBSD 9.1-R/amd64
to capture packets. Some desired features are:

- PCIe
- LC connectors
- 10GBASE-SR
- Either single- or dual-port
- Multiqueue

Intel 82598/99/X520
Emulex OCe10102-NM
Mellanox ConnectX
Chelsio T4


Specific part numbers would be appreciated. Thank you.

-Boris
___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"



___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


Re: bce(4) panics, 9.2rc1

2013-07-25 Thread Sean Bruno
On Wed, 2013-07-24 at 14:23 -0700, Sean Bruno wrote:
> On Wed, 2013-07-24 at 14:07 -0700, Sean Bruno wrote:
> > Running 9.2 in production load mail servers.  We're hitting the
> > "watchdog" message and crashing with the stable/9 version.  We're
> > reverting the change from 2 weeks ago and seeing if it still happens.
> > We didn't see this from stable/9 from about a month ago.
> > 
> > 
> > Sean
> > 
> > ref: 
> > http://svnweb.freebsd.org/base?view=revision&revision=253128
> 
> These panics are happening on:
> 
> bce0:  mem
> 0xda00-0xdbff irq 36 at device 0.0 on pci1
> miibus0:  on bce0
> brgphy0:  PHY 1 on miibus0
> brgphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT,
> 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto, auto-flow
> bce0: Ethernet address: d4:ae:52:8d:42:fc
> bce0: ASIC (0x57092008); Rev (C0); Bus (PCIe x4, 2.5Gbps); B/C (5.2.3);
> Bufs (RX:2;TX:2;PG:8); Flags (SPLT|MSI|MFW); MFW (NCSI 2.0.11)
> Coal (RX:6,6,18,18; TX:20,20,80,80)
> bce1:  mem
> 0xdc00-0xddff irq 48 at device 0.1 on pci1
> miibus1:  on bce1
> brgphy1:  PHY 1 on miibus1
> brgphy1:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT,
> 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto, auto-flow
> bce1: Ethernet address: d4:ae:52:8d:42:fd
> bce1: ASIC (0x57092008); Rev (C0); Bus (PCIe x4, 2.5Gbps); B/C (5.2.3);
> Bufs (RX:2;TX:2;PG:8); Flags (SPLT|MSI|MFW); MFW (NCSI 2.0.11)
> Coal (RX:6,6,18,18; TX:20,20,80,80)
> 


These machines are using IPMI for management (Dell R410) and seem to be
unable to attach to /dev/ipmi0:

ipmi0:  port 0xca8,0xcac on acpi0
ipmi0: KCS mode found at io 0xca8 on acpi

ipmi1:  on isa0
device_attach: ipmi1 attach returned 16
ipmi1:  on isa0
device_attach: ipmi1 attach returned 16
...
ipmi0: Timed out waiting for GET_DEVICE_ID


Sean



signature.asc
Description: This is a digitally signed message part


Re: kern/180430: [ofed] [patch] Bad UDP checksum calc for fragmented packets

2013-07-25 Thread jhb
Synopsis: [ofed] [patch] Bad UDP checksum calc for fragmented packets

State-Changed-From-To: open->patched
State-Changed-By: jhb
State-Changed-When: Thu Jul 25 16:34:38 UTC 2013
State-Changed-Why: 
Fix committed to HEAD, thanks!


Responsible-Changed-From-To: freebsd-net->jhb
Responsible-Changed-By: jhb
Responsible-Changed-When: Thu Jul 25 16:34:38 UTC 2013
Responsible-Changed-Why: 
Fix committed to HEAD, thanks!

http://www.freebsd.org/cgi/query-pr.cgi?pr=180430
___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


rtprio threads

2013-07-25 Thread Laurie Jennings
Im trying to get a user space pthread to monitor some kernel buffers but I 
can't get it to run at
any sort or reliable priority. The docs on rtprio are pretty weak. I've tried 
to change the rtprio of 
the process, but it just locks up the system. I can't figure it out.

what are the ways to give a user process the top users pace priority? renice 
doesn't seem to help
much.

Thanks!

Laurie
___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


How to create vlan (four NIC into one) using lagg

2013-07-25 Thread Xu Zhe
Hi, all,

I am trying to use lagg to bind four 1Gb NIC into 4Gb one. I was testing
this using two machines running FreeBSD 8.2, each of the machine has
four 1Gb ethernet card, and connected correspondingly, means:

MACHINE1 MACHINE2
em0 <->em0
em1 <->em1
em2 <->em2
em3 <->em3

Then I created vlan called 'lagg0' on each machine using:

ifconfig lagg0 create
ifconfig lagg0 laggproto lacp laggport em0 laggport em1 laggport em2
laggport em3
ifconfig lagg0 1.1.1.1/24
ifconfig lagg0 up

And do this on MACH2 too, only change IP from 1.1.1.1 to 1.1.1.2.

But I cannot ping each other, since none of the link is both active:

MACHINE1
# ifconfig lagg0
lagg0: flags=8843 metric 0 mtu 1500
options=219b
ether 00:08:9b:d4:91:64
inet 1.1.1.1 netmask 0xff00 broadcast 1.1.1.255
media: Ethernet autoselect
status: active
laggproto lacp
laggport: em3 flags=1c
laggport: em2 flags=18
laggport: em1 flags=18
laggport: em0 flags=18

MACHINE2
# ifconfig lagg0
lagg0: flags=8843 metric 0 mtu 1500
options=219b
ether 00:08:9b:d3:72:60
inet 1.1.1.2 netmask 0xff00 broadcast 1.1.1.255
media: Ethernet autoselect
status: active
laggproto lacp
laggport: em3 flags=18
laggport: em2 flags=1c
laggport: em1 flags=1c
laggport: em0 flags=1c

So, em3 is active on MACHINE1 but not active on MACH2, while em0-em2 are
active on MACH2 but not on MACHI1.

What might be the problem?

Thanks!
Peter
___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


Re: A huge amount of "sonewconn: pcb 0xfffffe0053916dc8: Listen queue overflow: 193 already in queue awaiting acceptance" in logs recently (9-STABLE)

2013-07-25 Thread Andre Oppermann

On 25.07.2013 12:46, Lev Serebryakov wrote:

Hello, Freebsd-net.

  I have 9.1-STABLE r253105 system, which started to flood logs with
  "sonewconn: pcb 0xfe0053916dc8: Listen queue overflow: 193 already in
queue awaiting acceptance" messages (there are thousnds of it, if you take
"last message was repeated 600 times" in account).

  Nothing was changed in settings for long time.

  How could I determine, which connections (listen port, at least) cause
these messages?


This means the rate of incoming connection attempts is grater than the speed
of the application accepting them.  Typically you either suffer from a DoS
attack or your server is undersized for the amount of traffic it is receiving.

A change to rate-limit the number of these messages is in the works to prevent
it filling from the logs too fast.

--
Andre

___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


Re: A huge amount of "sonewconn: pcb 0xfffffe0053916dc8: Listen queue overflow: 193 already in queue awaiting acceptance" in logs recently (9-STABLE)

2013-07-25 Thread Florian Smeets
On 25.07.13 12:46, Lev Serebryakov wrote:
> Hello, Freebsd-net.
> 
>  I have 9.1-STABLE r253105 system, which started to flood logs with
>  "sonewconn: pcb 0xfe0053916dc8: Listen queue overflow: 193 already in
> queue awaiting acceptance" messages (there are thousnds of it, if you take
> "last message was repeated 600 times" in account).
> 
>  Nothing was changed in settings for long time.
> 
>  How could I determine, which connections (listen port, at least) cause
> these messages?
> 

netstat -A more details are in the commit log of r242306. MFC to
stable/9 was r252782.

Florian



signature.asc
Description: OpenPGP digital signature


A huge amount of "sonewconn: pcb 0xfffffe0053916dc8: Listen queue overflow: 193 already in queue awaiting acceptance" in logs recently (9-STABLE)

2013-07-25 Thread Lev Serebryakov
Hello, Freebsd-net.

 I have 9.1-STABLE r253105 system, which started to flood logs with
 "sonewconn: pcb 0xfe0053916dc8: Listen queue overflow: 193 already in
queue awaiting acceptance" messages (there are thousnds of it, if you take
"last message was repeated 600 times" in account).

 Nothing was changed in settings for long time.

 How could I determine, which connections (listen port, at least) cause
these messages?

-- 
// Black Lion AKA Lev Serebryakov 

___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"