On 26/06/2019 16:10, Kevin Traynor wrote: >>> diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c >>> index 65161deaf..97a90d4a5 100644 >>> --- a/lib/netdev-dpdk.c >>> +++ b/lib/netdev-dpdk.c >>> @@ -160,4 +160,5 @@ typedef uint16_t dpdk_port_t; >>> >>> #define VHOST_ENQ_RETRY_NUM 8 >>> +#define VHOST_MAX_ENQ_RETRY_NUM 31 >>> #define IF_NAME_SZ (PATH_MAX > IFNAMSIZ ? PATH_MAX : IFNAMSIZ) >> Maybe: >> >> /* One retry for each packet in the batch */ >> #define VHOST_ENQ_RETRY_MAX ( NETDEV_MAX_BURST - 1 )
hmm, looked into this a bit more. In the docs I did implicitly tie the max retries to the batch size and docs/code should be consistent. However, now I think it is better to just keep them independent. Otherwise, we have to account for NETDEV_MAX_BURST changing which means over-provisioning and wasting bytes in the struct for the user set tx retry value. Also, I think it is clearer to have a maximum and tell the user that number. A user can see '"maxInteger": 31' in the xml and read it in the docs and not have to search the code checking #defines to find out what the max really is. If in the future someone decides that they want to, increase the batch size to send to vhost && 31 retries are not enough, they can increase max retries at that stage. I think it's unlikely either of those would happen. Now, as 31 is an odd looking number (bad pun) and it's just a limit, i've made it 32 and updated the docs to break the tie with the size of the batch. >> /* Minimum value to not retry */ >> #define VHOST_ENQ_RETRY_MIN 0 >> /* Arbitrary, debatable, though reasonable legacy value */ >> #define VHOST_ENQ_RETRY_DEF 8 >> >> and fix accordingly below... >> > Sounds good. > _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev