lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <B0A7AF226B49A14897036E9B3A68CFFECB1A935EAF@HQ-EXCH-7.corp.brocade.com>
Date:	Fri, 21 Aug 2009 18:58:14 -0700
From:	Jing Huang <huangj@...cade.COM>
To:	Rolf Eike Beer <eike-kernel@...tec.de>
CC:	"James.Bottomley@...senpartnership.com" 
	<James.Bottomley@...senpartnership.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
	Ramkumar Vadivelu <rvadivel@...cade.COM>,
	Vinodh Ravindran <vravindr@...cade.COM>
Subject: RE: [PATCH 2/14] bfa: Brocade BFA FC SCSI driver (bfa part1)

Rolf Eike Beer wrote:
> > +/*
> > + * Copyright (c)  2005-2008 Brocade Communications Systems, Inc.
> > + * All rights reserved
> > + * www.brocade.com
> 
> Shouldn't that be 2009?

Yes, It should be 2009. I will fix it.

> 
> > +char *
> > +wwn2str(char *buf, int bufsize, u64 wwn)
> > +{
> > +	char *ptr;
> > +	union {
> > +	wwn_t           wwn;
> > +	u8         byte[sizeof(wwn_t)];
> > +	} w;
> > +	int i = sizeof(wwn_t);
> > +
> > +	ptr = buf + bufsize;
> > +	*--ptr = '\0';
> > +	bufsize--;
> > +
> > +	w.wwn = wwn;
> > +	while (i > 0) {
> > +		i--;
> > +		*--ptr = n2b(w.byte[i] & 0x0f);
> > +		*--ptr = n2b((w.byte[i] >> 4) & 0x0f);
> > +		if (i > 0)
> > +			*--ptr = ':';
> > +	}
> > +
> > +	return ptr;
> > +}
> 
> I searched for 20 minutes and found nothing. Is there really no standard
> function to printf a WWN? I mean, every FC driver needs this, no?
> 
> fnic:
> -"%llx", wwn
> 
> ipr:
> -"%08X%08X", be32_to_cpu(wwid[0]), be32_to_cpu(wwid[1])
> 
> lpfc:
> -"%02x%02x%02x%02x%02x%02x%02x%02x", wwn[0], wwn[1], ...
> -"%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x", wwn[0], wwn[1], ...
> -"0x%llx", cfg_soft_wwnn
> 
> qla2xxx:
> -like lpfc, version 1. Harder to find as there it is called port_name and
> node_name instead of wwpn or wwnn or wwn
> 
> Is there really nothing like this? Should be an easy job to write one and
> convert all existing drivers over to use this, no? Would also add the
> benefit
> as that all drivers would print that in the same way.
> 
> Ei-printk("%WWN", wwn)-ke

I am not aware of a standard function to print wwn. It would be nice if all the drivers print wwn in the same format. Regarding our implementation of wwpn to string conversion, we are making it unnecessarily complicated, I will fix it. 

Thanks for the reviewing the code.

Jing
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ