From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-f172.google.com (mail-io0-f172.google.com [209.85.223.172]) by dpdk.org (Postfix) with ESMTP id 819511BBE for ; Wed, 23 Mar 2016 19:44:47 +0100 (CET) Received: by mail-io0-f172.google.com with SMTP id 124so56959261iov.3 for ; Wed, 23 Mar 2016 11:44:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to; bh=fHrK/m2S+14Hkuov5g4K5JhJk5wPHGQ7vBQiSqh+UaA=; b=vfjyfHVETByJFX7sPTi3ZwgLwsFZ+8bLE3+hTXuGr6EQH8CUsALDjW0beG/9yw8WIy GUkXLnwAOnz3V24ucjeKg/odchbsA/+8WFkkBGEgv+Msb7vKXSosr3iMoeLzhNzXHYb0 nLku4M2FcABjYHYCqWRlccsgqRMQ8ICdYrMzSqQJE2IW9HYzgxEe2JeVA8XGotvqUKNa xZrCGujH8xY1nJsaD+NPIGZNI6g+OFq+Gn0NiwHgUVL9vHVNJgSiuD+5mJ/UayyHngZt MJ9kF1VKHVfUDrxwFHnYEQQu+6BS081B2ur088io7ox8/C3yQM7HGtLnGfLkCs36Xsju r0rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to; bh=fHrK/m2S+14Hkuov5g4K5JhJk5wPHGQ7vBQiSqh+UaA=; b=JYhqqiQK9fiAnGh7aNqewflApDSiU450hfiLY4sGov/C4hf924cxAZn+XayNQVwY+0 4DbLLEdo+VEaAysRbhHGMLqCU1MXpguD8EmGNoKS2zCQf/ZguJ9ARSa0Zn36EJFyhoxY tw8oOMshkfTKs5MBRQqhk/bw1nfU8fijEHJkGHD2TkzxBm/spFD0D5gicurg1zZIsxxz RFXoWXXIqn1LX2MjY0F4qfj2KDrTRmE9XfjXgJBuelugUj0FBHFkynNw4amb502OeSOC cq8ebNQq2ljGaEKPY1CM2JOqpU1LWqeXuXSWd8vzKu0lsraTRMZhdaFk56p6Z+WtnVkC OLQg== X-Gm-Message-State: AD7BkJJsIzEXcbtamZrJFccrrFHrVjS2o9+ZWI6qIwasm9rEN8K9xyog8cqwmFqnGgCcqXpGr+0wubygn6eQ4Q== MIME-Version: 1.0 X-Received: by 10.50.155.102 with SMTP id vv6mr5067114igb.73.1458758686954; Wed, 23 Mar 2016 11:44:46 -0700 (PDT) Received: by 10.79.126.197 with HTTP; Wed, 23 Mar 2016 11:44:46 -0700 (PDT) Date: Wed, 23 Mar 2016 13:44:46 -0500 Message-ID: From: Michael Habibi To: dev@dpdk.org X-Mailman-Approved-At: Thu, 24 Mar 2016 12:23:35 +0100 Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-dev] Bug in i40e PMD for flexible payload X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2016 18:44:47 -0000 We are using the i40 implementation to configure flow director with flexible payload rules. When setting up rules, it allows you to set a value to 63 to disable the rule (NONUSE_FLX_PIT_DEST_OFF). However, the macro in question is always adding an offset value 50 (I40E_FLX_OFFSET_IN_FIELD_VECTOR). This doesn't work when you use it in conjunction with NONUSE_FLX_PIT_DEST_OFF to disable it, because instead of taking 63 as is, it does 63 + 50 and breaks the functionality. We used the following fix and it appears to work. Just sharing with the DPDK team in case they want to bring it in. Index: i40e_fdir.c =================================================================== --- i40e_fdir.c (revision 30006) +++ i40e_fdir.c (working copy) @@ -90,7 +90,8 @@ I40E_PRTQF_FLX_PIT_SOURCE_OFF_MASK) | \ (((fsize) << I40E_PRTQF_FLX_PIT_FSIZE_SHIFT) & \ I40E_PRTQF_FLX_PIT_FSIZE_MASK) | \ - ((((dst_offset) + I40E_FLX_OFFSET_IN_FIELD_VECTOR) << \ + ((((dst_offset) + ((dst_offset < NONUSE_FLX_PIT_DEST_OFF) ? \ + I40E_FLX_OFFSET_IN_FIELD_VECTOR : 0)) << \ I40E_PRTQF_FLX_PIT_DEST_OFF_SHIFT) & \ I40E_PRTQF_FLX_PIT_DEST_OFF_MASK))