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 97C294388B; Fri, 12 Jan 2024 17:44:03 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 87A4B402C5; Fri, 12 Jan 2024 17:44:03 +0100 (CET) Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) by mails.dpdk.org (Postfix) with ESMTP id 0F661402AD for ; Fri, 12 Jan 2024 17:44:02 +0100 (CET) Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-1d3f2985425so36011625ad.3 for ; Fri, 12 Jan 2024 08:44:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1705077841; x=1705682641; 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=PC92WKYAzOZjm9Rue9qqMqDwYrys23GkchOSzfABwt8=; b=AeMvdKWyw339T54TaWDx2HgvxqJV56RgonHt5TIOIvj0T0FAw9P2peNmEfL0+r7WVQ B0BiJEjiH4Um3bx21yXjbhA1WoRF5sGQUXEGtWTFqTc/N4KJAqS9rplHyLmYNoor3WEN tojz+NEdY07akxOticndO5QvpgtrQrq50hNqYMKpFhQr5/+YSWBFiGaGeqFE0hIklcvQ lP1HF2gxVNrHx/jhWwYBREFx833A6IVxduBkb4r76PmDpDuiTNVDvD0cOfYYxKKR8KFO V80xnGOq0t0GRs7F714G6Gpil8YpayjjheZIDRflDfPr9gFIetIsoKJ7M/ekgFly/+6q QJUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705077841; x=1705682641; 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=PC92WKYAzOZjm9Rue9qqMqDwYrys23GkchOSzfABwt8=; b=sL+yxMusasD5HJUmPQoo+LKKApu7fFnhZiVlQBJ6myb4kJavsmNMIBkAZ1H/FZlUUQ ZHwQHl2qv8cnW4edHT3BkEJPd7z/dGGPlzEfY7ALjR+bQG6x7/CT1fiJZ32bSRxq/5CK NPLtA7xF2E8ZLi3HaCnZ39CzKX7vOb4D3KGElGmndv/X6vsMZKya+djCXR8lF+Pgd4nf 40i8LJhZ7K6o9RLjCdXvVCvjfRzYUjxMZRLst3DvwGHwVtwf/LnEFvdYyjOzn3NWj4qH kMwVR/ZY8nff4oRBb4/iGPpmxjEnAJxZvOYO6jJrJ4Gt9AOkvM+bYxDcq+yTSQOjm4Td EKig== X-Gm-Message-State: AOJu0Yzg+oAE+Z3k2DlPDSUe2kr/rm9B22O0GERjxTv7jrEHryYsPmvh u6sDAQUPdIlTiuEEKrP6F5oU1dCyUEMbgg== X-Google-Smtp-Source: AGHT+IFnBz3XpC8pvS2gwZe58E4QlIRC9O7NrUftFjMBTEWHCtc+6BxK48zIY+y7NTSv1AAFlq/JLA== X-Received: by 2002:a17:902:eb42:b0:1d4:6d08:9050 with SMTP id i2-20020a170902eb4200b001d46d089050mr999111pli.61.1705077841080; Fri, 12 Jan 2024 08:44:01 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id mj3-20020a1709032b8300b001d43872309asm3342187plb.286.2024.01.12.08.44.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jan 2024 08:44:00 -0800 (PST) Date: Fri, 12 Jan 2024 08:43:59 -0800 From: Stephen Hemminger To: madhuker.mythri@oracle.com Cc: dev@dpdk.org, ferruh.yigit@amd.com Subject: Re: [PATCH] net/tap: Modified TAP BPF program as per the Kernel-version upgrade requirements. Message-ID: <20240112084359.603c1ed8@hermes.local> In-Reply-To: <20240112134821.2067-1-madhuker.mythri@oracle.com> References: <20240112134821.2067-1-madhuker.mythri@oracle.com> 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, 12 Jan 2024 19:18:21 +0530 madhuker.mythri@oracle.com wrote: > + if (bpf_skb_load_bytes_relative(skb, 0, &nh, sizeof(nh), BPF_HDR_START_NET)) > + return TC_ACT_OK; > + if (nh.iph.version == 4) { Using IP header bytes, instead of ether header protocol (in skb->proto) is changing functionality and wrong. You don't want to be seeing some other protocol (not IPv4 or IPv6) that just happened to have the 4 in that nibble. Original code was fine.