From owner-freebsd-net@freebsd.org Wed Sep 9 04:57:16 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 852049CCDEC for ; Wed, 9 Sep 2015 04:57:16 +0000 (UTC) (envelope-from bored_to_death85@yahoo.com) Received: from nm35-vm2.bullet.mail.gq1.yahoo.com (nm35-vm2.bullet.mail.gq1.yahoo.com [98.136.216.173]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 53A13190D for ; Wed, 9 Sep 2015 04:57:16 +0000 (UTC) (envelope-from bored_to_death85@yahoo.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1441774530; bh=QB3qZvS3qM2E1wmx+HXOu5SD/ur+U5BoAuaB9WFkuWM=; h=Date:From:Subject:To:Cc:In-Reply-To:From:Subject; b=CObEVVYoUUIYYjySvp0p3T0TjZhVFn/LvuH5xlEkY2IVEK7zwiZdQDGeK4i0P8H8dD0AmGMT7Nr3tTuaZaQrAOmIP+0vRzMjOiQH0f+DvKdhabiedP6sJNInWstmix8WWtKesKTD29zIn6IVkJ3Nqk4OzHjU+pt1t1pI728AUxLSvISFTKHzx+4Y+buLrxAcjJs4FVPqrfjy/DMwsrWqf2rUlfqsL7BD7wHxJhK5psyY0ovdM60U7nqFcaBA9mTjUfv9Lw6/dPgtU9QyWk61KiC+bfP0UlC6oESSsASBW8sRJL7jlY40k+yCFc6QAYXw8eSq2zQ1BG9QddoRI3CatA== Received: from [127.0.0.1] by nm35.bullet.mail.gq1.yahoo.com with NNFMP; 09 Sep 2015 04:55:30 -0000 Received: from [216.39.60.184] by nm35.bullet.mail.gq1.yahoo.com with NNFMP; 09 Sep 2015 04:52:38 -0000 Received: from [98.139.215.143] by tm20.bullet.mail.gq1.yahoo.com with NNFMP; 09 Sep 2015 04:52:38 -0000 Received: from [98.139.212.227] by tm14.bullet.mail.bf1.yahoo.com with NNFMP; 09 Sep 2015 04:52:38 -0000 Received: from [127.0.0.1] by omp1036.mail.bf1.yahoo.com with NNFMP; 09 Sep 2015 04:52:38 -0000 X-Yahoo-Newman-Property: ymail-4 X-Yahoo-Newman-Id: 196316.5692.bm@omp1036.mail.bf1.yahoo.com Received: (qmail 75978 invoked by uid 60001); 9 Sep 2015 04:52:38 -0000 X-YMail-OSG: 8JJWy8QVM1ksA2z.ZPvhfAH2V_h9nH4KrFK_.XmNAn_9eej lNQC5wslCxC_XLiu7UA4dMxvteG9yajYiYAY3ntMhHctMYeniwfHnkKMBkWs 0xdt2CKJ2pk1O7Fqs.MF.6J4ZtWMvUeWgASbIijPN_U3_vIgWPt4k6H.Q68c qgDjU9htGEZBDSnSFuoZtBiq5Cctosh9wT1LNZ8.OuWrae8aldj3Vo6j1bqf Gec4z6b_I9pFIE8XP06m6yOcVYvyACaKevJGf4n2XYB7y7GTQElA_h2K.d7Z Ss9gS1LFl1Cho.mTmSdpKRMI.m3NWXXjVWYcWx46j3UgsAUfY21WNK8zEW31 bFdctjntmrFvXVgFr8F5IqTOBtzcrLSPifzq0XAG0I51meOcuvoOI2JJzAsS .LF1wq493dUG9KLpbpFmZhsYieBUX3mh06_5ChBrqug4A98YZmoFLD6PQ3mS bmsFiT2KRpbO8WrkrHAh0St8vTJRhddF0mrKr64ExoCr_A4ZIgid2oV4ZmYF XhykFxcdlucn5080g0vYj1JONVyVNcQsVNr0cC9sjI75OfARLfU2APRhq8FT 0zwi5xSdhk20SgaKFhd_SqBgtAi8Cfv9H Received: from [2.180.36.214] by web165005.mail.bf1.yahoo.com via HTTP; Tue, 08 Sep 2015 21:52:38 PDT X-Rocket-MIMEInfo: 002.001, SGkgZ3V5cywNCg0KT24gU3VuLCA5LzYvMTUsIEFydGVtIEJlbGV2aWNoIDxhcnRlbWJAZ21haWwuY29tPiB3cm90ZToNCj4gV2hpbGUgeW91IGNhbiBpbmRlZWQgc2V0IHNwZWVkL2R1cGxleCBtYW51YWxseSwgeW91IHdpbGwgYWxzbyBuZWVkDQo.IHRvIG1ha2Ugc3VyZSBib3RoIGhhdmUgaGF2ZSBwcm9wZXIgY2xvY2sgbWFzdGVyL3NsYXZlDQo.IMKgc2VsZWN0aW9uIMKgd2hpY2ggaXMgbm9ybWFsbHkgZG9uZSB2aWEgYXV0b25lZ290aWF0aW9uLiBPbg0KPiBGcmVlYnNkIHNvbWUgaW50ZXJmYWNlcyBzdXABMAEBAQE- X-Mailer: YahooMailBasic/651 YahooMailWebService/0.8.203.813 Message-ID: <1441774358.73226.YahooMailBasic@web165005.mail.bf1.yahoo.com> Date: Tue, 8 Sep 2015 21:52:38 -0700 From: "M. V." Subject: Re: Problem with receiving packets right after remote-interface is up To: Artem Belevich Cc: "freebsd-net@freebsd.org" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable 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: Wed, 09 Sep 2015 04:57:16 -0000 Hi guys, On Sun, 9/6/15, Artem Belevich wrote: > While you can indeed set speed/duplex manually, you will also need > to make sure both have have proper clock master/slave > =A0selection =A0which is normally done via autonegotiation. On > Freebsd some interfaces support "mediaopt master" > option .. Thanks again for your answer. I continuted tests on this yesterday, and I f= ound root of the problem. As I told you, I checked ifconfig and there was n= o support for changing master/slave option. Yesterday I tested to see if th= is master/slave option affects my tests. I found out every time interface o= f remote system gets down and up, If our interface gets slave, everything i= s ok, but anytime our interface gets master, we don't receive sent packets = in the first second after getting up. So I changed driver code to manualy force interface to get slave (by changi= ng values of 82574's related registers) and my problem was solved completel= y (even with auto-neg. enabled) It seems getting master needs extra work and extra time to setup in hardwar= e level ('cause I didn't find any code in driver to do things differently w= hen we are master).=20 So my question is,=20 - Is there anything I can do to make my scenario work in master-mode too? (= interestingly cisco router doesn't have this problem in both master/slave m= odes) - Is it OK to force interface to always gets slave like this? (I found no p= roblem in my tests. I even checked what happens if 2 connected ports both w= ere forced to be slave. In that situation one of the ports gets master even= though we manually set it to slave, so connection is OK) Thank you. > On Saturday, September 5, 2015, M. V. via freebsd-net > < freebsd-net@freebsd.org> wrote:=20 >> 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=20 >> FreeBSD-10.1) It seems what Spirent TestCenter does to=20 >> start any individual test is, it disables its own interface,=20 >> and at the beginning of the new test, it suddenly "up"s its=20 >> interface and sends test packet right after that. >> This is where we have problem, and we don't receive this >> first packets most of the time (result is vary, in 100 tests,=20 >> 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) =20