From patchwork Mon Jan 13 18:05:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sowmini Varadhan X-Patchwork-Id: 64573 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 529ABA04F1; Mon, 13 Jan 2020 19:05:42 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4B2291D14C; Mon, 13 Jan 2020 19:05:41 +0100 (CET) Received: from mail-qt1-f196.google.com (mail-qt1-f196.google.com [209.85.160.196]) by dpdk.org (Postfix) with ESMTP id A93BD1D14A for ; Mon, 13 Jan 2020 19:05:39 +0100 (CET) Received: by mail-qt1-f196.google.com with SMTP id k40so9871437qtk.8 for ; Mon, 13 Jan 2020 10:05:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id; bh=0tiU9I41j3dIn1ar0/mWis17o8LnUNyslJrNdMVcfXM=; b=QAbDhp1NsUlQpli9zxniKd2UWDCbNjjuanGj5a3tQV/eFDlzW9NzqQdIQa3SvIARTg ISDXFPLkzkDrQk5PQOfRZRUSeg7x8nCUB+LjEclOqIkPMDVIKQQVUc6ryEOVP1rnyv4m tIQXwggqwZfm645lmo9YW68GHWb5oL3xWLgA0wpuGFSUC+tyBAXmIfDWXDo9M4LTBker HuHtU9ri3hjb2g0g+aSRZzqP15uAzUAucJ1y8j/RDyfj2CX4cboACmMgrrub1oord9ZI 0uH4a9MuD8bm6baajCMoWrkSjIBtD7qcoxbp4Wsg/ljXvrJPxBkXOqxo0J0pAVjMDtwz tZuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=0tiU9I41j3dIn1ar0/mWis17o8LnUNyslJrNdMVcfXM=; b=GFTMcCqPRFfcjQnlLATSbcKOMwk3GQkJkX8MRM8DzKPQetkvqJ0rSe6AxQuNYHhy/m q2Kxu/zKCDBM4EMT/vD8pu4uWUZciw+Vtl3Hf6Tn8FoEWd7ZDQlNXzO3NjPc3uOD94m7 SrrwDC+6xdoAkpUTaAELPSSJF1PhnLCjnUYf3LYQNgi0dnmsa3lxX68Kfs1E5ZnaeKZw PIa2Bnw2l5OyoD2Dp8q9V92VNc9hQ4WweZX83AQcp6cZZb2B962svbXETZXEVm0CNDwk 7XguPouQ7tHmu8Pisc53NRat2fH1Rz8Qt41Ew/qxWOsdRRDSypkWVPDJxiYGUN8Q+GMe EF0g== X-Gm-Message-State: APjAAAUUNMkvepFO2AFHOc7UOMdmrNVUSVBO9+13eIyAdBNvUmsYMIXd bpTIYK9MWUlxK6IxTQdt7H8= X-Google-Smtp-Source: APXvYqxFEHnSMs/BeoXFnVdJEVRhbgsuBZcTPNCXiQ111Dv/lYhn01bep1fqL1Lu48K0qQxjZZ6H8g== X-Received: by 2002:ac8:209:: with SMTP id k9mr15154899qtg.290.1578938739027; Mon, 13 Jan 2020 10:05:39 -0800 (PST) Received: from sovaradhvm.ojp4suxva1celnnpiyhedynfde.bx.internal.cloudapp.net ([104.211.12.148]) by smtp.gmail.com with ESMTPSA id a36sm6272483qtk.29.2020.01.13.10.05.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jan 2020 10:05:38 -0800 (PST) From: Sowmini Varadhan To: sowmini05@gmail.com, dev@dpdk.org Date: Mon, 13 Jan 2020 18:05:28 +0000 Message-Id: X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH RFC V2 0/2] TCP flow classification using 4-tuple and flags X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" V2 updates: checkpatch fixes, revert accidently spelling error introduced in V1; The problem space of TCP flow tracking and classification based on TCP state requires the ability to classify TCP flows on more packet properties than just the 4-tuple, e.g., TCP flags. This patch-set investigates the set of changes needed in the examples/flow_classify.c needed to achieve this. Patch 1 extends examples/flow_classify.c to allow constraints on tcp flags. Patch 2 extends the ACL handling in librte_flow_classify to include keys on the properties in addition to the tcp 4-tuple. Note that one particular part of this patch-set where feedback is requested is in allocate_acl_ipv4_tcp_5tuple_rule(): we need to add a key for the 8 bit flags, but the multibit trie lookup moves in steps of 4 bytes, so it took some hackery to figure out what byte-ordering was expected, and there were no documentation/examples to provide guidelines. Comments/suggestions would be particularly helpful. Sowmini Varadhan (2): Hooks to allow the setting of filters on tcp flags Allow the flow_classify example to add an ACL table for tcp. examples/flow_classify/flow_classify.c | 121 +++++++++++++++--- examples/flow_classify/ipv4_rules_file.txt | 22 ++-- lib/librte_flow_classify/rte_flow_classify.c | 87 +++++++++++++ lib/librte_flow_classify/rte_flow_classify.h | 19 +++ .../rte_flow_classify_parse.c | 8 +- 5 files changed, 230 insertions(+), 27 deletions(-)