From patchwork Wed Apr 21 18:10:21 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wright X-Patchwork-Id: 50668 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 7A808B7D0B for ; Thu, 22 Apr 2010 04:10:56 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754323Ab0DUSKe (ORCPT ); Wed, 21 Apr 2010 14:10:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45712 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754062Ab0DUSKc (ORCPT ); Wed, 21 Apr 2010 14:10:32 -0400 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o3LIANe9009702 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 21 Apr 2010 14:10:23 -0400 Received: from x200.localdomain (vpn-237-208.phx2.redhat.com [10.3.237.208]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id o3LIALan016794; Wed, 21 Apr 2010 14:10:22 -0400 Date: Wed, 21 Apr 2010 11:10:21 -0700 From: Chris Wright To: Arnd Bergmann Cc: Chris Wright , Scott Feldman , davem@davemloft.net, netdev@vger.kernel.org Subject: Re: [net-next,1/2] add iovnl netlink support Message-ID: <20100421181021.GC25928@x200.localdomain> References: <201004211326.00974.arnd@arndb.de> <20100421161842.GB25928@x200.localdomain> <201004211952.29145.arnd@arndb.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <201004211952.29145.arnd@arndb.de> User-Agent: Mutt/1.5.20 (2009-08-17) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.16 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org * Arnd Bergmann (arnd@arndb.de) wrote: > On Wednesday 21 April 2010, Chris Wright wrote: > > * Arnd Bergmann (arnd@arndb.de) wrote: > > > Since it seems what you really want to do is to do the exchange with the > > > switch from here, maybe the hardware configuration part should be moved > > > the DCB interface? > > > > I suppose this would work (although it's a bit odd being out of scope > > of DCB spec). > > It could be anywhere, it doesn't have to be the DCB interface, but could > be anything ranging from ethtool to iplink I guess. And we should define > it in a way that works for any SR-IOV card, whether it's using Cisco's > protocol in firmware, 802.1Qbg VDP in firmware, lldpad to do VDP or > none of the above and just provides an internal switch like all the > existing NICs. Heh, that's exactly what iovnl does ;-) > > I don't expect mgmt app to care about the implementation > > specifics of an adapter, so it will always send this and iovnl message > > too. All as part of same setup. > > Why? I really see these things as separate. Obviously a management > tool like libvirt would need to do both these things eventually, but > each of them has multiple options that can be combined in various > ways: > > 1. Setting up the slave device > a) create an SR-IOV VF to assign to a guest > b) create a macvtap device to pass to qemu or vhost > c) attach a tap device to a bridge > d) create a macvlan device and put it into a container > e) create a virtual interface for a VMDq adapter OK, but iovnl isn't doing this. > 2) Registering the slave with the switch > a) use Cisco protocol in enic firmware (see patch 2/2) > b) use standard VDP in lldpad > c) use reverse-engineered cisco protocol in some user tool for > non-enic adapters. > d) use standard VDP in firmware (hopefully this never happens) > e) do nothing at all (as we do today) And this is the step that is the main purpose of iovnl. Here's the simplest snippet of libvirt to show this. It sends set_port_profile netlink messages and then creates macvtap. As simple as it gets... the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -1470,6 +1470,11 @@ qemudPhysIfaceConnect(virConnectPtr conn, net->model && STREQ(net->model, "virtio")) vnet_hdr = 1; + setPortProfileId(net->data.direct.linkdev, + net->data.direct.mode, + net->data.direct.profileid, + net->mac); + rc = openMacvtapTap(net->ifname, net->mac, linkdev, brmode, &res_ifname, vnet_hdr); -- To unsubscribe from this list: send the line "unsubscribe netdev" in