* [dpdk-dev] [PATCH] net/i40e: remove keeping CRC configuration for VF
@ 2018-09-26 1:51 Beilei Xing
2018-09-26 11:26 ` Zhang, Qi Z
2018-09-27 2:13 ` [dpdk-dev] [PATCH v2] " Beilei Xing
0 siblings, 2 replies; 4+ messages in thread
From: Beilei Xing @ 2018-09-26 1:51 UTC (permalink / raw)
To: qi.z.zhang; +Cc: dev
Remove keeping CRC configuration since it's not
supported by i40e VF.
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
---
drivers/net/i40e/i40e_ethdev_vf.c | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index f9cedf5..4fa9d8d 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -1523,7 +1523,6 @@ i40evf_dev_configure(struct rte_eth_dev *dev)
struct i40e_adapter *ad =
I40E_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
struct rte_eth_conf *conf = &dev->data->dev_conf;
- struct i40e_vf *vf;
/* Initialize to TRUE. If any of Rx queues doesn't meet the bulk
* allocation or vector Rx preconditions we will reset it.
@@ -1533,17 +1532,9 @@ i40evf_dev_configure(struct rte_eth_dev *dev)
ad->tx_simple_allowed = true;
ad->tx_vec_allowed = true;
- /* For non-DPDK PF drivers, VF has no ability to disable HW
- * CRC strip, and is implicitly enabled by the PF.
- */
if (conf->rxmode.offloads & DEV_RX_OFFLOAD_KEEP_CRC) {
- vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
- if ((vf->version_major == VIRTCHNL_VERSION_MAJOR) &&
- (vf->version_minor <= VIRTCHNL_VERSION_MINOR)) {
- /* Peer is running non-DPDK PF driver. */
- PMD_INIT_LOG(ERR, "VF can't disable HW CRC Strip");
- return -EINVAL;
- }
+ PMD_INIT_LOG(ERR, "VF can't disable HW CRC Strip");
+ return -EINVAL;
}
return i40evf_init_vlan(dev);
@@ -2180,7 +2171,6 @@ i40evf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
DEV_RX_OFFLOAD_UDP_CKSUM |
DEV_RX_OFFLOAD_TCP_CKSUM |
DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM |
- DEV_RX_OFFLOAD_KEEP_CRC |
DEV_RX_OFFLOAD_SCATTER |
DEV_RX_OFFLOAD_JUMBO_FRAME |
DEV_RX_OFFLOAD_VLAN_FILTER;
--
2.5.5
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] net/i40e: remove keeping CRC configuration for VF
2018-09-26 1:51 [dpdk-dev] [PATCH] net/i40e: remove keeping CRC configuration for VF Beilei Xing
@ 2018-09-26 11:26 ` Zhang, Qi Z
2018-09-27 2:13 ` [dpdk-dev] [PATCH v2] " Beilei Xing
1 sibling, 0 replies; 4+ messages in thread
From: Zhang, Qi Z @ 2018-09-26 11:26 UTC (permalink / raw)
To: Xing, Beilei; +Cc: dev
> -----Original Message-----
> From: Xing, Beilei
> Sent: Wednesday, September 26, 2018 9:51 AM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: dev@dpdk.org
> Subject: [PATCH] net/i40e: remove keeping CRC configuration for VF
>
> Remove keeping CRC configuration since it's not supported by i40e VF.
>
> Signed-off-by: Beilei Xing <beilei.xing@intel.com>
> ---
> drivers/net/i40e/i40e_ethdev_vf.c | 14 ++------------
> 1 file changed, 2 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/net/i40e/i40e_ethdev_vf.c
> b/drivers/net/i40e/i40e_ethdev_vf.c
> index f9cedf5..4fa9d8d 100644
> --- a/drivers/net/i40e/i40e_ethdev_vf.c
> +++ b/drivers/net/i40e/i40e_ethdev_vf.c
> @@ -1523,7 +1523,6 @@ i40evf_dev_configure(struct rte_eth_dev *dev)
> struct i40e_adapter *ad =
> I40E_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
> struct rte_eth_conf *conf = &dev->data->dev_conf;
> - struct i40e_vf *vf;
>
> /* Initialize to TRUE. If any of Rx queues doesn't meet the bulk
> * allocation or vector Rx preconditions we will reset it.
> @@ -1533,17 +1532,9 @@ i40evf_dev_configure(struct rte_eth_dev *dev)
> ad->tx_simple_allowed = true;
> ad->tx_vec_allowed = true;
>
> - /* For non-DPDK PF drivers, VF has no ability to disable HW
> - * CRC strip, and is implicitly enabled by the PF.
> - */
> if (conf->rxmode.offloads & DEV_RX_OFFLOAD_KEEP_CRC) {
> - vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
> - if ((vf->version_major == VIRTCHNL_VERSION_MAJOR) &&
> - (vf->version_minor <= VIRTCHNL_VERSION_MINOR)) {
> - /* Peer is running non-DPDK PF driver. */
> - PMD_INIT_LOG(ERR, "VF can't disable HW CRC Strip");
> - return -EINVAL;
> - }
> + PMD_INIT_LOG(ERR, "VF can't disable HW CRC Strip");
> + return -EINVAL;
> }
Should we remove the whole branch here? the offload configure check is already covered at rte_eth_dev_configure.
>
> return i40evf_init_vlan(dev);
> @@ -2180,7 +2171,6 @@ i40evf_dev_info_get(struct rte_eth_dev *dev, struct
> rte_eth_dev_info *dev_info)
> DEV_RX_OFFLOAD_UDP_CKSUM |
> DEV_RX_OFFLOAD_TCP_CKSUM |
> DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM |
> - DEV_RX_OFFLOAD_KEEP_CRC |
> DEV_RX_OFFLOAD_SCATTER |
> DEV_RX_OFFLOAD_JUMBO_FRAME |
> DEV_RX_OFFLOAD_VLAN_FILTER;
> --
> 2.5.5
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dpdk-dev] [PATCH v2] net/i40e: remove keeping CRC configuration for VF
2018-09-26 1:51 [dpdk-dev] [PATCH] net/i40e: remove keeping CRC configuration for VF Beilei Xing
2018-09-26 11:26 ` Zhang, Qi Z
@ 2018-09-27 2:13 ` Beilei Xing
2018-09-27 6:58 ` Zhang, Qi Z
1 sibling, 1 reply; 4+ messages in thread
From: Beilei Xing @ 2018-09-27 2:13 UTC (permalink / raw)
To: qi.z.zhang; +Cc: dev
Remove keeping CRC configuration since it's not
supported by i40e VF.
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
---
drivers/net/i40e/i40e_ethdev_vf.c | 16 ----------------
1 file changed, 16 deletions(-)
v2 changes:
- Remove the whole branch since offload has been checked in rte_eth_dev_configure.
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index f9cedf5..5713fd1 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -1522,8 +1522,6 @@ i40evf_dev_configure(struct rte_eth_dev *dev)
{
struct i40e_adapter *ad =
I40E_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
- struct rte_eth_conf *conf = &dev->data->dev_conf;
- struct i40e_vf *vf;
/* Initialize to TRUE. If any of Rx queues doesn't meet the bulk
* allocation or vector Rx preconditions we will reset it.
@@ -1533,19 +1531,6 @@ i40evf_dev_configure(struct rte_eth_dev *dev)
ad->tx_simple_allowed = true;
ad->tx_vec_allowed = true;
- /* For non-DPDK PF drivers, VF has no ability to disable HW
- * CRC strip, and is implicitly enabled by the PF.
- */
- if (conf->rxmode.offloads & DEV_RX_OFFLOAD_KEEP_CRC) {
- vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
- if ((vf->version_major == VIRTCHNL_VERSION_MAJOR) &&
- (vf->version_minor <= VIRTCHNL_VERSION_MINOR)) {
- /* Peer is running non-DPDK PF driver. */
- PMD_INIT_LOG(ERR, "VF can't disable HW CRC Strip");
- return -EINVAL;
- }
- }
-
return i40evf_init_vlan(dev);
}
@@ -2180,7 +2165,6 @@ i40evf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
DEV_RX_OFFLOAD_UDP_CKSUM |
DEV_RX_OFFLOAD_TCP_CKSUM |
DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM |
- DEV_RX_OFFLOAD_KEEP_CRC |
DEV_RX_OFFLOAD_SCATTER |
DEV_RX_OFFLOAD_JUMBO_FRAME |
DEV_RX_OFFLOAD_VLAN_FILTER;
--
2.5.5
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH v2] net/i40e: remove keeping CRC configuration for VF
2018-09-27 2:13 ` [dpdk-dev] [PATCH v2] " Beilei Xing
@ 2018-09-27 6:58 ` Zhang, Qi Z
0 siblings, 0 replies; 4+ messages in thread
From: Zhang, Qi Z @ 2018-09-27 6:58 UTC (permalink / raw)
To: Xing, Beilei; +Cc: dev
> -----Original Message-----
> From: Xing, Beilei
> Sent: Thursday, September 27, 2018 10:13 AM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: dev@dpdk.org
> Subject: [PATCH v2] net/i40e: remove keeping CRC configuration for VF
>
> Remove keeping CRC configuration since it's not supported by i40e VF.
>
> Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Applied to dpdk-next-net-intel.
Thanks
Qi
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-09-27 7:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-26 1:51 [dpdk-dev] [PATCH] net/i40e: remove keeping CRC configuration for VF Beilei Xing
2018-09-26 11:26 ` Zhang, Qi Z
2018-09-27 2:13 ` [dpdk-dev] [PATCH v2] " Beilei Xing
2018-09-27 6:58 ` Zhang, Qi Z
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).