lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <56D30018.5090208@dev.mellanox.co.il>
Date:	Sun, 28 Feb 2016 16:11:36 +0200
From:	Alaa Hleihel <alaa@....mellanox.co.il>
To:	John Fastabend <john.fastabend@...il.com>, amir@...ai.me,
	jhs@...atatu.com, davem@...emloft.net
Cc:	netdev@...r.kernel.org, jiri@...nulli.us,
	jeffrey.t.kirsher@...el.com
Subject: Re: [net-next PATCH v2 2/8] net: rework setup_tc ndo op to consume
 general tc operand

Hi John,

On 2/16/2016 08:00, John Fastabend wrote:
> @@ -140,9 +141,11 @@ static int mqprio_init(struct Qdisc *sch, struct nlattr *opt)
>  	 * supplied and verified mapping
>  	 */
>  	if (qopt->hw) {
> +		struct tc_to_netdev tc = {.type = TC_SETUP_MQPRIO,
> +					  .tc = qopt->num_tc};
> +
>

Using gcc 4.4.7, the compilation failed on these lines (since that compiler does not support anonymous unions):

  CC [M]  net/sched/sch_mqprio.o
net/sched/sch_mqprio.c: In function ?mqprio_init?:
net/sched/sch_mqprio.c:145: error: unknown field ?tc? specified in initializer
net/sched/sch_mqprio.c:145: warning: missing braces around initializer
net/sched/sch_mqprio.c:145: warning: (near initialization for ?tc.<anonymous>?)
make[2]: *** [net/sched/sch_mqprio.o] Error 1
make[1]: *** [net/sched] Error 2
make: *** [net] Error 2


It can be fixed by surrounding it with braces; something like:

diff --git a/net/sched/sch_mqprio.c b/net/sched/sch_mqprio.c
index f9947d1..9b844f7 100644
--- a/net/sched/sch_mqprio.c
+++ b/net/sched/sch_mqprio.c
@@ -142,7 +142,7 @@ static int mqprio_init(struct Qdisc *sch, struct nlattr *opt)
         */
        if (qopt->hw) {
                struct tc_to_netdev tc = {.type = TC_SETUP_MQPRIO,
-                                         .tc = qopt->num_tc};
+                                        {.tc = qopt->num_tc}};

                priv->hw_owned = 1;
                err = dev->netdev_ops->ndo_setup_tc(dev, sch->handle, 0, &tc);


Would you please fix it ?

Regards,
Alaa

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ