From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6E108A034E; Thu, 7 Nov 2019 15:05:31 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 953938F96; Thu, 7 Nov 2019 15:05:30 +0100 (CET) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by dpdk.org (Postfix) with ESMTP id 3A5FC378E for ; Thu, 7 Nov 2019 15:05:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573135528; 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=Gv5FLGEnw53Ng9ZD0hf+aWmSgop9xCqPsfhQgRvHXo8=; b=CWbiVw+4uVwuUpQ7u4lBMhW6T+WYPo63l5QBkataEsfg4/AIO215MSJI758xzQjBI520DL 87DouSSqCLFZGt8yxSg7BwuLYYGyKrQa4KdnJl7bgbxEpcy5yyenRSN57GrFLf6DyXLYGf rStq1IK9SdSRUKccBQ0nmEGJNXI4Ok0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-327-fslT3EkOPqSdIeKG7L2Fug-1; Thu, 07 Nov 2019 09:05:27 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6A93F800EB3; Thu, 7 Nov 2019 14:05:26 +0000 (UTC) Received: from [10.36.116.219] (ovpn-116-219.ams2.redhat.com [10.36.116.219]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B974C5C554; Thu, 7 Nov 2019 14:05:25 +0000 (UTC) From: "Eelco Chaudron" To: "Ciara Loftus" Cc: dev@dpdk.org, xiaolong.ye@intel.com Date: Thu, 07 Nov 2019 15:05:23 +0100 Message-ID: <17CD9BBC-BAC8-4717-8104-52AA2360A2D9@redhat.com> In-Reply-To: <20191107132710.14912-1-ciara.loftus@intel.com> References: <20191107132710.14912-1-ciara.loftus@intel.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: fslT3EkOPqSdIeKG7L2Fug-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; format=flowed; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH] net/af_xdp: enforce an MTU of 1500 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" On 7 Nov 2019, at 14:27, Ciara Loftus wrote: > Packets larger than this will fail to be transmitted by AF_XDP, > so limit the MTU to 1500. > > Signed-off-by: Ciara Loftus > --- > drivers/net/af_xdp/rte_eth_af_xdp.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c=20 > b/drivers/net/af_xdp/rte_eth_af_xdp.c > index 2b1245ee4..62c801500 100644 > --- a/drivers/net/af_xdp/rte_eth_af_xdp.c > +++ b/drivers/net/af_xdp/rte_eth_af_xdp.c > @@ -595,7 +595,7 @@ eth_dev_info(struct rte_eth_dev *dev, struct=20 > rte_eth_dev_info *dev_info) > =09dev_info->max_tx_queues =3D internals->queue_cnt; > > =09dev_info->min_mtu =3D RTE_ETHER_MIN_MTU; > -=09dev_info->max_mtu =3D ETH_AF_XDP_FRAME_SIZE -=20 > ETH_AF_XDP_DATA_HEADROOM; > +=09dev_info->max_mtu =3D 1500; Why is this limited to 1500 in the AF_XDP PMD? For native AF_XDP in OVS=20 the limit is mainly by the driver/XDP page limit: =09min(PAGE_SIZE, ETH_AF_XDP_FRAME_SIZE ) - ETH_XDP_DATA_HEADROOM -=20 XDP_PACKET_HEADROOM > > =09dev_info->default_rxportconf.nb_queues =3D 1; > =09dev_info->default_txportconf.nb_queues =3D 1; > @@ -1328,6 +1328,8 @@ rte_pmd_af_xdp_probe(struct rte_vdev_device=20 > *dev) > =09=09return -1; > =09} > > +=09eth_dev_mtu_set(eth_dev, 1500); > + > =09rte_eth_dev_probing_finish(eth_dev); > > =09return 0; > --=20 > 2.17.1