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 952F4A034F; Fri, 8 Oct 2021 12:57:55 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ECB7C411AB; Fri, 8 Oct 2021 12:56:21 +0200 (CEST) Received: from mail-pj1-f42.google.com (mail-pj1-f42.google.com [209.85.216.42]) by mails.dpdk.org (Postfix) with ESMTP id 32237411E0 for ; Thu, 7 Oct 2021 20:45:11 +0200 (CEST) Received: by mail-pj1-f42.google.com with SMTP id qe4-20020a17090b4f8400b0019f663cfcd1so7616324pjb.1 for ; Thu, 07 Oct 2021 11:45:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oneconvergence.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=H3NgidgZiTNIp4uF0DKOoDIN3xC1hgUaGOceJB03YXQ=; b=PFjv2Ss8qhVejO+RKTbitlCbQ9ngA6i0TEX2kzxCKeTtDPHabwhvCY2qGcBpdxjUhg 9DS91z7JdDJJr4YLbjCsD1+7S0nHhJ5PIdcIbieqKCgcNJVtqEP5ZwXQ9rybAi1wUTS9 8py7F1lxC6Th/NF5zShecBOtJW9w9kYU0dlvg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=H3NgidgZiTNIp4uF0DKOoDIN3xC1hgUaGOceJB03YXQ=; b=6d21yP+YGwhiIT6M6h1r8nXDU0QP6oDS3ADoCP/V0wkNDtR9scCWppDRdG9k7xcHm9 YJ+5BXXeXofN6Ew6w3CyhNlOfkWthCDSwhts7xuxziMK0oY6/F9prm2sTUMyWmMz0+yF v2+0PGAfF9oxxaNCdn7E9uoem13UUgor1ot8++ZTpeTMkRIuZCjrcz+wlkRTV6Niu6G/ Z2bxYkExqQ3SHHpDPcx7hwiBM3OY9Dez+vUVQbur/d47fiNKL3QPXrW+cLO7wGcH/hBr PCwRs9XwzSEX+ZZCRz4Go0KUDdHH5dXdE47W1n54z2s3xHCIIwwZvT9XYDOeuX4MoDgS tNXg== X-Gm-Message-State: AOAM532Eoa+Qabx4/qZRIXC8lpQRg7evhux6B3u1ENEwP7FDuqG/VNxA EUqI9BV5/euvZ7JrFodGigxFIQ== X-Google-Smtp-Source: ABdhPJz0TcEOAS1xrJdeA4m2cou7zmS+6B10tWcec2Fk6iAuJUpAxixvdoOd1XX2IY45WcbjugC4MA== X-Received: by 2002:a17:902:da8f:b0:13e:fcb9:2371 with SMTP id j15-20020a170902da8f00b0013efcb92371mr5303177plx.72.1633632310329; Thu, 07 Oct 2021 11:45:10 -0700 (PDT) Received: from srikanth-ThinkPad-T450.domain.name ([136.185.113.102]) by smtp.gmail.com with ESMTPSA id c11sm3311586pji.38.2021.10.07.11.45.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Oct 2021 11:45:09 -0700 (PDT) From: Srikanth Kaka To: Matan Azrad , Viacheslav Ovsiienko Cc: dev@dpdk.org, Vag Singh , Anand Thulasiram , Srikanth Kaka Date: Fri, 8 Oct 2021 00:13:30 +0530 Message-Id: <20211007184350.73858-22-srikanth.k@oneconvergence.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211007184350.73858-1-srikanth.k@oneconvergence.com> References: <20211007184350.73858-1-srikanth.k@oneconvergence.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Fri, 08 Oct 2021 12:55:54 +0200 Subject: [dpdk-dev] [PATCH v2 21/41] net/mlx5: add set MTU routine 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 Sender: "dev" using IOCTL call MTU is set Signed-off-by: Srikanth Kaka Signed-off-by: Vag Singh Signed-off-by: Anand Thulasiram --- drivers/net/mlx5/freebsd/mlx5_ethdev_os.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/drivers/net/mlx5/freebsd/mlx5_ethdev_os.c b/drivers/net/mlx5/freebsd/mlx5_ethdev_os.c index b470c4ddec..10069302bb 100644 --- a/drivers/net/mlx5/freebsd/mlx5_ethdev_os.c +++ b/drivers/net/mlx5/freebsd/mlx5_ethdev_os.c @@ -119,6 +119,25 @@ mlx5_get_mtu(struct rte_eth_dev *dev, uint16_t *mtu) return 0; } +/** + * Set device MTU. + * + * @param dev + * Pointer to Ethernet device. + * @param mtu + * MTU value to set. + * + * @return + * 0 on success, a negative errno value otherwise and rte_errno is set. + */ +int +mlx5_set_mtu(struct rte_eth_dev *dev, uint16_t mtu) +{ + struct ifreq request = { .ifr_mtu = mtu, }; + + return mlx5_ifreq(dev, SIOCSIFMTU, &request); +} + /** * Get MAC address by querying netdevice. * -- 2.30.2