From owner-freebsd-net@freebsd.org Sat Sep 5 21:44:37 2015 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A05FD9C9B92 for ; Sat, 5 Sep 2015 21:44:37 +0000 (UTC) (envelope-from rizzo.unipi@gmail.com) Received: from mail-lb0-x233.google.com (mail-lb0-x233.google.com [IPv6:2a00:1450:4010:c04::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2005EBF4 for ; Sat, 5 Sep 2015 21:44:37 +0000 (UTC) (envelope-from rizzo.unipi@gmail.com) Received: by lbcjc2 with SMTP id jc2so25597013lbc.0 for ; Sat, 05 Sep 2015 14:44:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=mwrVXGJLP+F3pZNvyNzQ9pZmD/4ZroiR3E6EVjGY3K4=; b=cCwOyKjNuXiN/ivEaaXqbXqis7RcKv+jTili6bVsoSC1x61Z2eB0PBokTlCRbiIpXQ cCsvYaO9PjrFvPXJR6X6PxQobbmT4QGYCn5NcuSdCSzTs9qZjBoNyf/hTRh1YwnvnM1k iJlNw9u9m4LeVpDJS2TzUqzlg5U2NHk6/braW7f78r6lndl49i/N0FOAGxdYDKRhLUyH tDdcCJvc4r2EA4VmLioz0SagmCbgqfSwnFLxoPEaz+XL1XuZO5v/4jreYaQdQANZiXKP U4bTT0tlforyl0s7Eq8pPAS3BOhIn61MynDeE0/lvU8zAGeSjQAnOaxCyuvA0fyXUJo3 Y5Eg== MIME-Version: 1.0 X-Received: by 10.152.27.134 with SMTP id t6mr10245246lag.100.1441489473626; Sat, 05 Sep 2015 14:44:33 -0700 (PDT) Sender: rizzo.unipi@gmail.com Received: by 10.114.96.168 with HTTP; Sat, 5 Sep 2015 14:44:33 -0700 (PDT) In-Reply-To: <1441485132.75285.YahooMailBasic@web165005.mail.bf1.yahoo.com> References: <1441485132.75285.YahooMailBasic@web165005.mail.bf1.yahoo.com> Date: Sat, 5 Sep 2015 23:44:33 +0200 X-Google-Sender-Auth: tWFa-gPgy9OMdvVlj5l_fnS_xhI Message-ID: Subject: Re: Problem with receiving packets right after remote-interface is up From: Luigi Rizzo To: "M. V." Cc: "freebsd-net@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Sep 2015 21:44:37 -0000 You may be able to avoid the issue if you avoid autonegotiation and manually set the media type, speed and duplex. Cheers Luigi On Saturday, September 5, 2015, M. V. via freebsd-net < freebsd-net@freebsd.org> wrote: > Hi, > > Our product is being tested with Spirent TestCenter, and we're facing an > unusual problem with the tests. > We use NICs with intel 82574 and 82576 on FreeBSD 9.2 with latest em and > igb drivers (we also tested this on FreeBSD-10.1) It seems what Spirent > TestCenter does to start any individual test is, it disables its own > interface, and at the beginning of the new test, it suddenly "up"s its > interface and sends test packet right after that without any delay. This is > where we have problem, and we don't receive this first packets most of the > time (result is vary, in 100 tests, we lose about 60~70% of this "first" > packets on each test, so we FAIL most of tests because apparently we need > about 0.5~1 seconds after setup and renegotiation before we can receive > packets) > we checked both em and igb drivers and both have this problem. > this is how we reproduce the problem: > - connect sender-system's first port to receiver-system's first port. > - In sender-system: > -- ifconfig em0 down > -- sleep 5 > -- ifconfig em0 up && tcpreplay -l 1 -i em0 one_packet.pcap > > We checked, and even though sender sends packet successfully (tx led > blinks), in receiver even driver doesn't receive it (rx led doesn't blink, > and "rxeof" function in "if_em" tells us no new packet is received) > we removed optional interface options like msix, tso, rxcsum, ... but no > luck. > > So, does anyone know any solution for this problem? or any suggestions on > where we should look or what we should do that might solve it and prevent > our tests from being failed? > > Thank you guys. > _______________________________________________ > freebsd-net@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org > " > -- -----------------------------------------+------------------------------- Prof. Luigi RIZZO, rizzo@iet.unipi.it . Dip. di Ing. dell'Informazione http://www.iet.unipi.it/~luigi/ . Universita` di Pisa TEL +39-050-2217533 . via Diotisalvi 2 Mobile +39-338-6809875 . 56122 PISA (Italy) -----------------------------------------+-------------------------------