[dpdk-dev] [PATCH 4/4] ethdev: add helpers to move to the new offloads API

Thomas Monjalon thomas at monjalon.net
Mon Sep 18 16:42:01 CEST 2017


18/09/2017 16:27, Shahaf Shuler:
> Monday, September 18, 2017 2:38 PM, Bruce Richardson
> > On Mon, Sep 18, 2017 at 01:32:29PM +0200, Thomas Monjalon wrote:
> > > 18/09/2017 13:11, Ananyev, Konstantin:
> > > > From: Richardson, Bruce
> > > > > >
> > > > > > I think we all in favor to have a separate API here.
> > > > > > Though from the discussion we had at latest TB, I am not sure it
> > > > > > is doable in 17.11 timeframe.
> > > > >
> > > > > Ok, so does that imply no change in this release, and that the
> > > > > existing set is to be ignored?
> > > >
> > > > No, my understanding the current plan is to go forward with Shahaf
> > > > patches, and then apply another one (new set/get API) on top of them.
> > >
> > > Yes, it is what we agreed (hope to see it in minutes).
> > > If someone can do these new patches in 17.11 timeframe, it's great!
> > > Bruce, do you want to make it a try?
> > 
> > If I have the chance, I can try, but given how short time is and that userspace
> > is on next week, I very much doubt I'll even get it started.
> 
> I wasn't aware to the techboard decision on the extra patchset needed.
> I think it will be wrong to introduce an API on 17.11 and change it again on 18.02.  
> I will do my best to make everything ready for 17.11 so we can have one solid API on top of which all PMDs and application will be converted. Considering some Holidays and the DPDK summit I won't have much time to work on it.
> 
> The plan is as follows:
> 1.  complete the last comment on the current series and integrate it.
> 2. send a new patchset to convert to the API suggested above.

Thank you Shahaf.

> Aggregating the different suggestions I come up with the below. if this is agreed, then I will move with the implementation.
> (I thought it is good to return error values for the get function).

[...]
> **                                                                            
> * Set Tx offloads on a specific port.                                         
> *                                                                             
> * @param port_id                                                              
> *   The port identifier of the Ethernet device.                               
> * @param offloads_mask                                                        
> *   Indicates which offloads to be set using DEV_TX_OFFLOAD_* flags.          
> * @return                                                                     
> *   (0) if all offloads set successfully, otherwise offloads                  
> *   flags which were not set.                                                 
> *                                                                             
> */                                                                            
> uint64_t rte_eth_set_port_tx_offloads(uint8_t port_id, uint64_t offloads_mask);

You need to have a parameter for the offloads value,
different of offloads mask:
	set(port, value, mask)
Or as proposed by Bruce, you need 2 functions:
	enable(port, mask)
	disable(port, mask)


More information about the dev mailing list