[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <36e9b554-96d1-641f-d521-245dc8a7463f@iogearbox.net>
Date: Fri, 24 May 2024 16:30:30 +0200
From: Daniel Borkmann <daniel@...earbox.net>
To: Nikolay Aleksandrov <razor@...ckwall.org>, martin.lau@...nel.org
Cc: bpf@...r.kernel.org, netdev@...r.kernel.org, Joe Stringer <joe@...ium.io>
Subject: Re: [PATCH bpf 3/5] netkit: Fix syncing peer device mtu with primary
On 5/24/24 4:20 PM, Daniel Borkmann wrote:
> On 5/24/24 4:15 PM, Nikolay Aleksandrov wrote:
>> On 5/24/24 16:01, Daniel Borkmann wrote:
>>> Implement the ndo_change_mtu callback in netkit in order to align the MTU
>>> to the primary device. This is needed in order to sync MTUs to the latter
>>> from the control plane (e.g. Cilium) which does not have access into the
>>> Pod's netns.
>>>
>>> Fixes: 35dfaad7188c ("netkit, bpf: Add bpf programmable net device")
>>> Signed-off-by: Daniel Borkmann <daniel@...earbox.net>
>>> Cc: Joe Stringer <joe@...ium.io>
>>> ---
>>> drivers/net/netkit.c | 20 ++++++++++++++++++++
>>> 1 file changed, 20 insertions(+)
>>>
>>
>> This one has unexpected behaviour IMO. If the app sets the MTU and we
>> silently overwrite, then it may continue working and thinking the MTU
>> was changed leading to unexpected problems. I think it'd be better to
>> keep the MTU synced explicitly (e.g. when set on main device, then
>> set it on peer as well) and error out when trying to set it without
>> the proper capabilities.
>
> Makes sense, I'll look into this, thanks Nik!
I'll drop this one for now, and have a future extension on nk device
creation to lock such attributes or not so its flexible.
Thanks,
Daniel
Powered by blists - more mailing lists