From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 13FE117B4E0 for ; Fri, 26 Jul 2024 13:12:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721999538; cv=none; b=kyJntSc6K6DsfzuhUiHJqcf5yPJZSRknNIHLPRqiuELXT8IjU9CClzygfzDOqbLAT5YEg4jARzBM/VdZsJ81frZrxj2hhgMuk6ssGDMFgB6WF15AVjXCIXZPN89bJW3Dhp9u5btz4DxKUCMuLFePNajKeQ95Hjn6UPbVK4eFLJ4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721999538; c=relaxed/simple; bh=h72+a98KprrWyPci+WolzqJ6KSeDATMGbgOUIBmI8cs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=iUEPyEtmPR3JhyBgJJpdqHblzxedMuVEjpzhzBO94dJK12bBmPLs1jdtOZi/Fv047rqH8v8vCt8njcBbKCNp/cAtPzNewhCf6ZTtYtylEsDfJoV1hD8YmkzzJw6CY5XBTeflc6QN80hgmZ9DvIqvBOK8e29o7LMfeWzf4vERUOQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=M5b+kJGV; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="M5b+kJGV" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1721999535; 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: in-reply-to:in-reply-to:references:references; bh=lsFdNBSg3GvSCBXb3m0nQOmqj5eLSOCce+7I1qVBgnc=; b=M5b+kJGVPv5fEh4CE4rlTsCGzsGlYv3jt1Fdx3o1bum72jxg1niZWy46qMOK8MxAnm4y5D /7/Cx5g7MKpSsQBZZCuSWWBQFEi6EMUFFXgdnmeIJ8o/YfZT2ReGmptTOiumQR2Jn7Ta6l dMiSUn6ZHzJLQ3vlrRJvoqbLy8HDcws= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-287-kNB9weZyMBu-V_l_MuzrrQ-1; Fri, 26 Jul 2024 09:12:13 -0400 X-MC-Unique: kNB9weZyMBu-V_l_MuzrrQ-1 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-367990b4beeso1232524f8f.2 for ; Fri, 26 Jul 2024 06:12:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721999532; x=1722604332; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=lsFdNBSg3GvSCBXb3m0nQOmqj5eLSOCce+7I1qVBgnc=; b=MXaBQ+E5oRRqvKDR3DMAfLhSOE49cgArGpcr/2uQyFZW9E0HzesewnTD57mqkHgEkH Qv5BKoKan6wdAmbcVoFfjMe07MmBduft047U8UTfc6MWUy1P4OhIrppCaC5vSbNjDT7U QYpT/R857YYs5WoESkJnWaAoWtLWftsdhB4jCmfh4fMzC9HhazyTSBrRhsAtRFTm/+vW YwR5VuLM4U5VgKVfjM+zGnHWqKdcqiS9752LRup6dUnH5eQzLoQpZCkASQdD1hHULCXu SXPyUvIi4Vat6QsSVOsUZVaeqJ3p687SMP8qRCRc48uFRFJUNUzw0zYjVnpKL4ATwWPa twtA== X-Gm-Message-State: AOJu0YwXGLk0VdyzqB/y40CvHQbiwneWGpcJe6uFhWd8RP32Xllta3ij 7SKnDxnxGcTxDANropaxkXZ3E477VSjTiBY+yRw7tAHxJkNoURotUaTfOTVJPKpOXUiUJhZTOjC +JCI28rHTs0d4d1aJWmCsRYLRGkzaazRorc6fJRBpD2ECk9SQCytweg7srbMniw== X-Received: by 2002:a5d:4c86:0:b0:368:65a0:a423 with SMTP id ffacd0b85a97d-36b319f26b3mr3693022f8f.27.1721999532336; Fri, 26 Jul 2024 06:12:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGXbBJu1f7PaSWFiflUVfFPnDcIdALL9LcSAKL69RJROgW1jJl3MeNJ7yWaxIhL6qAgjduClw== X-Received: by 2002:a5d:4c86:0:b0:368:65a0:a423 with SMTP id ffacd0b85a97d-36b319f26b3mr3692989f8f.27.1721999531622; Fri, 26 Jul 2024 06:12:11 -0700 (PDT) Received: from debian ([2001:4649:f075:0:a45e:6b9:73fc:f9aa]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-36b367fc873sm5157425f8f.60.2024.07.26.06.12.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jul 2024 06:12:10 -0700 (PDT) Date: Fri, 26 Jul 2024 15:12:08 +0200 From: Guillaume Nault To: Ido Schimmel Cc: netdev@vger.kernel.org, netfilter-devel@vger.kernel.org, davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, edumazet@google.com, dsahern@kernel.org, pablo@netfilter.org, kadlec@netfilter.org, fw@strlen.de Subject: Re: [RFC PATCH net-next 1/3] ipv4: Mask upper DSCP bits and ECN bits in NETLINK_FIB_LOOKUP family Message-ID: References: <20240725131729.1729103-1-idosch@nvidia.com> <20240725131729.1729103-2-idosch@nvidia.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240725131729.1729103-2-idosch@nvidia.com> On Thu, Jul 25, 2024 at 04:17:27PM +0300, Ido Schimmel wrote: > The NETLINK_FIB_LOOKUP netlink family can be used to perform a FIB > lookup according to user provided parameters and communicate the result > back to user space. > > However, unlike other users of the FIB lookup API, the upper DSCP bits > and the ECN bits of the DS field are not masked, which can result in the > wrong result being returned. > > Solve this by masking the upper DSCP bits and the ECN bits using > IPTOS_RT_MASK. Reviewed-by: Guillaume Nault