From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 1F84E1B920 for ; Fri, 22 Jun 2018 15:37:40 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Jun 2018 06:36:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,257,1526367600"; d="scan'208";a="60140623" Received: from rhorton-mobl1.ger.corp.intel.com (HELO FC23.ir.intel.com) ([163.33.230.75]) by fmsmga002.fm.intel.com with ESMTP; 22 Jun 2018 06:36:36 -0700 From: Remy Horton To: dev@dpdk.org Cc: Akhil Goyal , Radu Nicolau Date: Fri, 22 Jun 2018 14:36:33 +0100 Message-Id: <20180622133633.3476-1-remy.horton@intel.com> X-Mailer: git-send-email 2.9.5 Subject: [dpdk-dev] [PATCH v1] examples/ipsec-secgw: fix use of unsupported RSS offloads 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, 22 Jun 2018 13:37:41 -0000 Since commit aa1a6d87f15d ("ethdev: force RSS offload rules again") a check that requested RSS offloads are supported by a PMD is enforced, whereas in the past asking for unsupported offloads would not result in an error. This patch changes the IPSec gateway sample so that it only requests modes that are supported rather than failing to start up. Fixes: d299106e8e31 ("examples/ipsec-secgw: add IPsec sample application") Signed-off-by: Remy Horton --- examples/ipsec-secgw/ipsec-secgw.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c index a5da8b2..d247d5f 100644 --- a/examples/ipsec-secgw/ipsec-secgw.c +++ b/examples/ipsec-secgw/ipsec-secgw.c @@ -1566,6 +1566,11 @@ port_init(uint16_t portid) if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE) local_port_conf.txmode.offloads |= DEV_TX_OFFLOAD_MBUF_FAST_FREE; + + /* Only request RSS offloads the NIC supports. */ + local_port_conf.rx_adv_conf.rss_conf.rss_hf &= + dev_info.flow_type_rss_offloads; + ret = rte_eth_dev_configure(portid, nb_rx_queue, nb_tx_queue, &local_port_conf); if (ret < 0) -- 2.9.5