Hi Alex, > -----Original Message----- > From: linux-kernel-ow...@vger.kernel.org <linux-kernel- > ow...@vger.kernel.org> On Behalf Of Parav Pandit > Sent: Saturday, August 24, 2019 9:26 AM > To: Alex Williamson <alex.william...@redhat.com> > Cc: Jiri Pirko <j...@resnulli.us>; Jiri Pirko <j...@mellanox.com>; David S . > Miller <da...@davemloft.net>; Kirti Wankhede <kwankh...@nvidia.com>; > Cornelia Huck <coh...@redhat.com>; k...@vger.kernel.org; linux- > ker...@vger.kernel.org; cjia <c...@nvidia.com>; net...@vger.kernel.org > Subject: RE: [PATCH v2 0/2] Simplify mtty driver and mdev core > > I don't understand this logic. I'm simply asking that we have a way > > to test the collision behavior without changing the binary. The path > > we're driving towards seems to be making this easier and easier. If > > the vendor can request an alias of a specific length, then a sample > > driver with a module option to set the desired alias length to 1-char makes > it trivially easy to induce a collision. > Sure it is easy to test collision, but my point is - mdev core is not sha1 > test > module. > Hence adding functionality of variable alias length to test collision doesn't > make sense. > When the actual user arrives who needs small alias, we will be able to add > additional pieces very easily.
My initial thoughts to add parent_ops to have bool flag to generate alias or not. However, instead of bool, keeping it unsigned int to say, zero to skip alias and non-zero length to convey generate alias. This will serve both the purpose with trivial handling.