From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3A89623372C for ; Thu, 27 Nov 2025 08:24:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764231862; cv=none; b=n4IfVNIrwkhhF1MDr7wjScNEmescFg/Nwe4JapVPzNVKcI8KwMZgGnF475LLNUYg2M1ilqMz5ebPWOlzaMkjt0KsldxMITvrWS9GlhIKMMDwBAsioVtxH5Iq3ZiB9Xwn3IjABuAIMRn898OjLLVRP2I+ue+9QQ7AaTkR17MrIH4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764231862; c=relaxed/simple; bh=dnQSLqfX0zGavAQraHWIWlX32/F12Xpr0C/EiVk4nsw=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=uqCf/oA6tG8ENH5b8K0CVLB+DGQ7rV+JaOxdbRTtZFP7uvBsMkg6Ooz1u2QhAvGPINfxk+jmRIDmACell77SKrcldaALLqZOFdOpCZhkf/8EONjLUrFtFlpyffpWLyt3F7mm9/bcIEFXq/xUUlTqFe0fOgu9Qmk2ktt6n/HVNBc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=MpIEBJUg; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=luWlKylI; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="MpIEBJUg"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="luWlKylI" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1764231860; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oh9tIL6xVGFoq0wzCwtNFdsSlYysZSo3HuXen4Lsmus=; b=MpIEBJUgKfQD2DI2xYJD2RWHV7z6y5Emfmxq4J95IgsDanjA0uBZWOOybVzrSFJznEStRk n7PB60b2r5HaROKDAMY64RAdCCmyhWbq24oQmPf+qudX/NqTep5E39R4GoE8ywAs4L14u1 rS4az/PXmplA0PhmXZ3il5OY1zsS4iM= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-596-SjrMeiVfOpOcOERWiLc33w-1; Thu, 27 Nov 2025 03:24:18 -0500 X-MC-Unique: SjrMeiVfOpOcOERWiLc33w-1 X-Mimecast-MFC-AGG-ID: SjrMeiVfOpOcOERWiLc33w_1764231857 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-429cceeeb96so367359f8f.1 for ; Thu, 27 Nov 2025 00:24:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1764231857; x=1764836657; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=oh9tIL6xVGFoq0wzCwtNFdsSlYysZSo3HuXen4Lsmus=; b=luWlKylI9WKW20ZhASOshpvYV2cKLc8t1JeULR9wQI5CUiECbdudj7w4V7k1DjeaEC tFhar3iIcPCxIRD7Ny2MYWsirPqw6xIK3o6OlWMOjAxogCeCLH8Nl/MEh7dBJuAXS5U/ ywwDitcAP2kncJhMUWTi8BdSNxW1EISNmEnHhj08pUXr3IZ/w5d8s3WpK69t9x0f3fwi yE7blrcgiQRDqStGFr/TRS0laSWAJrDn1xz+CPF4UIorI6nBObQ3FWQgFnvuvrJNplRo H27yiN6ObtNqUDyPtvXfzRUNLatk4+/8M6GVmGAbj+U+IYsFVLNcyD+0/3bu4xUo5sed oS6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764231857; x=1764836657; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=oh9tIL6xVGFoq0wzCwtNFdsSlYysZSo3HuXen4Lsmus=; b=vFwVTmFhM/XIT8xpoaIaYUJd0Y6gBHNzEBh1XdayGfmDywC8+bQIj3hA17BT08svJr a6G/fxePHBEOHoTykdbhKX04pbhW3221E/QfYvxzyRFFwhoL9kEHChF7cfC9yBEGkqlE 9zXv6LPdFR+q7fNWgJHI33f1EisDOWaMEGtM72zKCVcyLYoriJg7fVAwlGfSr6gba62y qAMqbpQ15woEKomLK5dDo6ZBXLFQAGGeipx4UIYH4oviv2xIbRL4Ez1TMUHU30wQ90q5 lQ3j5Y2kSaxRvZ38a1iIUCSlW3T0wiWhxm5GuMeZGPF19eda0bGQcwWy0A55+w3tfOWk t+zw== X-Forwarded-Encrypted: i=1; AJvYcCWofPpwmbNTbM3pjb0N1wT99GwpKNVf0r3eTRrEceJ4h0JHW/BTHHqrqJz6IMvrPezbeAhCaxCBPDb/hnI=@vger.kernel.org X-Gm-Message-State: AOJu0Yy7YahdZlsfHN150hRGV877v1H4MHXMp1ZnOBmEbT9KRbm3o44D 9F/WzKr1mznLPkJEwu6qgoyGHU40tNAKgoGk4kakDQmrSxYub3XFxMP5GZR2WxORKdwt/iH46OF UU7TV71BwzLAag/6jh8SSD9V6GQ7GaknuyBi1zeb8l7dIdzu4eMAwKlj/4RQREOUJMg== X-Gm-Gg: ASbGncu0susVThKlk6upRl6l7CwKS1WFP7OtNsXj5Z4ne3OsFH6E1uSKjKdjjkDriqD afaAIk7ThEtN3kbGr6AoOYphUk2iBPoDneneKUp84HcOHvKGLW9aCm4E2VM3YJzusA/qPsEizdG TVz7vNxkMf/jyK4ysUkdkgt6hPnceKiO4R0d1bUAjiw9O71bZonYPOlTXSZ2BUHAA8QmebG7LyU 9O0eLB2mUbhpFWpO5U0iaO8zgzHXL8axMvyvxydOxKrdJsN2vhnro4KElNLtLY6OnvdDO3LYai3 g/Cj1Wx8EmS+FrqdQ/DkS90miQ95+pLzupJjfMnQzzqIpOx5VDex3fcjp8hAMqhyRMWiv3WhOix CNyJj5bDqVTxhsA== X-Received: by 2002:a05:6000:601:b0:42b:4219:269 with SMTP id ffacd0b85a97d-42cc1d0cf4amr22389280f8f.41.1764231856891; Thu, 27 Nov 2025 00:24:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IGAOizx0rWwPYosIKVqg+o1AjQe2dAxiQeCyuhdEDI/AZ/ORHXtIrnYoAB5FiiWxhXFn0qHKA== X-Received: by 2002:a05:6000:601:b0:42b:4219:269 with SMTP id ffacd0b85a97d-42cc1d0cf4amr22389246f8f.41.1764231856484; Thu, 27 Nov 2025 00:24:16 -0800 (PST) Received: from [192.168.88.32] ([212.105.155.212]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-42e1ca1a6fesm2280190f8f.20.2025.11.27.00.24.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 27 Nov 2025 00:24:16 -0800 (PST) Message-ID: <8e3dc2e5-cf5f-483a-9119-8b1ac958e425@redhat.com> Date: Thu, 27 Nov 2025 09:24:14 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net-next 01/12] ipvlan: Support MACNAT mode To: Dmitry Skorodumov , netdev@vger.kernel.org, Simon Horman , Kuniyuki Iwashima , Jakub Kicinski , Xiao Liang , Guillaume Nault , Eric Dumazet , Julian Vetter , Stanislav Fomichev , Etienne Champetier , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: andrey.bokhanko@huawei.com, "David S. Miller" , Jonathan Corbet , Andrew Lunn References: <20251120174949.3827500-1-skorodumov.dmitry@huawei.com> <20251120174949.3827500-2-skorodumov.dmitry@huawei.com> <3d5ef6e5-cfcc-4994-a8d2-857821b79ed8@redhat.com> <25e65682-9df4-4257-94cd-be97f0a49867@huawei.com> Content-Language: en-US From: Paolo Abeni In-Reply-To: <25e65682-9df4-4257-94cd-be97f0a49867@huawei.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 11/27/25 9:13 AM, Dmitry Skorodumov wrote: > On 25.11.2025 15:58, Paolo Abeni wrote: >> On 11/20/25 6:49 PM, Dmitry Skorodumov wrote: >>> @@ -597,6 +690,9 @@ int ipvlan_link_new(struct net_device *dev, struct rtnl_newlink_params *params, >>> port = ipvlan_port_get_rtnl(phy_dev); >>> ipvlan->port = port; >>> >>> + if (data && data[IFLA_IPVLAN_FLAGS]) >>> + port->flags = nla_get_u16(data[IFLA_IPVLAN_FLAGS]); >> This looks like a change of behavior that could potentially break the >> user-space. >> Hm... What am I missing? The intention was to know "mode" a bit earlier > and generate MAC as random for macnat-mode.. it's supposed to be just > a simple line move a bit upper in the code I misread the code, and I wrongly thought that the new location was before `port->flags` initialization, but it's not the case. The comment removal did not help. Please preserve the comment above the relevant statement/assignment. Thanks, Paolo