From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-f68.google.com (mail-lf1-f68.google.com [209.85.167.68]) by dpdk.org (Postfix) with ESMTP id A2E074CAD for ; Fri, 24 Aug 2018 14:17:07 +0200 (CEST) Received: by mail-lf1-f68.google.com with SMTP id z11-v6so6514384lff.9 for ; Fri, 24 Aug 2018 05:17:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=RiHTFc5IROF+rR74not8nQ52o6A7SWEJIrPv9/aPEEA=; b=LETlJ86ME2I9cUqkzSVDukMkI2CaOqdxaQ5kKTtG9+c209Aqatgdr3+kkBqKcravi+ JQe8PoHfnUA94bTo4ZrYblZKYePss5z+5rpvmDzZ3MicFf/+sGVxthxLGq1cQSh7fifP Mmr9jYi0rVD7FyzASyhPOPsG7eH3bk6yyi3IdTNkVBwX2bateqOqSwYyakimE+K26yFq erBJ63zdRpbBPI6s7nQiNq/gI/4Rk3ckkfYMnxgjtOdEdjBoeftoujCXq47viYDkZDX4 uBgv2VD8b/Uci/vZ6G/v+oDAjR+uw1AZ0BzJnSHQVohAlL/xLAcMusEiIjtFV6c9nlrl Pu+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=RiHTFc5IROF+rR74not8nQ52o6A7SWEJIrPv9/aPEEA=; b=ZbtE/MBQqhNbOl7fi+oSgsRWVbCSLjsefHPWNZnuudbw3GRE/GLiLES7QSLDCTBUdJ dwnXd5hvrVAoTKOT5LvwMRdfoHBK4w3/Tw5EuhVYndsvKXdlQep4ZhrqiYoIRshvQsGK 8uMjWf32QQh5p/d9af2gregsL5iUIzY3UgjUIHPANv2yTggkmW33cJe1KzdHsE1DGVdw 3shXSJEc7cjyvb9GyP9dUiFA9UXnb5feQOUXdl4xBjBAmBY6muhYPjM7/iNpE2EWlgmZ Wv8oO4M246NVb8USkpl4G69ddbc7Xyo44PJm0xl0tDg2e02vKF4DaNbCgFmujOyDOHaD Af5w== X-Gm-Message-State: APzg51AS7FC5d0oLlgZX6PGS0LsV8iGvv7hEaMR/KujlrC6mqkSPNBsB zC7lYG4cE7P/8FdDUA1+dOsq/mnQbi8= X-Google-Smtp-Source: ANB0VdYb+F26GkDTAOPECeiwoq6EZDDPpkuYayE5lwl/ggAfFlVfThb/pizLXOa4HTHbm8h3xPACSw== X-Received: by 2002:a19:8f8c:: with SMTP id s12-v6mr1225334lfk.83.1535113027181; Fri, 24 Aug 2018 05:17:07 -0700 (PDT) Received: from sh.semihalf.local (31-172-191-173.noc.fibertech.net.pl. [31.172.191.173]) by smtp.gmail.com with ESMTPSA id a18-v6sm1177672ljk.47.2018.08.24.05.17.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 24 Aug 2018 05:17:06 -0700 (PDT) From: Tomasz Duszynski To: dev@dpdk.org Cc: nsamsono@marvell.com, mw@semihalf.com Date: Fri, 24 Aug 2018 14:16:46 +0200 Message-Id: <1535113006-9393-7-git-send-email-tdu@semihalf.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1535113006-9393-1-git-send-email-tdu@semihalf.com> References: <1535113006-9393-1-git-send-email-tdu@semihalf.com> Subject: [dpdk-dev] [PATCH 6/6] net/mvpp2: add VLAN packet type support for parser offload 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: , X-List-Received-Date: Fri, 24 Aug 2018 12:17:08 -0000 From: Natalie Samsonov Add VLAN packet type support for parser offload. Signed-off-by: Natalie Samsonov Reviewed-by: Shlomi Gridish Reviewed-by: Dmitri Epshtein Reviewed-by: Yuval Caduri --- drivers/net/mvpp2/mrvl_ethdev.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c index 5cd84c1..5b92d82 100644 --- a/drivers/net/mvpp2/mrvl_ethdev.c +++ b/drivers/net/mvpp2/mrvl_ethdev.c @@ -1353,6 +1353,8 @@ mrvl_dev_supported_ptypes_get(struct rte_eth_dev *dev __rte_unused) { static const uint32_t ptypes[] = { RTE_PTYPE_L2_ETHER, + RTE_PTYPE_L2_ETHER_VLAN, + RTE_PTYPE_L2_ETHER_QINQ, RTE_PTYPE_L3_IPV4, RTE_PTYPE_L3_IPV4_EXT, RTE_PTYPE_L3_IPV4_EXT_UNKNOWN, @@ -1922,13 +1924,27 @@ mrvl_desc_to_packet_type_and_offset(struct pp2_ppio_desc *desc, { enum pp2_inq_l3_type l3_type; enum pp2_inq_l4_type l4_type; + enum pp2_inq_vlan_tag vlan_tag; uint64_t packet_type; pp2_ppio_inq_desc_get_l3_info(desc, &l3_type, l3_offset); pp2_ppio_inq_desc_get_l4_info(desc, &l4_type, l4_offset); + pp2_ppio_inq_desc_get_vlan_tag(desc, &vlan_tag); packet_type = RTE_PTYPE_L2_ETHER; + switch (vlan_tag) { + case PP2_INQ_VLAN_TAG_SINGLE: + packet_type |= RTE_PTYPE_L2_ETHER_VLAN; + break; + case PP2_INQ_VLAN_TAG_DOUBLE: + case PP2_INQ_VLAN_TAG_TRIPLE: + packet_type |= RTE_PTYPE_L2_ETHER_QINQ; + break; + default: + break; + } + switch (l3_type) { case PP2_INQ_L3_TYPE_IPV4_NO_OPTS: packet_type |= RTE_PTYPE_L3_IPV4; -- 2.7.4