From owner-freebsd-net Mon Aug 7 0:26:46 2000 Delivered-To: freebsd-net@freebsd.org Received: from gto.networkphysics.com (DNS1.networkphysics.com [63.194.71.40]) by hub.freebsd.org (Postfix) with ESMTP id 6F14C37B76C for ; Mon, 7 Aug 2000 00:26:43 -0700 (PDT) (envelope-from pavel@cutlass.networkphysics.com) Received: from cutlass.networkphysics.com (cutlass.networkphysics.com [10.1.0.21]) by gto.networkphysics.com (8.9.3/8.9.3) with ESMTP id AAA02758; Mon, 7 Aug 2000 00:26:09 -0700 (PDT) (envelope-from pavel@cutlass.networkphysics.com) Message-Id: <200008070726.AAA02758@gto.networkphysics.com> To: gul@gul.kiev.ua Cc: Tarik Alj , freebsd-net@FreeBSD.ORG Subject: Re: VLAN MTU? 1500? 1504? Why? In-Reply-To: Message from Pavel Gulchouck of "Sun, 06 Aug 2000 15:00:30 +0300." <20000806150029.A26345@lucky.carrier.kiev.ua> Date: Mon, 07 Aug 2000 00:26:09 -0700 From: Tom Pavel Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >>>>> On Sun, 6 Aug 2000, Pavel Gulchouck writes: > And I found one curious feature: if I'm running tcpdump on fxp0, > all packets passes ok. Without tcpdump they drops. Now I'm thinking > about run tcpdump as daemon. ;-) Just a pointer in case you haven't figured this one out yet: The fxp driver conditionalizes its acceptance of "invalid" ethernet packets on the promiscuous flag. Hence, with the interface in promiscuous mode, you will capture packets with CRC errors (I think), packets that are too short, and packets that are too long. static void fxp_init(xsc) void *xsc; { ... prm = (ifp->if_flags & IFF_PROMISC) ? 1 : 0; ... cbp->save_bf = prm; /* save bad frames */ ... /* * Start the config command/DMA. */ fxp_scb_wait(sc); CSR_WRITE_4(sc, FXP_CSR_SCB_GENERAL, vtophys(&cbp->cb_status)); CSR_WRITE_1(sc, FXP_CSR_SCB_COMMAND, FXP_SCB_COMMAND_CU_START); /* ...and wait for it to complete. */ while (!(cbp->cb_status & FXP_CB_STATUS_C)); ... It might be nice if the fxp driver exported a way to set these flags independently (i.e. cbp->save_bf, cbp->rcv_crc_xfer, cbp->disc_short_rx, and receiving long packets). I have not studied the other major ethernet drivers to see how the equivalent thing is done there. Obviously, link-layer bridging applications will need to pass (and interpret) the long encapsulated VLAN packets, but will want to drop runts and CRC-errors efficiently. Tom Pavel Network Physics Inc. pavel@networkphysics.com / pavel@alum.mit.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message