From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id DCDA31B7F2 for ; Fri, 8 Feb 2019 10:51:32 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2CB0EC057F3A; Fri, 8 Feb 2019 09:51:32 +0000 (UTC) Received: from [10.36.112.52] (ovpn-112-52.ams2.redhat.com [10.36.112.52]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 88C0518E22; Fri, 8 Feb 2019 09:51:28 +0000 (UTC) To: Jens Freimann , dev@dpdk.org Cc: tiwei.bie@intel.com References: <20190205111702.14782-1-jfreimann@redhat.com> From: Maxime Coquelin Message-ID: <1f53c36a-02a7-ea06-7b71-4b4a4d3e142b@redhat.com> Date: Fri, 8 Feb 2019 10:51:26 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <20190205111702.14782-1-jfreimann@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Fri, 08 Feb 2019 09:51:32 +0000 (UTC) Subject: Re: [dpdk-dev] [PATCH v5] net/virtio: set offload flag for jumbo frames 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: , X-List-Received-Date: Fri, 08 Feb 2019 09:51:33 -0000 On 2/5/19 12:17 PM, Jens Freimann wrote: > Port configuration fails because offload flags don't match the expected > value when max-pkt-len is set to a value that should enable receive port > offloading but doesn't. > > The .dev_infos_get callback can be called before the configure callback. > At that time we don't know the maximum packet size yet because it is > only set up when ports are started. So in virtio_dev_info_get() just > always set the jumbo packet offload flag. > > Check the maximum packet length at device configure time, because then we > have access to the max-pkt-len value provided by the user. If the > max-pkt-len exceeds the maximum MTU supported by the device we remove > the VIRTIO_NET_F_MTU flag from requested features. > > Fixes: a4996bd89c42 ("ethdev: new Rx/Tx offloads API") > Cc: stable@dpdk.org > > Signed-off-by: Jens Freimann > --- > drivers/net/virtio/virtio_ethdev.c | 6 ++++++ > 1 file changed, 6 insertions(+) Reviewed-by: Maxime Coquelin Thanks, Maxime