From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f170.google.com (mail-wr0-f170.google.com [209.85.128.170]) by dpdk.org (Postfix) with ESMTP id 8B0BC58CF for ; Wed, 8 Mar 2017 12:21:29 +0100 (CET) Received: by mail-wr0-f170.google.com with SMTP id u48so21059711wrc.0 for ; Wed, 08 Mar 2017 03:21:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=nb/Ay9tg+hGfNnMbas7Lo2uO/CD4BXDRPFuB1RPOSfU=; b=JYDDDbhu4jiKWMlG7Ho1UOOoTZWq/kzNXdZ65zxQ3fegZRXAbbljQwr7oNpNORGLmj QkELQn24TTyCCMBViHObRulQ+Czvi++8PRZFErtSXm+bmh+SEm+FwI2Yy0oc+WiKCewk XYvzyS6nj6ScPfG/yRky7tS149yL5DX4IRekk/Q62t8Ptc+gJ6w9T6Gg2ulduur5/otN 7sdnpIoXIs68qcpUDXSOtMgbqeZhPP65A/pTMI+gaqndG781kQ4yL3VJbO7zytUp4xHY cdclNhxcPq6j1hr5svy7ieiGUAgl+3Qn7FBas7Hx9ihSqXVkqcURWTAlUFTcuwUEKqJj 8FcA== 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:cc; bh=nb/Ay9tg+hGfNnMbas7Lo2uO/CD4BXDRPFuB1RPOSfU=; b=AbW5wZvW+0qy6OKhB6q5pe3l93OMSXe2JGG0KYzQpwQhFfkV95AJU6KYuUPnyaU1u2 VALzDHJK6O/gERGYMiAls05ZgMU+L9KM1hISxTyfGs3hWzdRQiTLgLQsDzSktEBU6EP1 S6JAzvgwQ60zCXZes2syHkqH4zviVr9yuwDCPEBzgAajESZBqEN32XAEB83PgAxrlrAC 49yJykqrOzy/iJllXPK334QxPfU572G6Pucp/Hx68caE0xJmZmrYVgWIj5+832fcQ9Lx iwnASLs5rvwhkzVA5n4/i+eXq1+AW9kX11oL80To3iPfLyl+1zPyTPqHMCy3pV6mdvrt K+6A== X-Gm-Message-State: AMke39lSIIYkk6MQd0wZmy7wrczm9rst0+BWlkOpyf86DAHEpVCu7RE3FHm75vVoao5j6G/53ALSpUI1To8v1g== X-Received: by 10.223.171.239 with SMTP id s102mr4646120wrc.23.1488972088299; Wed, 08 Mar 2017 03:21:28 -0800 (PST) MIME-Version: 1.0 Received: by 10.80.174.176 with HTTP; Wed, 8 Mar 2017 03:21:27 -0800 (PST) In-Reply-To: <2601191342CEEE43887BDE71AB9772583FACBD67@IRSMSX109.ger.corp.intel.com> References: <2601191342CEEE43887BDE71AB9772583FACBD67@IRSMSX109.ger.corp.intel.com> From: Chillance Zen Date: Wed, 8 Mar 2017 19:21:27 +0800 Message-ID: To: "Ananyev, Konstantin" Cc: "dev@dpdk.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] checksum and vlan insertion seem not working on X520 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, 08 Mar 2017 11:21:29 -0000 Hi Konstantin,Thank you sooooooooooooooooooooooooooooo much ,I really appreciate your suggestion... it works well now ,I love it. Linc On 8 March 2017 at 17:20, Ananyev, Konstantin wrote: > Hi Linc, > > Wonder what TX function are you using? > Make sure that you are not using simple TX function that doesn=E2=80=99t = support > any offloads or multiseg packets. > You need something like that at setup phase: > > rte_eth_dev_info_get(port_id, &dev_info); > dev_info.default_txconf.txq_flags =3D 0; > ... > rte_eth_tx_queue_setup(=E2=80=A6, &dev_info.default_txconf); > > Konstantin > > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Chillance Zen > > Sent: Wednesday, March 8, 2017 8:50 AM > > To: dev@dpdk.org > > Subject: [dpdk-dev] checksum and vlan insertion seem not working on X52= 0 > > > > Hi ,every one > > > > when I was conducting nic offloading exp,I can not make a x520 nic inse= rt > > vlan ,nor checksum, > > here is my rx/tx capability: > > rx offload capability:9f > > tx offload capability:203f > > > > with code like this: > > while(1){ > > nr_mbufs=3Drte_eth_rx_burst(0,queue_id,mbufs,32); > > for(idx=3D0;idx > #if 0 > > buffer=3Drte_pktmbuf_mtod(mbufs[idx],char*); > > ip4=3D(struct ipv4_hdr*)(buffer+14); > > ip4->hdr_checksum=3D0; > > mbufs[idx]->l2_len=3D14; > > mbufs[idx]->l3_len=3D20; > > mbufs[idx]->ol_flags=3DPKT_TX_IP_CKSUM|PKT_TX_IPV4; > > #else > > mbufs[idx]->vlan_tci=3D0xef00; > > mbufs[idx]->ol_flags=3DPKT_TX_VLAN_PKT; > > #endif > > rte_eth_tx_burst(0,queue_id,&mbufs[idx],1); > > } > > } > > > > does anybody know what;s wrong with my code? > > Thanks & regards > > Linc > --=20 Linc @bjtu