From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1700DA00C2; Fri, 24 Apr 2020 19:32:41 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BA1641D447; Fri, 24 Apr 2020 19:32:39 +0200 (CEST) Received: from mail-pj1-f66.google.com (mail-pj1-f66.google.com [209.85.216.66]) by dpdk.org (Postfix) with ESMTP id 176BC1C2AB for ; Fri, 24 Apr 2020 19:32:38 +0200 (CEST) Received: by mail-pj1-f66.google.com with SMTP id a5so4139213pjh.2 for ; Fri, 24 Apr 2020 10:32:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=c8GndQ7tSUGcW0KlVXTA8Y4pmbofiIUoyyldoUCFJq4=; b=EL6U+/O5BRyC8mXRkIR4G4a3bwEqoZzRy6Cn5roUmPyOmx5yFxBx14QC7+nxPSGBx5 55SqEyxjqRYfRUgYeX1Ea0f3BUEd2BKuSeffM+tnpT/G+0tSp6zeyfxpuNWcFtrrHNew MiNJ/N6FAvrw+6gXqmnedvqVgRdy+Ck8OXwil7wfaUb53D2YslERE65c28qB0QLRAF06 YkoYrhwOhfzZJhQf3mmkWVqbjTVol46chgy2BoXxn9BEtu5GolEvzLrGsfKuo3INSqD/ +5H57WncpQhNzHoGZPxZAkXuNzIv6P8up/CuVc5vYdN+R28E7ffWekr+L6IOw7sBvLpR g6pA== 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:mime-version:content-transfer-encoding; bh=c8GndQ7tSUGcW0KlVXTA8Y4pmbofiIUoyyldoUCFJq4=; b=FwS/wS0V7lK2ros/idqgqZcm+tlN0Jmbgvcl+gKEh6QaqsIvdG7FA07AIqbTfU+/gc 4OhrUtJuN8NFMvhTPFiC5zWAUZ9Vt6q2B2gpXIXhYp+PntVIf2JMUz5zHflBEwIIfnyJ hqJyk49TfB+9+c4zJQ/M1awz3kXEgFg4o4xR5NpBcyd/cHG1ZqBH36CaSiLOo6EWb7aP PQ5JbVZ0eUkLtSjCMFIzGq+GFvAYpqtMDrqLKh6DV+yt3lYG61IgwOZgOkBHLR01MNHV 2goOXe+WRAgR2cDaegHpawQHKnt8Y4KZ2dknHN9y2U3Qfa2IFXrpaI3ILDkFmOS6rRcE CQsQ== X-Gm-Message-State: AGi0PuZtuCWYhl0sah7N8BVoKMcC3JnJl9gEKT1zcjLhClD8hf1Vk8LP ygpQt54U36ccnPpv6DcIOxJCfuoofvY= X-Google-Smtp-Source: APiQypJFNEc1RTdMDtPbxqZO6USsRJUakrMt/I/a013L0y0Vr0kr1TXbrkfBnrVhaGhC7zkFVwFrZQ== X-Received: by 2002:a17:902:9a93:: with SMTP id w19mr10340701plp.277.1587749556593; Fri, 24 Apr 2020 10:32:36 -0700 (PDT) Received: from hermes.corp.microsoft.com (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id x193sm6809484pfd.54.2020.04.24.10.32.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Apr 2020 10:32:35 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org, somnath.kotur@broadcom.com, ajit.khaparde@broadcom.com Cc: Stephen Hemminger Date: Fri, 24 Apr 2020 10:32:22 -0700 Message-Id: <20200424173222.32335-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200305064500.5634-1-stephen@networkplumber.org> References: <20200305064500.5634-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] net/bnxt: disable vector mode if flow mark is used 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" Since vector mode can't be used with flow mark actions. The choice of vector or non-vector mode is done dynamically earlier in the initialization process (config) and the user application has no direct control over the selection. Therefore the best resolution to the conflict is for the driver to disable vector mode if it needs to. Fixes: 94eb699bc82e ("net/bnxt: support flow mark action") Cc: ajit.khaparde@broadcom.com Signed-off-by: Stephen Hemminger --- drivers/net/bnxt/bnxt_flow.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c index 44734272fbea..7715a7b45173 100644 --- a/drivers/net/bnxt/bnxt_flow.c +++ b/drivers/net/bnxt/bnxt_flow.c @@ -18,6 +18,7 @@ #include "bnxt_hwrm.h" #include "bnxt_ring.h" #include "bnxt_rxq.h" +#include "bnxt_rxr.h" #include "bnxt_vnic.h" #include "hsi_struct_def_dpdk.h" @@ -1405,14 +1406,10 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev, case RTE_FLOW_ACTION_TYPE_MARK: if (bp->flags & BNXT_FLAG_RX_VECTOR_PKT_MODE) { PMD_DRV_LOG(DEBUG, - "Disable vector processing for mark\n"); - rte_flow_error_set(error, - ENOTSUP, - RTE_FLOW_ERROR_TYPE_ACTION, - act, - "Disable vector processing for mark"); - rc = -rte_errno; - goto ret; + "Disabling vector processing for mark\n"); + + bp->flags &= ~BNXT_FLAG_RX_VECTOR_PKT_MODE; + dev->rx_pkt_burst = &bnxt_recv_pkts; } if (bp->mark_table == NULL) { -- 2.20.1