From owner-freebsd-net@FreeBSD.ORG Sat Jan 24 22:43:50 2015 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4B4EAC9A for ; Sat, 24 Jan 2015 22:43:50 +0000 (UTC) Received: from phabric-backend.isc.freebsd.org (phabric-backend.isc.freebsd.org [IPv6:2001:4f8:3:ffe0:406a:0:50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2DD65B57 for ; Sat, 24 Jan 2015 22:43:50 +0000 (UTC) Received: from phabric-backend.isc.freebsd.org (phabric-backend.isc.freebsd.org [127.0.1.5]) by phabric-backend.isc.freebsd.org (8.14.9/8.14.9) with ESMTP id t0OMhnw3034175 for ; Sat, 24 Jan 2015 22:43:49 GMT (envelope-from mat@phabric-backend.isc.freebsd.org) Received: (from root@localhost) by phabric-backend.isc.freebsd.org (8.14.9/8.14.9/Submit) id t0OMhn8X034172; Sat, 24 Jan 2015 22:43:49 GMT (envelope-from mat) Date: Sat, 24 Jan 2015 22:43:49 +0000 To: freebsd-net@freebsd.org From: "rstone (Ryan Stone)" Subject: [Differential] [Request, 1, 330 lines] D1640: Refactor network stack state separate from VSI state Message-ID: X-Priority: 3 Thread-Topic: D1640: Refactor network stack state separate from VSI state X-Herald-Rules: none X-Phabricator-To: X-Phabricator-To: X-Phabricator-Cc: Thread-Index: N2JmNDRjOWRkY2RlYmQ2NjRjZDUxYzYxNjBm X-Phabricator-Sent-This-Message: Yes X-Mail-Transport-Agent: MetaMTA X-Auto-Response-Suppress: All X-Phabricator-Mail-Tags: , , , MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18-1 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, 24 Jan 2015 22:43:50 -0000 rstone created this revision. rstone added a reviewer: jfvogel. rstone added a subscriber: freebsd-net. REVISION SUMMARY Currently the ixl driver has a struct ixl_vsi that it uses to track both network stack interface state (e.g. the ifnet) and Virtual Station Interface (VSI) state in the hardware. However, when the ixl driver is acting as a PF device for SR-IOV, we will allocate VSIs for the VFs, but won't have any network stack state for those VSIs in the ixl driver itself (instead the ixlv driver will attach to the VF device, which has its own state independent of the PF driver). Fix this by introducing a new structure, ixl_ifx, which will be used to track network stack state. Refactor both the ixl and ixlv drivers to move their network stack state into this new structure, and retain the ixl_vsi structure to track only information related to details of the VSI allocated from the hw. REVISION DETAIL https://reviews.freebsd.org/D1640 AFFECTED FILES sys/dev/ixl/if_ixl.c sys/dev/ixl/if_ixlv.c sys/dev/ixl/ixl.h sys/dev/ixl/ixl_pf.h sys/dev/ixl/ixl_txrx.c sys/dev/ixl/ixlv.h sys/dev/ixl/ixlvc.c To: rstone, jfvogel Cc: freebsd-net