From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1W39Ex-0007FY-IB for mharc-grub-devel@gnu.org; Tue, 14 Jan 2014 14:01:31 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48262) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W39Ep-00072d-RT for grub-devel@gnu.org; Tue, 14 Jan 2014 14:01:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W39Ek-00049v-F7 for grub-devel@gnu.org; Tue, 14 Jan 2014 14:01:23 -0500 Received: from mail-ee0-x232.google.com ([2a00:1450:4013:c00::232]:36486) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W39Ek-00049N-5J for grub-devel@gnu.org; Tue, 14 Jan 2014 14:01:18 -0500 Received: by mail-ee0-f50.google.com with SMTP id d17so417827eek.23 for ; Tue, 14 Jan 2014 11:01:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type; bh=Q84Pe7r7w0E/UaXbWRzgoHOVZkz355vnFtHgDuePydc=; b=uNPqTtAutYt3SeCrM2pnFxifW65Vqy0/Rqn+IDKoN6W67nfS8gdRacJy7GTU/wiSnw cs2m91mh5igWVqoOqiS/YxKBliHQC6WUXgDJUyl+z9aHcXfJlWTKVas0qiVuFjMAfzId nuWlPpiObHpT8fOsu+KqX0q0DtMSkLxuaQlhpP5R9dmFMT6hbnNoUAtY5qxj/+VJdLPD vy5PpdHCtAAi5FIJOWOVHtcdKIUFpnEGrVZHry1iW3979ZZxbCFgafOVUEcs12E1MOOa hk9EzcX3H1QtFktcq3ggpQxaTGJ1i6+waHuoN5aQrDVJT1gjCbWsfEdPtrdITvoFg2oS iNIg== X-Received: by 10.15.45.135 with SMTP id b7mr4192540eew.88.1389726077270; Tue, 14 Jan 2014 11:01:17 -0800 (PST) Received: from [192.168.1.16] (85-188.196-178.cust.bluewin.ch. [178.196.188.85]) by mx.google.com with ESMTPSA id 1sm3992170eeg.4.2014.01.14.11.01.15 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 14 Jan 2014 11:01:15 -0800 (PST) Message-ID: <52D5897A.8020009@gmail.com> Date: Tue, 14 Jan 2014 20:01:14 +0100 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.2.0 MIME-Version: 1.0 To: The development of GNU GRUB Subject: Re: Request a freeze exception for vlantag feature References: <20131223113410.Horde.LfYohJir309SuGYCUmW1mHA@imap.linux.ibm.com> <1387818177.918.31.camel@opensuse.site> <20131226172524.GA8868@beren.lan> <20140108185727.GA15022@beren.br.ibm.com> <20140109070516.668ad4ba@opensuse.site> <20140109165841.GA20105@beren.br.ibm.com> In-Reply-To: <20140109165841.GA20105@beren.br.ibm.com> X-Enigmail-Version: 1.6 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="1awNVIpUCNkbKJ2qEvtqBn90dMS4BwMxf" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4013:c00::232 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jan 2014 19:01:29 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --1awNVIpUCNkbKJ2qEvtqBn90dMS4BwMxf Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 09.01.2014 17:58, Paulo Flabiano Smorigo wrote: > Thu, Jan 09, 2014 at 07:05:16AM +0400, Andrey Borzenkov wrote: >> =D0=92 Wed, 8 Jan 2014 16:57:28 -0200 >> Paulo Flabiano Smorigo =D0=BF=D0=B8=D1=88= =D0=B5=D1=82: >> >>> + >>> + inter->vlantag.pcp =3D vlantag >> 12; >>> + inter->vlantag.dei =3D (vlantag >> 11) & 0x1; >>> + inter->vlantag.vid =3D vlantag & 0x1fff; >> >> That's 13 bits, not 12, right? And this really looks like >> overengeneering - do you really want to be able to set static VLAN >> priority bits? I do not think it belongs to grub. >> >>> + >>> + if (grub_strcmp (args[3], "vlan") =3D=3D 0) >>> + vlan_pos =3D 3; >>> + >>> + if (grub_strcmp (args[4], "vlan") =3D=3D 0) >>> + vlan_pos =3D 4; >> >=20 > You're right, thanks. I fixed: >=20 > diff --git a/grub-core/net/drivers/ieee1275/ofnet.c b/grub-core/net/dri= vers/ieee1275/ofnet.c > index ffcb943..72359c3 100644 > --- a/grub-core/net/drivers/ieee1275/ofnet.c > +++ b/grub-core/net/drivers/ieee1275/ofnet.c > @@ -213,13 +213,12 @@ grub_ieee1275_parse_bootargs (const char *devpath= , char *bootpath, > inter =3D grub_net_add_addr ((*card)->name, *card, &client_addr,= &hw_addr, > flags); > =20 > - inter->vlantag.pcp =3D vlantag >> 12; > - inter->vlantag.dei =3D (vlantag >> 11) & 0x1; > - inter->vlantag.vid =3D vlantag & 0x1fff; > + inter->vlantag.pcp =3D vlantag >> 13; > + inter->vlantag.dei =3D (vlantag >> 12) & 0x1; > + inter->vlantag.vid =3D vlantag & 0xfff; > =20 > grub_net_add_ipv4_local (inter, > __builtin_ctz (~grub_le_to_cpu32 (subnet_mas= k.ipv4))); > - > } > =20 > if (gateway_addr.ipv4 !=3D 0) > diff --git a/grub-core/net/ethernet.c b/grub-core/net/ethernet.c > index ae195bc..7ca14e9 100644 > --- a/grub-core/net/ethernet.c > +++ b/grub-core/net/ethernet.c > @@ -88,8 +88,8 @@ send_ethernet_packet (struct grub_net_network_level_i= nterface *inf, > if (inf->vlantag.vid !=3D 0) > { > grub_uint32_t vlantag; > - vlantag =3D (VLANTAG_IDENTIFIER << 16) + (inf->vlantag.pcp << 12= ) + > - (inf->vlantag.dei << 11) + inf->vlantag.vid; > + vlantag =3D (VLANTAG_IDENTIFIER << 16) | (inf->vlantag.pcp << 13= ) | > + (inf->vlantag.dei << 12) | inf->vlantag.vid; > =20 > /* Move eth type to the right */ > grub_memcpy ((char *) nb->data + etherhdr_size - 2, >=20 >=20 > Virtual lan priority is an option in PowerPC SMS: >=20 > PowerPC Firmware > Version ZM770_024 > SMS 1.7 (c) Copyright IBM Corp. 2000,2008 All rights reserved. > -----------------------------------------------------------------------= -------- > Advanced Setup: BOOTP > Interpartition Logical LAN: U9109.RMD.10F037P-V4-C3-T1 >=20 > 1. Bootp Retries 5 > 2. Bootp Blocksize 512 > 3. TFTP Retries 5 > 4. VLAN Priority 0 > 5. VLAN ID 0 (default - not configured) >=20 >=20 > Maybe we can use the priority and DEI of incoming package as the values= for the > following packages. What do you think? >=20 What's the advantage to setting it at all? We don't do any QOS. >> May be it should really start using proper options at this point >> keeping existing three argument form as legacy. >> >> net_add_addr --if=3D... --addr=3D... --mask=3D... --vlan=3D... --hw=3D= =2E.. card >=20 > I prefer the current format but we can switch to another if it's more s= uitable. >=20 We can go eiher with options or syntax like [vlan ]. The only realy requirement is extendability, we should be able to add new options easily. The big advantage of option is code reuse from extcmd which ensures that it's similar handling with other options and less risk of bu= gs. > Andrey, ping me in IRC so we can talk about it. >=20 >> >> _______________________________________________ >> Grub-devel mailing list >> Grub-devel@gnu.org >> https://lists.gnu.org/mailman/listinfo/grub-devel >=20 > I ask this patch as a freeze exception. This feature will only add a op= tion for > vlan tag and will not change the default grub workflow. Can I push the = current > version in master so it can be included in 2.02? Anyone against? >=20 > Thanks! >=20 > -- > Paulo Flabiano Smorigo > IBM Linux Technology Center >=20 >=20 > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel >=20 --1awNVIpUCNkbKJ2qEvtqBn90dMS4BwMxf Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Using GnuPG with Icedove - http://www.enigmail.net/ iF4EAREKAAYFAlLViXoACgkQmBXlbbo5nOugQgEAgQ1WSB/AVjEtyw1K1kptY5SD b6hAIBK3Y9Mp4DK6moYBAKn7ZD5idrq9fBksd8hc6R+c4SfU6LQADpV30h0+aQdF =RpPE -----END PGP SIGNATURE----- --1awNVIpUCNkbKJ2qEvtqBn90dMS4BwMxf--