Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2108721pxb; Mon, 12 Apr 2021 14:47:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzCWUZtcOiX9mOzriJVdXAiZZvMNs/Mb5fpm+36dXbNVRFTuYl3+Qvwd9BQZsqU8K/w62Eo X-Received: by 2002:a17:90a:9404:: with SMTP id r4mr1305939pjo.64.1618264031277; Mon, 12 Apr 2021 14:47:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618264031; cv=none; d=google.com; s=arc-20160816; b=dy+QTF14391tfPLmRWaICTvykHAVqbf4bqaES5xdR4FXV+0JfcdU4GuXth1Uz4LRgC 30jlHqL/Uu+yzuC4y5HE1QfpdHGQhRtxoNtIbT1zrgPQ1baFGbyRMHUoc2OD+rAzfa3w M5GziZXfJ/2XxoNW5rIheD8AQSpQw7BhomkhKFrh2uHDdoVTu7x2c9Q/mYb6cCiOmY/c ozKJWQFDpwaEbK9Y+bCkpE8O5m8etAfXJCJsyMAVdiWU6K0NB5OQPNSPn7Qq7tB1QlkF V/eZLTFaQS5LxHKkwaqAT+cg3RSh/3eocnn9TNsWAzbsWM9iI5MJ+YcE/QFoNXilyxqD iRhw== 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=MpIjwJo5DiO5cQAw3qBEylMg19ApPOZpDOJQEf+oBro=; b=NPxlap6PfP6iIOrOg2Dmyvs0NWcpr3zZwq7viM/AQhowEUAx01WBk5M9qyIWJf+Dbo 9woI290F0+dkrDrQPuXGnKqG4i8Swg/wlBXwG9FcmBHPXWDl1pKtJXeWkGNVWjeXM11X UIb6aYGfTWN5tS1iFH0oyqpoAGljEzLGDtrBHES5aAgP06tqWHakyrW4Ti6svlmSjbYr aR/g+acUE9Vnbo/5GBzDLXNmiTaR/s02Snr8C1N4JMqXeTEv9k0BNFOxlVN5ZvXqZ3cQ hlgt5J7TMeXUdnSRAp7kX14WXNw3+V7hmS+q37D2eXqBMcQ0PkcykHKXHHhaytk44sZp /E6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Mo5teiiu; 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 h21si9973725pgg.456.2021.04.12.14.46.51; Mon, 12 Apr 2021 14:47:11 -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=Mo5teiiu; 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 S241798AbhDLJRU (ORCPT + 99 others); Mon, 12 Apr 2021 05:17:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:49588 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239189AbhDLI7X (ORCPT ); Mon, 12 Apr 2021 04:59:23 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id ECD3D6127B; Mon, 12 Apr 2021 08:57:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1618217867; bh=CBQVzLBqekB9MKSfsc/RdzVUHUb3mws8egSq2IJpSCU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Mo5teiiuKJIdbjvQ0s7FGEimeVG0JjP4fN7nDsakkxjHW31enCS8aXsP6nttdiGV1 YkKyg0BdVhBpaXeRfB10etrOtDyCTvcnvU5iXwMxrEgFU4murUkkwsqqqs2+V//7qD xpKH9NpwTYPUZNORGy4Js9fpEoqjcejqxMaVWsaM= 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.10 140/188] net: udp: Add support for getsockopt(..., ..., UDP_GRO, ..., ...); Date: Mon, 12 Apr 2021 10:40:54 +0200 Message-Id: <20210412084018.291305997@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210412084013.643370347@linuxfoundation.org> References: <20210412084013.643370347@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 e37a2fa65c29..4a2fd286787c 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@ -2747,6 +2747,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