From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A79EB4383F; Fri, 5 Jan 2024 18:39:39 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4EC59402D8; Fri, 5 Jan 2024 18:39:39 +0100 (CET) Received: from mail-pg1-f180.google.com (mail-pg1-f180.google.com [209.85.215.180]) by mails.dpdk.org (Postfix) with ESMTP id D1465402CC for ; Fri, 5 Jan 2024 18:39:37 +0100 (CET) Received: by mail-pg1-f180.google.com with SMTP id 41be03b00d2f7-5cde7afa1d7so1141897a12.1 for ; Fri, 05 Jan 2024 09:39:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1704476377; x=1705081177; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=V44HswoJTedG8SAlFTErTyKW0ZUPn1iJld1SPJ0G6mg=; b=1sr8aIO2O3U6+y8QCTE1vgq79CPFf7svHBZegiRtwdPZCvkP1kg3/9+wtZ2RynIltS iumJ2kE7CtX2jhj0UsvVGzMF19y5OddNdiuVyfA8BHAAwBBcWlBqS+PUQzFhzlbqNYB6 CRiL2gqWnUjAxqYAdkec/9vsUdOIySK+7Igxmo9umtoh8jHfitiJ0gRqlFoatm3Vr01B JCsJ/prHMT651CfhoysHlJLx8u4yOD2ji1c1vzo+6VBivLnyKTMBgZbCNEguKWdIMeNt B088pS5B7JHy0FuFYff96ZxpZVTk5M3gv283knU3fb1sOZNDf43YirI4dIWQK8aBG7dl 6dTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704476377; x=1705081177; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=V44HswoJTedG8SAlFTErTyKW0ZUPn1iJld1SPJ0G6mg=; b=LzX4teV9pXkMWy1tjCEjzQvX5a5JsR7DqUfEDoSPOZ2VyBY9A9MSsf1QkvDEz9Dqdz iVoRbpxVkLyDCk6PpgDcxj6YLM95jPbLw6HUKxDqi4B2yG4SP2a1yzz3RSpcuSyrFXOW iBg934sNkl6iga4mhFif/diCoe6+JIsCY8+EKh0rKLAhqpLF0sv2QaLa9mQ8Dfebb8Hp zNtcjmx8hJHOcvbb9vEgQDkt7Kn+9RtDIEE0SW08LAo40BsWxBMcIkvZyRerpt8X1O4X RKrvLcUpAKL1oEpMaVa4clV41l3BFUBcmUjUKS2cZgZoHrtT0mDz7a2EKw24vqC6ZYJ3 TZaw== X-Gm-Message-State: AOJu0Yx+ZS7nCK4gMQqlGT/R3v6dzuZRwb5vcH1n3w9ze4HVg+r+PhaR 36rt9bRDO3IDH1ka5aEytwY6W5qGBZLbSw== X-Google-Smtp-Source: AGHT+IG/1cFSHCP6ThJxLIGTXBDyY+tDJZvM5NW/kfQz7aqp75kgUU4Ykq1weUFP1zoP1uH9W8e/xQ== X-Received: by 2002:a05:6a20:a11a:b0:199:4912:ae8 with SMTP id q26-20020a056a20a11a00b0019949120ae8mr804546pzk.18.1704476376903; Fri, 05 Jan 2024 09:39:36 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id fe7-20020a056a002f0700b006d98d8bad72sm1702898pfb.94.2024.01.05.09.39.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jan 2024 09:39:36 -0800 (PST) Date: Fri, 5 Jan 2024 09:39:34 -0800 From: Stephen Hemminger To: Madhuker Mythri Cc: "ferruh.yigit@amd.com" , "dev@dpdk.org" Subject: Re: [External] : Re: [PATCH] net/tap: Modified TAP BPF program as per the new Kernel-version upgrade requirements. Message-ID: <20240105093934.1a0b59a8@hermes.local> In-Reply-To: References: <20240104172756.2213-1-madhuker.mythri@oracle.com> <20240104125705.3171fe53@hermes.local> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Fri, 5 Jan 2024 14:44:00 +0000 Madhuker Mythri wrote: > Hi Stephen, > > The BPF helper man pages implies in that way and the SKB data pointer access was working till 5.4 kernel also, however from Kernel-5.15 version, we do see eBPF verifier throws error when we use SKB data pointer access. > So, I had used this helper functions and able to resolve the errors. This is helper functions are safe to use and also protects from any non-linear skb data buffer access also. > > So, I think using helper functions is better and safe way to access the SKB data, instead of pointer access. > > Thanks, > Madhuker. Using the accessors may mean it won't work with older kernels, but that is not a huge concern given how fragile this code is.