[dpdk-dev] [PATCH] examples/l3fwd: force CRC stripping for i40evf

2016-11-10 Thread Mori, Naoyuki
Hi Thomas,

> 2016-11-10 13:50, Mori, Naoyuki:
> > >Thomas wrote:
> > > > Just to make it sure, you mean returning an error in the driver when
> > > > a configuration cannot be applied, right?
> > >
> > >Yes, as in 1bbcc5d21129 ("i40evf: report error for unsupported CRC
> > >stripping config"), where -EINVAL is returned.
> > >
> > >Bj?rn
> >
> > On my experience, OvS+DPDK has same issue.
> > You cannot run OvS on i40evf due to this CRC config mismatch, while OvS on
> ixgbevf works fine.
> > So, changing on i40evf PMD side would have more benefit, I believe.
> 
> No I think OVS should handle the configuration error.
> We could also add a function to query this capability before configuring.

That would be fine, as long as it became a well-known standard.
But at least, hope i40evf and ixgbevf to be consistent in this CRC handling.


Thanks,
Mori



[dpdk-dev] [PATCH] examples/l3fwd: force CRC stripping for i40evf

2016-11-10 Thread Mori, Naoyuki
Hi,

Re:
>Subject: Re: [dpdk-dev] [PATCH] examples/l3fwd: force CRC stripping
>   for i40evf
>Message-ID: 
>Thomas wrote:
> > Just to make it sure, you mean returning an error in the driver when
> > a configuration cannot be applied, right?
>
>Yes, as in 1bbcc5d21129 ("i40evf: report error for unsupported CRC
>stripping config"), where -EINVAL is returned.
>
>Bj?rn

On my experience, OvS+DPDK has same issue.
You cannot run OvS on i40evf due to this CRC config mismatch, while OvS on 
ixgbevf works fine.
So, changing on i40evf PMD side would have more benefit, I believe.


[Details below]
ovs-vswitchd.log:
2016-11-10T08:53:31.290Z|00054|netdev_dpdk|WARN|Interface dpdk0 eth_dev setup 
error Invalid argument

because of
i40evf_dev_configure() returns ?EINVAL.
At here
---
i40evf_dev_configure(struct rte_eth_dev *dev)
{

/* For non-DPDK PF drivers, VF has no ability to disable HW
 * CRC strip, and is implicitly enabled by the PF.
 */
if (!conf->rxmode.hw_strip_crc) {
vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
if ((vf->version_major == I40E_VIRTCHNL_VERSION_MAJOR) &&
(vf->version_minor <= I40E_VIRTCHNL_VERSION_MINOR)) {
/* Peer is running non-DPDK PF driver. */
PMD_INIT_LOG(ERR, "VF can't disable HW CRC Strip");
return -EINVAL;
}
}

}
---

ixgbevf is same Intel NIC but implementation is different. It won?t return 
error.

ixgbevf_dev_configure(struct rte_eth_dev *dev)
{

/*
 * VF has no ability to enable/disable HW CRC
 * Keep the persistent behavior the same as Host PF
 */
#ifndef RTE_LIBRTE_IXGBE_PF_DISABLE_STRIP_CRC
if (!conf->rxmode.hw_strip_crc) {
PMD_INIT_LOG(NOTICE, "VF can't disable HW CRC Strip");
conf->rxmode.hw_strip_crc = 1;
}
#else
if (conf->rxmode.hw_strip_crc) {
PMD_INIT_LOG(NOTICE, "VF can't enable HW CRC Strip");
conf->rxmode.hw_strip_crc = 0;
}
#endif

}

Regards and Thanks,
Mori