From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f195.google.com (mail-wr0-f195.google.com [209.85.128.195]) by dpdk.org (Postfix) with ESMTP id EF347239 for ; Wed, 25 Oct 2017 10:25:26 +0200 (CEST) Received: by mail-wr0-f195.google.com with SMTP id r79so23103614wrb.13 for ; Wed, 25 Oct 2017 01:25:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=dpUnl1weBf69C+dfo+Hzm/+TYG0CdsEqgZeBG8uaSak=; b=p2NaZ1GZugVVGb76pcQIKtw6SB5nvuk+Fbatrn3CglIuPCW+Ml3eulgjXatZTY/xZI wwbaqgHAAB8l1ejIsLYAuoUglwIWVBDydezITPSdT4RH5Ws8OpFDSvtc9V1GE9ipd8VY iLeojOQBGb5cNBG2Ou1gQ9noSwwKx3j3VoloQng2/mftoFBJsumZcMK4yiY+2CNh/Xdc QRxTwu0oOGFFh/kQzyC6YOP004F95zByMQZd589/u3loeBPMOxYcCabaKaIAyNYTwcS+ 9wLyAKDC7LZSGeBp3NBXUV6OT58SlMxmNwHlEH3KZb6xyAozl49z/rDLQAT4QkU34RzW rZfA== 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=dpUnl1weBf69C+dfo+Hzm/+TYG0CdsEqgZeBG8uaSak=; b=GlfF13HdfTuV+NMeNeK06UNPD8KS3TW4Z1LnOGUahZnpgeEinkpKTQrt2Td5g+02LX xYMDeU5vQnjNjeW19wk244xPOkd+fhITsal71BnFoAaN2RBbeX0xB2wPkHyte6gSVsIj HUlZC2FWk4MKBLfAOIoq5U4hSjvz2wrzdydydrGUw2cxUOWiLozf4ogDQNqjW1X7gXa+ IVc1KF6N7b3bLaWD/E3pksBYlsVXnMksjdvKaTLkBItTeBGNY699M4tt621dExBYFPhm 2lepKF1CldVbXqkWtzZAvPaSj2FmOpiFsrGXE6fZAkA/guiSW1oZs/vws7xszqKQJbvq LIqg== X-Gm-Message-State: AMCzsaXomOqpVvajeuMczUdpS+gNIqvxqwbKHz3m4RWn6PxquFpg2X4d TM1flsQgIZtBeDfyTyVLukiWenSERw== X-Google-Smtp-Source: ABhQp+Q6QPrVeTkC4srUviBpgrgGJtFBK3hO3cZZJsv6rc35m8p1u3tebUklJ4vJ+L9UBOSKxy8mvw== X-Received: by 10.223.163.215 with SMTP id m23mr1214254wrb.32.1508919926315; Wed, 25 Oct 2017 01:25:26 -0700 (PDT) Received: from laranjeiro-vm.dev.6wind.com. (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id 2sm1522391wrq.83.2017.10.25.01.25.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Oct 2017 01:25:25 -0700 (PDT) From: Nelio Laranjeiro To: dev@dpdk.org Cc: Yongseok Koh , Adrien Mazarguil Date: Wed, 25 Oct 2017 10:25:22 +0200 Message-Id: <5156fd25083e0489e1e3da5d412579ce9a123e0f.1508919813.git.nelio.laranjeiro@6wind.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <8c8fb4394ba85f5bda005119cbfc851a3b728fa6.1508844772.git.nelio.laranjeiro@6wind.com> References: <8c8fb4394ba85f5bda005119cbfc851a3b728fa6.1508844772.git.nelio.laranjeiro@6wind.com> Subject: [dpdk-dev] [PATCH v2] net/mlx5: fix adjust priority for drop queue 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: Wed, 25 Oct 2017 08:25:27 -0000 Drop queue should also adjust their priority according the most specific layer in the pattern they are matching to avoid dropping all the traffic. Fixes: 8086cf08b2f0 ("net/mlx5: handle RSS hash configuration in RSS flow") Signed-off-by: Nelio Laranjeiro --- Changes in v2: * Reorder the if, else if, else statement to improve readability --- drivers/net/mlx5/mlx5_flow.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 26cf593af..f392f1f65 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -1174,9 +1174,17 @@ priv_flow_convert(struct priv *priv, * Last step. Complete missing specification to reach the RSS * configuration. */ - if (parser->queues_n > 1) { + if (parser->drop) { + /* + * Drop queue priority needs to be adjusted to + * their most specific layer priority. + */ + parser->drop_q.ibv_attr->priority = + attr->priority + + hash_rxq_init[parser->layer].flow_priority; + } else if (parser->queues_n > 1) { priv_flow_convert_finalise(priv, parser); - } else if (!parser->drop) { + } else { /* * Action queue have their priority overridden with * Ethernet priority, this priority needs to be adjusted to -- 2.11.0