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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170125063809.GB1668@chelsio.com>
Date:   Wed, 25 Jan 2017 12:08:10 +0530
From:   Varun Prakash <varun@...lsio.com>
To:     Joe Perches <joe@...ches.com>
Cc:     "bart.vanassche@...disk.com" <bart.vanassche@...disk.com>,
        "target-devel@...r.kernel.org" <target-devel@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        Indranil Choudhury <indranil@...lsio.com>
Subject: Re: [PATCH] cxgbit: use T6 specific macro to set force bit

On Wed, Jan 25, 2017 at 02:41:40AM +0530, Joe Perches wrote:
> On Tue, 2017-01-24 at 17:07 +0530, Varun Prakash wrote:
> > For T6 adapters use T6 specific macro to set
> > force bit.
> []
> > diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_msg.h b/drivers/net/ethernet/chelsio/cxgb4/t4_msg.h
> []
> > @@ -1349,6 +1349,10 @@ struct cpl_tx_data {
> >  #define TX_FORCE_S	13
> >  #define TX_FORCE_V(x)	((x) << TX_FORCE_S)
> >  
> > +#define T6_TX_FORCE_S		20
> > +#define T6_TX_FORCE_V(x)	((x) << T6_TX_FORCE_S)
> > +#define T6_TX_FORCE_F		T6_TX_FORCE_V(1U)
> > +
> >  enum {
> >  	ULP_TX_MEM_READ = 2,
> >  	ULP_TX_MEM_WRITE = 3,
> > diff --git a/drivers/target/iscsi/cxgbit/cxgbit_target.c b/drivers/target/iscsi/cxgbit/cxgbit_target.c
> []
> > @@ -162,12 +162,14 @@ cxgbit_tx_data_wr(struct cxgbit_sock *csk, struct sk_buff *skb, u32 dlen,
> >  		  u32 len, u32 credits, u32 compl)
> >  {
> >  	struct fw_ofld_tx_data_wr *req;
> > +	const struct cxgb4_lld_info *lldi = &csk->com.cdev->lldi;
> >  	u32 submode = cxgbit_skcb_submode(skb);
> >  	u32 wr_ulp_mode = 0;
> >  	u32 hdr_size = sizeof(*req);
> >  	u32 opcode = FW_OFLD_TX_DATA_WR;
> >  	u32 immlen = 0;
> > -	u32 force = TX_FORCE_V(!submode);
> > +	u32 force = is_t5(lldi->adapter_type) ? TX_FORCE_V(!submode) :
> > +		    T6_TX_FORCE_F;
> 
> Perhaps it'd be better to add a is_t6() mechanism so this
> is written in the positive rather than the negative.
>

At present cxgbit driver supports only T5 and T6 adapters so
if a adapter is not T5 then it is T6.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ