From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay52.bu.edu (relay52.bu.edu [128.197.228.12]) by dpdk.org (Postfix) with ESMTP id 7F6041E2B for ; Mon, 9 Jan 2017 06:48:04 +0100 (CET) X-Envelope-From: doucette@bu.edu Received: from mail-wm0-f70.google.com (mail-wm0-f70.google.com [74.125.82.70]) by relay52.bu.edu (8.14.3/8.14.3) with ESMTP id v095lPuX027767 for ; Mon, 9 Jan 2017 00:47:26 -0500 Received: by mail-wm0-f70.google.com with SMTP id c85so12994528wmi.6 for ; Sun, 08 Jan 2017 21:47:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=N8gH1GMJsCQ7nc6NzNIT/w5UzItPpTEik6yLxovDN5s=; b=HRYEi2kZdNhtsN7eFKG7X29LwaCc1KKfSIOza6NIp3xqk30BKmNBM0FjMrFITxH+Ug PqQLHXnMrQaxGeXvrVwwdaGOB0E5BheV6lDbSGVuGusdinT6KQQksRZE4QB4dL1gXoYB YPqXKcBgFCdRPJ04+62EskHAPGV4q7vIWSt/m0ucYAtd9j67LlRlFUw4K9w+aX7B00gW dXObpqsTZMEYJuv7EhSbNCmM6zo6VOPhHfRatKJjj8IBW92+ojLLcK+ufWOOGkzPGiOX Neafj+1NTrhjB/8Q8Bccu31Crc6zIeRtBjrbl1+L4Srmun2tsQgzaTqOI6mimY6u95oc ix0A== X-Gm-Message-State: AIkVDXKum4P/QJmQ10qcI3Dhuav9y2YqxqVfQm5428fSPRarsI6J7srp56aUF1NOOOV5erX+CToYBpcNzo2dV6bo1HEQbi00i62xedIpvKiym5keeCcAaSkuBxTmIr32HG4jbHmpIv2WWDiWRQ== X-Received: by 10.223.169.112 with SMTP id u103mr10461951wrc.166.1483940845153; Sun, 08 Jan 2017 21:47:25 -0800 (PST) X-Received: by 10.223.169.112 with SMTP id u103mr10461942wrc.166.1483940844926; Sun, 08 Jan 2017 21:47:24 -0800 (PST) MIME-Version: 1.0 Received: by 10.28.91.3 with HTTP; Sun, 8 Jan 2017 21:47:24 -0800 (PST) In-Reply-To: References: From: Cody Doucette Date: Mon, 9 Jan 2017 00:47:24 -0500 Message-ID: To: users@dpdk.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-users] Flow Director for IPv6, flex bytes X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 05:48:04 -0000 Does anyone have any examples of Flow Director being used with IPv6, especially for an ixgbe NIC? Or does anyone have any experience/knowledge that the driver may be buggy? Cody On Tue, Jan 3, 2017 at 3:21 PM, Cody Doucette wrote: > I'm trying to use Flow Director on an 82599 NIC to match the IPv6 proto > and hop limit fields. I've been able to get something analogous working for > IPv4, but changing the flow type to IPv6 breaks it. > > Does anyone have any pointers to working examples of Flow Director for > IPv6 flows? > > My Flow Director configuration is: > > (It seems to be a driver requirement that we use RTE_ETH_RAW_PAYLOAD and > RTE_ETH_FLOW_UNKNOWN below): > > .fdir_conf = { > .mode = RTE_FDIR_MODE_PERFECT, > .pballoc = RTE_FDIR_PBALLOC_64K, > .status = RTE_FDIR_REPORT_STATUS_ALWAYS, > .drop_queue = DROP_QUEUE, > .mask = { > .vlan_tci_mask = 0x0, > .ipv4_mask = { > .src_ip = 0, > .dst_ip = 0, > }, > .ipv6_mask = { > .src_ip = { 0, 0, 0, 0}, > .dst_ip = { 0, 0, 0, 0}, > }, > .src_port_mask = 0, > .dst_port_mask = 0, > .mac_addr_byte_mask = 0, > .tunnel_type_mask = 0, > .tunnel_id_mask = 0, > }, > .flex_conf = { > .nb_payloads = 1, > .nb_flexmasks = 1, > .flex_set = { > [0] = { > .type = RTE_ETH_RAW_PAYLOAD, > .src_offset = { > FDIR_FLEX_OFFSET, > FDIR_FLEX_OFFSET + 1, > }, > }, > }, > .flex_mask = { > [0] = { > .flow_type = RTE_ETH_FLOW_UNKNOWN, > .mask = { > [0] = 0xFF, > [1] = 0xFF, > }, > }, > }, > }, > }, > > And then this filter works for IPv4 packets: > > struct rte_eth_fdir_filter filter = { > .soft_id = soft_id, > .input = { > .flow_type = RTE_ETH_FLOW_IPV4, > .flow_ext = { > .vlan_tci = 0, > .flexbytes = { > 0x40, > 0x01, > }, > .is_vf = 0, > .dst_id = 0, > }, > }, > .action = { > .rx_queue = queue_id, > }, > }; > > But this filter does not work for IPv6 packets (and neither does changing > the flow type to anything else): > > struct rte_eth_fdir_filter filter = { > .soft_id = soft_id, > .input = { > .flow_type = RTE_ETH_FLOW_IPV6, > .flow_ext = { > .vlan_tci = 0, > .flexbytes = { > 0x3A, > 0x55, > }, > .is_vf = 0, > .dst_id = 0, > }, > }, > .action = { > .rx_queue = queue_id, > }, > }; >