From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 2C9832956 for ; Thu, 25 Feb 2016 02:50:18 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP; 24 Feb 2016 17:50:17 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,496,1449561600"; d="scan'208";a="910699260" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga001.fm.intel.com with ESMTP; 24 Feb 2016 17:50:18 -0800 Received: from fmsmsx113.amr.corp.intel.com (10.18.116.7) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 24 Feb 2016 17:50:17 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX113.amr.corp.intel.com (10.18.116.7) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 24 Feb 2016 17:50:16 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.132]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.18]) with mapi id 14.03.0248.002; Thu, 25 Feb 2016 09:50:14 +0800 From: "Wu, Jingjing" To: "Sun, Xutao" , "dev@dpdk.org" Thread-Topic: [PATCH v5 3/4] driver/i40e: implement tunnel filter for IP in GRE Thread-Index: AQHRaue89h39JNca8EiE5L2NR98sNp88Bfxw Date: Thu, 25 Feb 2016 01:50:13 +0000 Message-ID: <9BB6961774997848B5B42BEC655768F8DC91EA@SHSMSX104.ccr.corp.intel.com> References: <1455789499-15975-1-git-send-email-xutao.sun@intel.com> <1455867097-19173-1-git-send-email-xutao.sun@intel.com> <1455867097-19173-4-git-send-email-xutao.sun@intel.com> In-Reply-To: <1455867097-19173-4-git-send-email-xutao.sun@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v5 3/4] driver/i40e: implement tunnel filter for IP in GRE 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: Thu, 25 Feb 2016 01:50:19 -0000 > @@ -5833,16 +5839,22 @@ i40e_dev_tunnel_filter_set(struct i40e_pf *pf, > (void)rte_memcpy(&pfilter->inner_mac, &tunnel_filter->inner_mac, > ETHER_ADDR_LEN); >=20 > - pfilter->inner_vlan =3D tunnel_filter->inner_vlan; > + pfilter->inner_vlan =3D rte_cpu_to_le_16(tunnel_filter->inner_vlan); > if (tunnel_filter->ip_type =3D=3D RTE_TUNNEL_IPTYPE_IPV4) { > ip_type =3D I40E_AQC_ADD_CLOUD_FLAGS_IPV4; > + tunnel_filter->ip_addr.ipv4_addr =3D > + rte_cpu_to_le_32(tunnel_filter->ip_addr.ipv4_addr); > (void)rte_memcpy(&pfilter->ipaddr.v4.data, > - &tunnel_filter->ip_addr, > + &tunnel_filter->ip_addr.ipv4_addr, > sizeof(pfilter->ipaddr.v4.data)); > } else { > ip_type =3D I40E_AQC_ADD_CLOUD_FLAGS_IPV6; > + for (i =3D 0; i < 4; i++) { > + tunnel_filter->ip_addr.ipv6_addr[i] =3D > + rte_cpu_to_le_32(tunnel_filter- > >ip_addr.ipv6_addr[i]); You changed the value of in parameter. It's better to use an internal variable to convert byte order. Thanks Jingjing > 1.9.3