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 C9C9AA0C3F; Thu, 15 Apr 2021 17:26:05 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9297E16236F; Thu, 15 Apr 2021 17:26:05 +0200 (CEST) Received: from mail-qk1-f174.google.com (mail-qk1-f174.google.com [209.85.222.174]) by mails.dpdk.org (Postfix) with ESMTP id A549A16236E for ; Thu, 15 Apr 2021 17:26:04 +0200 (CEST) Received: by mail-qk1-f174.google.com with SMTP id o5so25607159qkb.0 for ; Thu, 15 Apr 2021 08:26:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=t6TKZXtAGEWMMJLBlEZHCQ3YdAkDgB+bzRQm1/tOejg=; b=an6asC7ZgsdeCpB65o6KEHYYtImbHz13kmy6s6q6ceh7azezKurj4XK9+2JMDAArRT kvfLuzvi0oWytu3R9AAJAH7LPZXG5hbVwW9Z9fT+5NT+ZOGxySQhplvoDZrXuGwTDQyM r/iGC5RA8l/lzPeNmcOrW173h5PeJ8zksnG8s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=t6TKZXtAGEWMMJLBlEZHCQ3YdAkDgB+bzRQm1/tOejg=; b=Uh54fkCIZf5VEcw+9P4R0hUnKK4JoG2WALs+8vwzttTHeLpRp61YC9JPOlTfMcCmuT OlCdST0fPNXbaqEpjXJVpdD4v8DEMb+dkCtFTjZKWD8NQxcvrs+/HYtqfwCbwdy/6ZKr Jic4PLw4z+NuXr1luDW/gptMU0RR17iDCAvgZRUcJT7hxFNrpikdARIE58Q7v4zVIwB5 s6LuhC6QlrHZw9pasxw2JAblXegRZVNVaQWnStRjOrfSPC8Pkss3FsxiWfovLlgceh+e J20NdutJYkhOJKsurKcshYtbYtn1JyLijYlhcqvFYxs1/E9gEcjim8oUJfRmODEpeAcY FeiA== X-Gm-Message-State: AOAM530iMyLX+wIubs3SEC+ZV3SWL2F77OQolEXkcZA8kGKBkpGPr9nA qZWhuFBfow65nYrrf+G/mMLH0vRgQIsQFunj2iQ7EA== X-Google-Smtp-Source: ABdhPJy6WwfO17S51tQMpIk25eHWfhrS/UavMp9NiaQtj8A8kEci4UQ/76LMKLjchRLqqqNDS99jywnYm1/RkTQps+Y= X-Received: by 2002:ae9:e88c:: with SMTP id a134mr3865732qkg.409.1618500363866; Thu, 15 Apr 2021 08:26:03 -0700 (PDT) MIME-Version: 1.0 References: <20210414160930.14928-1-getelson@nvidia.com> <20210414160930.14928-2-getelson@nvidia.com> In-Reply-To: From: Ajit Khaparde Date: Thu, 15 Apr 2021 08:25:47 -0700 Message-ID: To: Ori Kam Cc: Gregory Etelson , Andrew Rybchenko , dpdk-dev , Ferruh Yigit , Jerin Jacob Kollanukkaran , Jerin Jacob , Olivier Matz , NBU-Contact-Thomas Monjalon , Slava Ovsiienko , Matan Azrad , Raslan Darawsheh Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="00000000000048451c05c0047b1c" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [dpdk-dev] [PATCH v5 1/2] ethdev: add packet integrity checks 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 Sender: "dev" --00000000000048451c05c0047b1c Content-Type: text/plain; charset="UTF-8" > > > However, as more and more applications are offloading some or all > > > logic and action to the HW, there is a need to check the packet > > > integrity so the right decision can be taken. > > > > > > The application logic can be positive meaning if the packet is > > > valid jump / do actions, or negative if packet is not valid > > > jump to SW / do actions (like drop) a, and add default flow > > > (match all in low priority) that will direct the miss packet > > > to the miss path. > > > > Unless I missed it, > > How do you specify the negative case? > > Can you provide an example as well? > > > You can use negative case by setting the bit to zero and the mask bit to 1: > This example was taken from the testpmd patch: > flow create 0 ingress pattern integrity value mask 1 value spec 0 / end actions queue index 0 / end > it matches all invalid packets and forward it to the application. Thanks Ori. > > > > > > Signed-off-by: Ori Kam Acked-by: Ajit Khaparde > > > --- > > > doc/guides/prog_guide/rte_flow.rst | 20 +++++++++++ > > > doc/guides/rel_notes/release_21_05.rst | 5 +++ > > > lib/librte_ethdev/rte_flow.h | 49 ++++++++++++++++++++++++++ > > > 3 files changed, 74 insertions(+) --00000000000048451c05c0047b1c--