From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932461AbcI1NCP (ORCPT ); Wed, 28 Sep 2016 09:02:15 -0400 Received: from mail-pa0-f66.google.com ([209.85.220.66]:36263 "EHLO mail-pa0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932338AbcI1NCO (ORCPT ); Wed, 28 Sep 2016 09:02:14 -0400 Message-ID: <1475067731.28155.92.camel@edumazet-glaptop3.roam.corp.google.com> Subject: Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets From: Eric Dumazet To: Cyrill Gorcunov Cc: Jamal Hadi Salim , David Ahern , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, David Miller , kuznet@ms2.inr.ac.ru, jmorris@namei.org, yoshfuji@linux-ipv6.org, kaber@trash.net, avagin@openvz.org, stephen@networkplumber.org Date: Wed, 28 Sep 2016 06:02:11 -0700 In-Reply-To: <1475067432.28155.90.camel@edumazet-glaptop3.roam.corp.google.com> References: <20160928090357.GT1876@uranus.lan> <20160928101726.GU1876@uranus.lan> <8293413c-a81d-f7ff-24f0-8f58ce877116@mojatatu.com> <20160928105147.GV1876@uranus.lan> <484dedaf-4e81-9a5a-ffb8-2c65b373c3a0@mojatatu.com> <20160928112703.GW1876@uranus.lan> <1475067432.28155.90.camel@edumazet-glaptop3.roam.corp.google.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2016-09-28 at 05:57 -0700, Eric Dumazet wrote: > Note that some programs could fail to compile with the added union > anyway. > > Some gcc versions are unable to compile a static init with an union > > struct inet_diag_req_v2 foo = { .pad = 0, sdiag_family = AF_INET, }; > > When I cooked my recent fq commit I simply removed a pad and replaced > it : > > git show fefa569a9d4bc4 -- include This is a bit different of course, since struct tc_fq_qd_stats is only one way : Kernel produces the content and gives it to user space. User space should probably not need to initialize such a structure, but who knows what a programmer can write ;)