From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2C28143746; Tue, 19 Dec 2023 17:58:47 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1337242E11; Tue, 19 Dec 2023 17:58:47 +0100 (CET) Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) by mails.dpdk.org (Postfix) with ESMTP id 1EBDD42DED for ; Tue, 19 Dec 2023 17:58:46 +0100 (CET) Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-40c2db2ee28so60167395e9.2 for ; Tue, 19 Dec 2023 08:58:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pantheon.tech; s=google; t=1703005126; x=1703609926; darn=dpdk.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Qqf+ZvD8FePKagsIK1oBdLaOAVsKWM00XudutMUCv+g=; b=qw/0EoVyzHuPAic8DwtqmBj7SVH1qV4WWCYsnD7qksRX8NAQIkBIQArWQlXBLhy1sZ KCgl7Z/AHJrRhe/9jY9B8ypir1m62ywwUWf8WFwkwKZWYcFeku6C9TMh49/j/vna+BcU F7TRLZqKD2jYs+w6H3EfBAM799zrCGaFOKDcVXYGVFMZoSjXJuTUuMEnx8dYgfCaKX4n 1Wnox6wr98BMcHNfuslbs7sfzVUaLYPxezsRhfOxheM8HnyYpwQw8K1YH6Zf/0zP0XlG 77MNfzkwD8M2t42dQ3gL8D3qe0V4U+uuu+g8hfeC7ewP0bcqDOBjzCe8W48TPz4pqLn4 6fjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703005126; x=1703609926; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Qqf+ZvD8FePKagsIK1oBdLaOAVsKWM00XudutMUCv+g=; b=VWvh6hoZqAymG59KcGZG0EEA/cqkL+neQAYXREXP443zyG8LopICmJB+ZCUhT1fYu2 lglZnpV2Doo9uKIAGaNDZsXTthhzrqdHlqnYPrN8SsNK5fAkdgPq51A4lcD3MG7cOj9b Kb8Rd4/IKZIyBT8YmenmzFXIsVDC44aSQxD+BxO7zwMAsuksq8ShD7Kp/GZec0A2szbP i/plCoB/SKnt4qFmiw8krBDphZAVXhN9Rfqa5gFLhRuhN6lVDCYXHoknmhTKnBaxpX82 C/Zvb031wT6m6/Wnv84madxewpwhG0R9hnjItCiFa1S/6mRzhwQyXIOLBraYjft8QXry rPMQ== X-Gm-Message-State: AOJu0Yy2tu+mOa2S5VezyobEG2TgXOSvW+m8G3qAZ8pk6or4PCY+GduU p3X7JdKB+dwu4N3NFnRqalKTo70dS2VWuhn2+MxNPQ== X-Google-Smtp-Source: AGHT+IG83NPTbzIUpp56NzdB2PgvhsIZgiTX0n4ly94xY+jlGOY34YrQ/0TI1X8RluIM9ifG/A2FjfXqd939j/XekDY= X-Received: by 2002:a05:600c:6997:b0:40b:5e59:ccb9 with SMTP id fp23-20020a05600c699700b0040b5e59ccb9mr10646049wmb.154.1703005125690; Tue, 19 Dec 2023 08:58:45 -0800 (PST) MIME-Version: 1.0 References: <20231218181221.10057-1-jspewock@iol.unh.edu> <20231218181221.10057-6-jspewock@iol.unh.edu> In-Reply-To: <20231218181221.10057-6-jspewock@iol.unh.edu> From: =?UTF-8?Q?Juraj_Linke=C5=A1?= Date: Tue, 19 Dec 2023 17:58:34 +0100 Message-ID: Subject: Re: [PATCH v4 5/7] dts: allow configuring MTU of ports To: jspewock@iol.unh.edu Cc: Honnappa.Nagarahalli@arm.com, thomas@monjalon.net, wathsala.vithanage@arm.com, probb@iol.unh.edu, paul.szczepanek@arm.com, yoan.picchi@foss.arm.com, ferruh.yigit@amd.com, andrew.rybchenko@oktetlabs.ru, dev@dpdk.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Mon, Dec 18, 2023 at 7:13=E2=80=AFPM wrote: > > From: Jeremy Spewock > > Adds methods in both os_session and linux session to allow for setting > MTU of port interfaces in an OS agnostic way. > The previous two commit messages had a little bit of an explanation, but this one is missing one. Something like why a test case/suite needs to set the MTU. > Signed-off-by: Jeremy Spewock > --- > dts/framework/remote_session/linux_session.py | 8 ++++++++ > dts/framework/remote_session/os_session.py | 9 +++++++++ > 2 files changed, 17 insertions(+) > > diff --git a/dts/framework/remote_session/linux_session.py b/dts/framewor= k/remote_session/linux_session.py > index fd877fbfae..aaa4d57a36 100644 > --- a/dts/framework/remote_session/linux_session.py > +++ b/dts/framework/remote_session/linux_session.py > @@ -177,6 +177,14 @@ def configure_port_ip_address( > verify=3DTrue, > ) > > + def configure_port_mtu(self, mtu: int, port: Port) -> None: > + """Overrides :meth:`~.os_session.OSSession.configure_port_mtu`."= "" > + self.send_command( > + f"ip link set dev {port.logical_name} mtu {mtu}", > + privileged=3DTrue, > + verify=3DTrue, > + ) > + > def configure_ipv4_forwarding(self, enable: bool) -> None: > state =3D 1 if enable else 0 > self.send_command(f"sysctl -w net.ipv4.ip_forward=3D{state}", pr= ivileged=3DTrue) > diff --git a/dts/framework/remote_session/os_session.py b/dts/framework/r= emote_session/os_session.py > index 8a709eac1c..cd073f5774 100644 > --- a/dts/framework/remote_session/os_session.py > +++ b/dts/framework/remote_session/os_session.py > @@ -277,6 +277,15 @@ def configure_port_ip_address( > Configure (add or delete) an IP address of the input port. > """ > > + @abstractmethod > + def configure_port_mtu(self, mtu: int, port: Port) -> None: > + """Configure `mtu` on `port`. > + > + Args: > + mtu: Desired MTU value. > + port: Port to set `mtu` on. > + """ > + > @abstractmethod > def configure_ipv4_forwarding(self, enable: bool) -> None: > """ > -- > 2.43.0 >