From owner-freebsd-net@freebsd.org Tue Sep 8 10:20:55 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 257D0A0028C for ; Tue, 8 Sep 2015 10:20:55 +0000 (UTC) (envelope-from prvs=686a0e2e0=roger.pau@citrix.com) Received: from SMTP02.CITRIX.COM (smtp02.citrix.com [66.165.176.63]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "mail.citrix.com", Issuer "Verizon Public SureServer CA G14-SHA2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D3EC41CC2 for ; Tue, 8 Sep 2015 10:20:54 +0000 (UTC) (envelope-from prvs=686a0e2e0=roger.pau@citrix.com) X-IronPort-AV: E=Sophos;i="5.17,489,1437436800"; d="scan'208";a="301910260" To: FreeBSD Net From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Subject: Questions about the FreeBSD network subsystem X-Enigmail-Draft-Status: N1110 CC: xen-devel Message-ID: <55EEB681.5070108@citrix.com> Date: Tue, 8 Sep 2015 12:20:49 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-DLP: MIA1 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: Tue, 08 Sep 2015 10:20:55 -0000 Hello, I'm not very familiar with FreeBSD network subsystem and I'm trying to import a new version of xen-netfront from Linux to FreeBSD. So far so good, most stuff is pretty similar and I think I've _mostly_ figured it out by myself. I have however a couple of questions regarding the network subsystem. I'm planning to use if_transmit/if_qflush instead of if_start. AFAICT I have to create my own queue inside of the driver in order to queue packets if the shared ring is full. What's the prefer way to do this? I see there are functions to create a mbuf queue (mbufq) or a ifnet based queue (drbr_* family of functions). I expect using drbr is TRTTD, but I would like to get some confirmation before proceeding. Also, the Xen PV network protocol allows signalling packets that contain valid data or blank checksums. It allows specifying the following flags: - NET{RX/TR}F_data_validated: packet data has been validated against protocol checksum. - NET{RX/TX}F_csum_blank: protocol checksum field is blank in the packet (hardware offload)?. - No flag: checksum present and valid. How do this options translate to the csum_flags present in mbufs on FreeBSD? Thanks, Roger.