From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-f169.google.com (mail-io0-f169.google.com [209.85.223.169]) by dpdk.org (Postfix) with ESMTP id 6FA7AF72 for ; Mon, 18 Jul 2016 17:26:18 +0200 (CEST) Received: by mail-io0-f169.google.com with SMTP id b62so162450428iod.3 for ; Mon, 18 Jul 2016 08:26:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:cc; bh=ojWWLFfqbCqfgrTl0jiecyQmQQvLFOfflYKqS+YnH+U=; b=Om8tT+lGiHHZfIg8lTBRZ15KD4G9A/RQWCfC/NbS8ipaP8XDPngq+jydnG57/G2utm PfOrQa1wevtgebqbBbSZVJBtKcrBwTDHTjUQhpyak6YK3bTkxnGRwwq/t1h92OCe5v3i gj1dfshR4v8dL5ce4uSq07Kx54JwKZJjj5UKEVZhpjVE4lrTUcSaFLOGiY0CLMrA4Snr /V4fNl7nbWDMSESDh4GgQJZlvW/4M+GI+7Sl3mZN95WVQbg7hXmStY4L93Y1+5bHX0XT 1w+iwVdAKYDisQbyh8vnqNErSjrE2e5+29Fxljdt9M7zv/8Bs7Cad7shUSPibozdOPvr 840Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=ojWWLFfqbCqfgrTl0jiecyQmQQvLFOfflYKqS+YnH+U=; b=dGpzl+ZdVC/IRxVE+AAD+hqYAVtq0iF5xy9tJGu2RrjuYkf+2uz4gpWu+tFphQcFub +aEXqrzL0EG/Qbf+kTm0NeMQbSnE5FbjlyCeh0VJI6FLzUH2ootDG9TPfgyusOyFkjvf 0m4DM78cA84yzQLar2NOzJaUvSjbY1tGtmwrVVoTorVV7T2QA59He+Za5IrRmm0bJwH4 jUqE6bCnQK+MevBReQxxeoKfjeteatGRaOEspuzUZAXasJyyCokKorPMn1xHUcpExc2m xphLnOKrab5ybhBjUWFz9qKrsEjMseuv0pFixZhH/cGlJNdFxUrZcOsDEw6mQ41sGdVL 6Vng== X-Gm-Message-State: ALyK8tKmQYWNRHfGUL6W+wsPy7nH8XHxCEIymZy8GhJCgPeYE9F43rso6Z/SrEGnnV+zLnruORzN5YDYSeq9BQ== X-Received: by 10.107.18.101 with SMTP id a98mr39992871ioj.116.1468855577782; Mon, 18 Jul 2016 08:26:17 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.7.82 with HTTP; Mon, 18 Jul 2016 08:25:58 -0700 (PDT) From: Take Ceara Date: Mon, 18 Jul 2016 17:25:58 +0200 Message-ID: To: users@dpdk.org Cc: Bruce Richardson Content-Type: text/plain; charset=UTF-8 Subject: [dpdk-users] Ring PMD - Should mbufs be copied instead of just being added to the ring? X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jul 2016 15:26:18 -0000 Hi, I noticed that the Ring PMD directly enqueues the mbufs transmitted with rte_eth_tx_burst (eth_ring_tx). I understand that this is the fastest way however, in some cases, the receive side might rewrite part of the packet payload (e.g., change some of the L2-3 headers). If the sender is still using the original packet (e.g., having it cloned) the packet will be essentially corrupted. I really like the fact that the Ring based interfaces are mostly transparent to the applications as they can just use the general rte_eth_tx_burst/rx_burst but in the rewriting case we need to handle sending (or receiving) in a special way and manually create an mbuf chain copy of the original. Would it be an option to add a flag argument to rte_eth_from_rings to specify whether the Ring PMD driver should enqueue the original or actually send a copy of the original packet? Thanks, Dumitru Ceara