From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk1-f194.google.com (mail-qk1-f194.google.com [209.85.222.194]) by dpdk.org (Postfix) with ESMTP id C17AE493D for ; Wed, 14 Nov 2018 06:45:31 +0100 (CET) Received: by mail-qk1-f194.google.com with SMTP id 131so23812408qkd.4 for ; Tue, 13 Nov 2018 21:45:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1zB56qpQhQVkMw0yRVBpklaemfJKhIwFxnCp5hUy7Ms=; b=nGxAhTaMepa/64q0pAHfjEfo4zmUHBePVStvG18ijk9XY7jwaFmKinnF7pvW+OJOWz uROAEGPQf0/RzvdL+MnVDgIyfASFFVt9wqUev/2lJAufhc6Ai9jZ+VDkzPErLARPpb9A p+3GSgCCrP3LmrpbnQKB9qINjnAKfDbkVZjBqeUwIN+24B56UaWEEpK5z3kRjfqHpGVC U+GzQuTXqrQ3r8KWdACLU8SINVYqiheeMoTBTfUOpg83uK14AKn2V3Q98vwz+m5ZoGJN Nu++BtGNbgHZvgHOkluD9bzC/Um+40aAEZnIL4tCvw6WPpNYVj8SJOF5J13S42z+v/MG p7VQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1zB56qpQhQVkMw0yRVBpklaemfJKhIwFxnCp5hUy7Ms=; b=k6Wrj+lPHqjF9S5qBOBdX9WMmVDp8+qUuJPW54TSJpV2BGmAzauNFh0TYGnwHfzHcG +FNZ0Eb0jo8NVFnV30U7WPqbgvc0Uw2iCb0O8oJmJQaPfaXgNly7erGXGx53jvNuvn+0 mKWyIUxe5yVLPT1bmT05Z2A2Ig9NYkbu1STwjtQCF8i/E8nsIr4hdvt9iEuGil8XKzdW QuSGVIw1MHXb2djweukzwbvv08P9IbfSXNlYBcl4rtmQoGIbTdR3zKJJXV+wv14eUqHo J/zMpVJw8EGE4nS74SoK83cBuXubLnBqCx/o5baCxdwDIlz1J9ys5ONLk7j4DSRJh/wl TLkw== X-Gm-Message-State: AGRZ1gJXOSIbrYROJOblUrUlEWMyljDT9upTFsi84yT9HMFNvkWAvzxH fJLAFkzbZzCG7KpyYe1QOTIpq5zdAf7fVtpzkMYrSRoM X-Google-Smtp-Source: AJdET5cog+uQuB/BjIHlwWZkLVMHeu5PPb1STY1w2GkkDFqNEw/Ko2eyJrpbQmkyA0RsEFHxgCDb0Hv4edmB2tfSp5M= X-Received: by 2002:ac8:33fc:: with SMTP id d57mr456393qtb.82.1542174331138; Tue, 13 Nov 2018 21:45:31 -0800 (PST) MIME-Version: 1.0 References: <9f22d7f1-080e-1663-df8d-a3893248a93d@intel.com> In-Reply-To: <9f22d7f1-080e-1663-df8d-a3893248a93d@intel.com> From: Sam Date: Wed, 14 Nov 2018 13:45:19 +0800 Message-ID: To: "Burakov, Anatoly" 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] Where is the padding code in DPDK? 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, 14 Nov 2018 05:45:32 -0000 OK, then shortly speaking, DPDK will NOT care about padding. NIC will care about padding while send and recv with NIC. kernel will care about while send and recv with vhostuser port. Is that right? Burakov, Anatoly =E4=BA=8E2018=E5=B9=B411=E6=9C= =8813=E6=97=A5=E5=91=A8=E4=BA=8C =E4=B8=8B=E5=8D=885:29=E5=86=99=E9=81=93= =EF=BC=9A > On 13-Nov-18 7:16 AM, Sam wrote: > > Hi all, > > > > As we know, ethernet frame must longer then 64B. > > > > So if I create rte_mbuf and fill it with just 60B data, will > > rte_eth_tx_burst add padding data, let the frame longer then 64B > > > > If it does, where is the code? > > > > Others can correct me if i'm wrong here, but specifically in case of > 64-byte packets, these are the shortest valid packets that you can send, > and a 64-byte packet will actually carry only 60 bytes' worth of packet > data, because there's a 4-byte CRC frame at the end (see Ethernet frame > format). If you enabled CRC offload, then your NIC will append the 4 > bytes at transmit. If you haven't, then it's up to each individual > driver/NIC to accept/reject such a packet because it can rightly be > considered malformed. > > In addition, your NIC may add e.g. VLAN tags or other stuff, again > depending on hardware offloads that you have enabled in your TX > configuration, which may push the packet size beyond 64 bytes while > having only 60 bytes of actual packet data. > > -- > Thanks, > Anatoly >