On 13 Nov 2019, at 2:14, Zhang, Xiao wrote:
-----Original Message-----
From: Eelco Chaudron [mailto:echau...@redhat.com]
Sent: Tuesday, November 12, 2019 7:09 PM
To: Zhang, Xiao <xiao.zh...@intel.com>
Cc: Zhang, Qi Z <qi.z.zh...@intel.com>; dev@dpdk.org; Xing, Beilei
<beilei.x...@intel.com>
Subject: Re: [dpdk-dev] [PATCH] net/i40e: force promiscuous state
after VF
reset
On 12 Nov 2019, at 1:52, Zhang, Xiao wrote:
Hi Eelco,
Seems you missed this mail.
Not sure why I missed this email, as it does not show up in my email
client :( See
below…
<SNIP>
Hi Eelco,
I think you may need add more detailed message in the commit
log
or comments.
My interpretation of the request was that Beilei wanted to know
why
disabling promiscuous mode in HW was failing. Beilei can you
comment, is the additional description from Xiao enough?
Yes, promisc_unicast_enabled flag is not cleared during vf reset
because fail to disable promiscuous mode, So I think we need to
root
cause why fail to disable promiscuous mode first.
This patch looks like a workaround but not a fix.
This was debugged together with Xiao and from what I understand is
that DPDK fails to reset promiscuous mode in hardware as PF and VF
operations are not synced between kernel and DPDK.
Xiao told me this could not be fixed in another way, Xiao can you
comment?
Checked again, the root cause is not synced issue between kernel
and
DPDK
during reset.
What is the root cause, so I can update the patch description for the
next revision.
Kernel PF do reset once VF mac changed and send reset event to VF,
VF do reset once received even if reset task not done by PF, so admin
q message will not get response.
Thanks, added this to the v2 commit message.
Suggest to remove the checking and setting of
promisc_unicast_enabled
flag,
since this flag is only used when enable/disable promiscuous mode.
Considering the un-synced issue, it will be more clean if remove
the
flag.
Also same with flag promisc_multicast_enabled.
So if I understand it correctly remove the following code:
2203 /* If enabled, just return */
2204 if (vf->promisc_multicast_enabled)
2205 return 0;
and
2222 /* If enabled, just return */
2223 if (!vf->promisc_multicast_enabled)
2224 return 0;
Or to remove the flags from the i40e_vf structure (and relative
code):
1051 bool promisc_unicast_enabled;
1052 bool promisc_multicast_enabled;
Let me know and I craft up a patch…
You can remove promisc_unicast_enabled/promisc_multicast_enabled and
related code.
Removing the flags did not work, as they are needed for programming one
or the other, so I kept them.
In the end, I removed the “If enabled” checks above, see the v2
patch with the name
“[PATCH v2] net/i40e: always re-program promiscuous mode on VF
interface”