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>] [day] [month] [year] [list]
Message-ID: <CF9D1877D81D214CB0CA0669EFAE020C2A41633E@CMEXMB1.ad.emulex.com>
Date:	Mon, 24 Mar 2014 07:49:59 +0000
From:	Sathya Perla <Sathya.Perla@...lex.Com>
To:	Or Gerlitz <or.gerlitz@...il.com>
CC:	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: [PATCH net-next v2 1/2] be2net: add FW cmds needed for VxLAN
 offloads

> -----Original Message-----
> From: Or Gerlitz [mailto:or.gerlitz@...il.com]
> 
> On Mon, Mar 24, 2014 at 8:00 AM, Sathya Perla <sathya.perla@...lex.com> >
> 
> +void be_reset_nic_desc(struct be_nic_res_desc *nic)
> > +{
> > +       memset(nic, 0, sizeof(*nic));
> > +       nic->unicast_mac_count = 0xFFFF;
> > +       nic->mcc_count = 0xFFFF;
> > +       nic->vlan_count = 0xFFFF;
> > +       nic->mcast_mac_count = 0xFFFF;
> > +       nic->txq_count = 0xFFFF;
> > +       nic->rq_count = 0xFFFF;
> > +       nic->rssq_count = 0xFFFF;
> > +       nic->lro_count = 0xFFFF;
> > +       nic->cq_count = 0xFFFF;
> > +       nic->toe_conn_count = 0xFFFF;
> > +       nic->eq_count = 0xFFFF;
> > +       nic->link_param = 0xFF;
> > +       nic->acpi_params = 0xFF;
> > +       nic->wol_param = 0x0F;
> > +       nic->bw_min = 0xFFFFFFFF;
> > +       nic->bw_max = 0xFFFFFFFF;
> 
> maybe some sort of memset can do as well?

This is old code that I just wrapped-up in a routine as a part of this patch, to help
with re-factoring of be_cmd_set_profile_config() needed for vxlan setting.
I'd like to take up any cleanup of this code as a part of a separate patch and not this patch-set.

Also, if you observe the be_nic_res_desc{} struct, the fields that require
re-setting with 0xFFFF (count fields and params that are to remain unchanged)
are all not contiguous. So, just memset-ing a region of memory doesn't necessarily work here.

thanks,
-Sathya
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ