Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2133155pxb; Mon, 12 Apr 2021 15:33:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwq9JzTc4smyZ4RhxGsUePXzeJWjNpo1SvKRBs8ZAfxUTdRwJroTOVE+yt1tyDPLuF5cmmb X-Received: by 2002:aa7:c40b:: with SMTP id j11mr31455727edq.141.1618266814120; Mon, 12 Apr 2021 15:33:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618266814; cv=none; d=google.com; s=arc-20160816; b=GbUTJLKjAl+E2g50KMgEgpOFBPyFgra9cv48cnyZ2xMbMyI3KMmBADgRUAiHxTMHEJ wD0cEc6lQZOhdjTL/0KwQ4Z4tm3ldnX/MNj8vcCUSgIWRP0LJbjzcsuxTVnUT5Dip1Yb oOWpa+Xu1tsz6Ts8Oym/VqXIt7Vh23P/7+rEQz88u+7/5RtRgaL6PZoO1I1zmIrz5Tdc urhD78veAmmD00JoRDJL0g2jLTYsfYAK9sT9s1fd1dCM2k0YLfxxO7IcbmwXDG45J23A WI8XIENW5YgRNBF2XnKQMC0aR65FU9iZl3in7JoS8e5QJTP8WuTd7/0nXv5JxOsIJRd6 ArNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=EdkW4+JHb5w7fnf009GcfE3W5bUmCTBh7yAQnCnkQBs=; b=iPRLDsDMhQVEHiuQMwTrRsV75wWgEWTXvbTgOd3MYmtEm7MRJvPCvsIqd1uIi2TfRU K/f4Th7OobqFi4yYMCZNSfQSawKYXzigDXGUE2mMUsXojI4SpDtBYJq7SALicPjF18uO wZe4lnvA/4aBfvabH9BhoneO8SgSQatIcXxGsuFgUHXLnRtgrd+JST291Q8HrOqJhdu2 Cte80WxEGxxcaKV5g8c34dc8iC2YORjxD33uoW0DKgCBStxK3Fg8kqdBTwInyI4JfA6a VXWwuMD3/VSYT3EQf54meh5GrWAXcBtTqay9rW+BJHEGlEM4J+Ra+JFUa3QMVxbKcgUh G3YA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=GQh3CYu8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h16si8605723edv.460.2021.04.12.15.33.10; Mon, 12 Apr 2021 15:33:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=GQh3CYu8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240979AbhDLJg3 (ORCPT + 99 others); Mon, 12 Apr 2021 05:36:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:34456 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240446AbhDLJKS (ORCPT ); Mon, 12 Apr 2021 05:10:18 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 991496127A; Mon, 12 Apr 2021 09:05:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1618218326; bh=1uZh46V5N4adN+fqP41ksnzPUDKliYjEvaV1AoFFZ6s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GQh3CYu8r/QDgyXFrGLYfNbEMK5gBHoEQ7SY9GWSbrxL41zbpW4nDU9zWt1TptuHs f8YYILMk82uN1S4365N1D4xJjXiEvcEMgB2qdaGiuS3xYuZBXSraHtyOdosvQ2nyo5 vPpm6XQZyImsyjF2XTyDsOqOcsnKJz1l4kl9YuHg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Norman Maurer , David Ahern , "David S. Miller" , Sasha Levin Subject: [PATCH 5.11 155/210] net: udp: Add support for getsockopt(..., ..., UDP_GRO, ..., ...); Date: Mon, 12 Apr 2021 10:41:00 +0200 Message-Id: <20210412084021.152574698@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210412084016.009884719@linuxfoundation.org> References: <20210412084016.009884719@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Norman Maurer [ Upstream commit 98184612aca0a9ee42b8eb0262a49900ee9eef0d ] Support for UDP_GRO was added in the past but the implementation for getsockopt was missed which did lead to an error when we tried to retrieve the setting for UDP_GRO. This patch adds the missing switch case for UDP_GRO Fixes: e20cf8d3f1f7 ("udp: implement GRO for plain UDP sockets.") Signed-off-by: Norman Maurer Reviewed-by: David Ahern Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- net/ipv4/udp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 69ea76578abb..9d2a1a247cec 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@ -2749,6 +2749,10 @@ int udp_lib_getsockopt(struct sock *sk, int level, int optname, val = up->gso_size; break; + case UDP_GRO: + val = up->gro_enabled; + break; + /* The following two cannot be changed on UDP sockets, the return is * always 0 (which corresponds to the full checksum coverage of UDP). */ case UDPLITE_SEND_CSCOV: -- 2.30.2