From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f41.google.com (mail-wg0-f41.google.com [74.125.82.41]) by dpdk.org (Postfix) with ESMTP id 34C1C5A9C for ; Mon, 9 Mar 2015 08:13:33 +0100 (CET) Received: by wghk14 with SMTP id k14so22083427wgh.3 for ; Mon, 09 Mar 2015 00:13:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=uVdhmICCEWCu8G48MMJKq4FNaN4qwffEN3SXUlxfWr8=; b=PFHP9oEGmHnyL22YgUadnxIIo+gF2Ryznkw88SeR8TyFEH2E89ejPeXAIoQ4Q0WmXa ynA/HOZzioPuZnSpKu7uHXii6t0Q4fSkz3Fke9C7WWASBlcN/rTD7UpxyMbtzLHRb6DJ Cyxed1C3WAoN3eS00t6n4DJadlR2Xquman76ph1dovycQvrgsqKhvJJiJxautibNnz28 Pqw2jd0W1h7LYk96FehAc79ffM1ZoVLf3fZUxf3Q7iuzAqa+ChUlTB4wSvzKNkiDBpZ0 02NseS5TAhxuV7DEXpZTTVyzFGN8Xxnbm4uCfKTCq+LGRUZhJb78t+61gIQ48W57rbkW hdDg== X-Gm-Message-State: ALoCoQmrWH6vir295Ree805gXutsScVmUnZASiSNHmK5iuASU5OHgkeFaSWDUBdA4uDfG6shYL8/ X-Received: by 10.180.14.196 with SMTP id r4mr99236734wic.77.1425885212856; Mon, 09 Mar 2015 00:13:32 -0700 (PDT) Received: from [192.168.43.130] ([46.19.85.214]) by mx.google.com with ESMTPSA id l4sm12554124wiw.6.2015.03.09.00.13.31 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Mar 2015 00:13:32 -0700 (PDT) Message-ID: <54FD4819.80406@cloudius-systems.com> Date: Mon, 09 Mar 2015 09:13:29 +0200 From: Vlad Zolotarov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Thomas Monjalon References: <1425823498-30385-1-git-send-email-vladz@cloudius-systems.com> <1425823498-30385-6-git-send-email-vladz@cloudius-systems.com> <3355568.qkVtABOLMn@xps13> In-Reply-To: <3355568.qkVtABOLMn@xps13> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v4 5/5] ixgbe: Add LRO support 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: Mon, 09 Mar 2015 07:13:33 -0000 On 03/08/15 23:20, Thomas Monjalon wrote: > 2015-03-08 16:04, Vlad Zolotarov: >> --- a/lib/librte_ether/rte_ethdev.h >> +++ b/lib/librte_ether/rte_ethdev.h >> @@ -312,6 +312,9 @@ enum rte_eth_tx_mq_mode { >> #define ETH_VMDQ_DCB_TX ETH_MQ_TX_VMDQ_DCB >> #define ETH_DCB_TX ETH_MQ_TX_DCB >> >> +/* TODO: Remove this when DPDK version bumps up to 2.0.1 */ > The last digit is reserved for maintenance. > LRO should be merged in 2.1.0. > By the way, why removing this macros when it's integrated? I think it would > be a good idea to start using this kind of macro for new API. > It's better than version checking because it supports backports. > Opinion? I agree. I was just under the impression that u hate macros in general (like I do). ;) That's why I put this reminder... ;) But I agree that in situations like this having a macro defining a specific API presence is a good practice. > >> +#define RTE_ETHDEV_HAS_LRO_SUPPORT > Is it the right location to define it? > Is it better than defining it just above one of the new fields or at the > beginning of the file? I vote for a beginning of the file. If we have more like these having them spread across the file would make it hard to track Especially when one macro is responsible for more than one API line. > >> + >> /** >> * A structure used to configure the RX features of an Ethernet port. >> */ >> @@ -320,14 +323,15 @@ struct rte_eth_rxmode { >> enum rte_eth_rx_mq_mode mq_mode; >> uint32_t max_rx_pkt_len; /**< Only used if jumbo_frame enabled. */ >> uint16_t split_hdr_size; /**< hdr buf size (header_split enabled).*/ >> - uint8_t header_split : 1, /**< Header Split enable. */ >> + uint16_t header_split : 1, /**< Header Split enable. */ >> hw_ip_checksum : 1, /**< IP/UDP/TCP checksum offload enable. */ >> hw_vlan_filter : 1, /**< VLAN filter enable. */ >> hw_vlan_strip : 1, /**< VLAN strip enable. */ >> hw_vlan_extend : 1, /**< Extended VLAN enable. */ >> jumbo_frame : 1, /**< Jumbo Frame Receipt enable. */ >> hw_strip_crc : 1, /**< Enable CRC stripping by hardware. */ >> - enable_scatter : 1; /**< Enable scatter packets rx handler */ >> + enable_scatter : 1, /**< Enable scatter packets rx handler */ >> + enable_lro : 1; /**< Enable LRO */ >> }; >> >> /** >> @@ -1515,6 +1519,7 @@ struct rte_eth_dev_data { >> uint8_t port_id; /**< Device [external] port identifier. */ >> uint8_t promiscuous : 1, /**< RX promiscuous mode ON(1) / OFF(0). */ >> scattered_rx : 1, /**< RX of scattered packets is ON(1) / OFF(0) */ >> + lro : 1, /**< RX LRO is ON(1) / OFF(0) */ >> all_multicast : 1, /**< RX all multicast mode ON(1) / OFF(0). */ >> dev_started : 1; /**< Device state: STARTED(1) / STOPPED(0). */ >> };