Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp71585pxk; Wed, 16 Sep 2020 19:16:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyO09SKvpGSh2iLFbV8TyVrapxvzFi0Ss3o5bXKr2s9QFFgjLJgt8EjkqhoG+JbERz0YwZO X-Received: by 2002:a05:6402:326:: with SMTP id q6mr30702887edw.216.1600308977290; Wed, 16 Sep 2020 19:16:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600308977; cv=none; d=google.com; s=arc-20160816; b=IY3pVW6YddA9csGW4tb8LT1B1wTWumeQuj+mziwUqGQXUTq5OaVMTeEnM/BUkAKyM9 9bm5WOiKOHTQRQdLyxDVv0OPghurQe38ARwv5SJWs04iE1B+ivRHIWdd0wzfDMRJKSgT NIlrkWLCQZOieixWhFBU3tzlFVWnpRZsAkUmbI1yW1+M9OT9jwAe+RfdJ+KE03DLI+4r u4zyZ17lMYEnvDDOrxis8nJlgunYjGrjV8a4xyfKNg3jmZiybUoiI8GkoZVFoknK/AN9 fkob3Xeb7U43Pvxoi0I5r62rxHuMb9aNnzIrdkYW9Ij3hYE3Uf+aokRGuV9Q9eMmC0Ge i9Bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=WNufRfbCO6sLW0ldwiFSOylPxDRpSQPmUAmy5fJFdjg=; b=LIsQdr2bbKDZ9GIn3jnbSUCUHl72suWAOKMEJ5wukZdeS2Sqdw9P34FHJyJjhhx6ki xgBbHLHZDNuUWPC1+ASnKB+2Y1ISgXcgW0xE4zHusZrbNvOIpnj/yR7Cb1Pu0NZ4DY+P /Knu/yjl4KU0xIb837fyMftCSPoAamMScwBCyVC4fI62pmF4M0IB9Yj88RQmJ1Clq4uw MA8mTWMoC+5XNrf8+T4oepp88c83e+8rbJLfbikTTQkUBCkHXhmUPmMVoSBIhnC+/p12 YQSJcXS4OupiBFc97ZBjv9Gnn9KWwC06/rSAqCoHzWjhw0mi20p3t2hS/FnaAuvJnR7K QKeg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v5si13958382edx.502.2020.09.16.19.15.54; Wed, 16 Sep 2020 19:16:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726210AbgIQCNd (ORCPT + 99 others); Wed, 16 Sep 2020 22:13:33 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:39818 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726170AbgIQCNL (ORCPT ); Wed, 16 Sep 2020 22:13:11 -0400 X-Greylist: delayed 1869 seconds by postgrey-1.27 at vger.kernel.org; Wed, 16 Sep 2020 22:13:10 EDT Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1kIivn-00F0Td-D2; Thu, 17 Sep 2020 03:41:51 +0200 Date: Thu, 17 Sep 2020 03:41:51 +0200 From: Andrew Lunn To: Michal Kubecek Cc: David Miller , Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net] ethtool: add and use message type for tunnel info reply Message-ID: <20200917014151.GK3463198@lunn.ch> References: <20200916230410.34FCE6074F@lion.mk-sys.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200916230410.34FCE6074F@lion.mk-sys.cz> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 17, 2020 at 01:04:10AM +0200, Michal Kubecek wrote: > Tunnel offload info code uses ETHTOOL_MSG_TUNNEL_INFO_GET message type (cmd > field in genetlink header) for replies to tunnel info netlink request, i.e. > the same value as the request have. This is a problem because we are using > two separate enums for userspace to kernel and kernel to userspace message > types so that this ETHTOOL_MSG_TUNNEL_INFO_GET (28) collides with > ETHTOOL_MSG_CABLE_TEST_TDR_NTF which is what message type 28 means for > kernel to userspace messages. > > rskb = ethnl_reply_init(reply_len, req_info.dev, > - ETHTOOL_MSG_TUNNEL_INFO_GET, > + ETHTOOL_MSG_TUNNEL_INFO_GET_REPLY, > ETHTOOL_A_TUNNEL_INFO_HEADER, > info, &reply_payload); Michal Maybe it would make sense to change the two enums from anonymous to tagged. We can then make ethnl_reply_init() do type checking and hopefully catch such problems earlier? I just wonder if we then run into ABI problems? Andrew