Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3621067ybz; Mon, 4 May 2020 06:37:38 -0700 (PDT) X-Google-Smtp-Source: APiQypJvkAMgzkCEXCTNJg3IEvrJTGfCXhGdnBfr3f6ve3fB+NRHiLBwl7c8I5zzyrHgfROBjWhw X-Received: by 2002:a17:906:3f45:: with SMTP id f5mr15185561ejj.18.1588599457818; Mon, 04 May 2020 06:37:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588599457; cv=none; d=google.com; s=arc-20160816; b=0iHIModDzuObuRutJL3KzNb45VAOI60xfAVD9FaRS5h85FrknTxttSHLU2Acy8bfyR Pkh5pcb66LGzjtirI5uWgwD8vM9GIfCvMyYrfW4eDdM+HJ3gazOOX8iCjAru2i8dpc6t oHxpwporujmMpU7HYjnwOd2a9440348NsaxpyS5yRrL1eJztAdS+pIWiaxSanv3IQykA ZF9nLBxZquKpWvLvYqSzm6c2+YDF3Ue8IctPYGTfOMqTncgo6WbjI1lNYuBWOgcXX8AD meePsFCWeScnwd/iP4ciCpknxn27exMtyEx8tLsg83mtrRRWMpvGqfnZBuybpZKIow0a D8bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=+S08aQwZO3PyhRXH+hhsyu7F3Z3H5wQfY7gddYk5MsA=; b=HT23yk4oytvz+X+trwNkRgBoZSBrZNmRB/iHzTKQ76qt3iDbR30LUV+Ech66rkM4vz gPNnhdYYhwTZwibefst1r6zIFJOJ6HUs1bbux6rZKnCwS1p9pBDsOhg8AmF5+NR3LhAe Tu7ckaNa78Q+gwpjhpEsZsAoU50UbA44lc4IydL1LMg97hTG2JW9gdVTdU0KglMqeOv3 dzN5N83FbCjbCcJHW/UA8xIH56S9DJrYeQS1LC5wtrfXlzfBMifzNUUXoVVQNwwaO8Wn p648lOukZwwA+NggnP6cgqHU28NIur4E/Pp45x5jtTgQKWDO7qKU2sZhFRVtnkQgXpPr b5Gw== 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 z13si7148501eju.18.2020.05.04.06.37.13; Mon, 04 May 2020 06:37:37 -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 S1728185AbgEDNfi (ORCPT + 99 others); Mon, 4 May 2020 09:35:38 -0400 Received: from mx2.suse.de ([195.135.220.15]:34982 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726913AbgEDNfi (ORCPT ); Mon, 4 May 2020 09:35:38 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 3AA7AAD2C; Mon, 4 May 2020 13:35:38 +0000 (UTC) Received: by lion.mk-sys.cz (Postfix, from userid 1000) id AFC15604EE; Mon, 4 May 2020 15:35:35 +0200 (CEST) Date: Mon, 4 May 2020 15:35:35 +0200 From: Michal Kubecek To: Oleksij Rempel Cc: Marek Vasut , Andrew Lunn , Florian Fainelli , Jonathan Corbet , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Russell King , mkl@pengutronix.de, kernel@pengutronix.de, David Jander , Jakub Kicinski , Christian Herber , "David S. Miller" , Heiner Kallweit Subject: Re: [PATCH v5 1/2] ethtool: provide UAPI for PHY master/slave configuration. Message-ID: <20200504133535.GC8237@lion.mk-sys.cz> References: <20200504071214.5890-1-o.rempel@pengutronix.de> <20200504071214.5890-2-o.rempel@pengutronix.de> <20200504080417.i3d2jsjjpu2zjk4z@pengutronix.de> <20200504083734.GA5989@lion.mk-sys.cz> <20200504085556.rzkvn47q2k5iqyap@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200504085556.rzkvn47q2k5iqyap@pengutronix.de> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 04, 2020 at 10:55:56AM +0200, Oleksij Rempel wrote: > On Mon, May 04, 2020 at 10:37:34AM +0200, Michal Kubecek wrote: > > On Mon, May 04, 2020 at 10:04:17AM +0200, Oleksij Rempel wrote: > > > @Michal, > > > > > > i noticed that linkmodes_fill_reply() some times get not enough > > > tailroom. > > > if data->peer_empty == 0 > > > linkmodes_reply_size() size: 476 > > > linkmodes_fill_reply() skb tailroom: 724 > > > > > > > > > if data->peer_empty == 1 > > > linkmodes_reply_size() size: 216 > > > linkmodes_fill_reply() skb tailroom: 212 > > > > > > In the last case i won't be able to attach master_lave state and cfg > > > fields. > > > > > > It looks like this issue was not introduced by my patches. May be you > > > have idea, what is missing? > > > > It's my mistake, I'm just not sure why I never ran into this while > > testing. Please try the patch below. > > thx! it works now: > [ 82.754019] linkmodes_reply_size:103 size: 216 > [ 82.758523] linkmodes_fill_reply:117 skb tailroom: 724 > > [ 126.781892] linkmodes_reply_size:103 size: 476 > [ 126.786464] linkmodes_fill_reply:117 skb tailroom: 724 Thank you. It seems so far the natural skb padding was always sufficient to hide the broken calculation. Some time ago I had a debugging printk in place which checked calculated an actual size but that was with an older version of the series and the code has been rewritten few times before it reached mainline. I'll run some tests with additional tracing of estimated and actual message size and if I don't find other problem, I'll submit the fix. Michal