>>+            .ignore_offload_bitfield = 1,

>>+            .offloads = DEV_RX_OFFLOAD_CRC_STRIP,
>
>It is not directly related to the patch.
>May be I miss something, but it looks like there is no way to say that
>"I always strip CRC and cannot preserve it".

Yes this is right. Not exposing the CRC offload flag means the device don’t 
support CRC strip toggling, however it does not explicitly say if device always 
strip/not.
I guess device that has such limitation should specify it on the “Limitation” 
section of the PMD guide.


>>+            txq_conf = dev_info.default_txconf;

>>+            txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;

>>+            txq_conf.offloads = port_conf.txmode.offloads;
>
>It looks like it is not 100% equivalent. As far as I can see dev_info get does
>not convert txq_flags to offloads in default_txconf and in any case 
>txq_conf.offloads
>are overwritten here. So, if PMD provides default txq_flags, it is lost.
>If it is intentionally, it should be highlighted and explained.

Yes it is.
With the new Tx offloads API the application can choose the Tx offloads it 
wants to use according to its needs.
For l2fwd case – it doesn’t use any of them. Any default txq flag the PMD set 
there is irrelevant.
What I tried to do is not to preserve the entire old behavior rather to evolve 
the examples/applications while keeping the same functionality (i.e. the 
offloads which the application use are set, the rest are not).

Moreover – it is a wrong approach, IMO, that the PMD set default offloads flags 
to the application. It has no knowledge to do so. I think this mechanism was 
initially created since the Tx offloads were all set by default, so it provided 
a mean to have good OOB configuration. Now when all offloads are set, I am not 
sure such API is needed anymore.
Will be happy to hear more opinion on that.


--Shahaf

Reply via email to