netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vipul Pandya <vipul@chelsio.com>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"davem@davemloft.net" <davem@davemloft.net>,
	Divy Le Ray <divy@chelsio.com>,
	Dimitrios Michailidis <dm@chelsio.com>,
	Abhishek Agrawal <abhishek@chelsio.com>,
	Casey Leedom <leedom@chelsio.com>,
	SWise OGC <swise@opengridcomputing.com>
Subject: Re: [PATCH net 3/3] cxgb4vf: Support CPL_SGE_EGR_UPDATEs encapsulated in a CPL_FW4_MSG
Date: Tue, 30 Apr 2013 12:16:13 +0530	[thread overview]
Message-ID: <517F68B5.6010206@chelsio.com> (raw)
In-Reply-To: <517EC22F.9020102@cogentembedded.com>



On 30-04-2013 00:25, Sergei Shtylyov wrote:
> Hello.
> 
> On 04/29/2013 06:04 PM, Vipul Pandya wrote:
> 
>> Newer firmware can post CPL_SGE_EGR_UPDATE message encapsulated in a
>> CPL_FW4_MSG as follows
>>
>> flit0 rss_header (if DropRSS == 0 in IQ context)
>> flit1 CPL_FW4_MSG cpl
>> flit2 rss_header w/opcode CPL_SGE_EGR_UPDATE
>> flit3 CPL_SGE_EGR_UPDATE cpl
>>
>> So FW4_MSG CPLs with a newly created type of FW_TYPE_RSSCPL have the
>> CPL_SGE_EGR_UPDATE CPL message in flit 2 of the FW4_MSG. Firmware can still
>> post regular CPL_SGE_EGR_UPDATE messages, so the drivers need to handle
>> both.
>>
>> This patch also writes a new parameter to firmware requesting encapsulated
>> EGR_UPDATE. This allows firmware with this support to not break older drivers.
>>
>> Signed-off-by: Vipul Pandya <vipul@chelsio.com>
> 
> [...]
> 
>> diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
>> index 73aef76..40c22e7 100644
>> --- a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
>> +++ b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
>> @@ -409,6 +409,20 @@ static int fwevtq_handler(struct sge_rspq *rspq, const __be64 *rsp,
>>   		break;
>>   	}
>>   
>> +	case CPL_FW4_MSG: {
>> +		/* FW can send EGR_UPDATEs encapsulated in a CPL_FW4_MSG.
>> +		 */
>> +		const struct cpl_sge_egr_update *p = (void *)(rsp + 3);
> 
>      Empty line wouldn't hurt here, after the declaration.
> 
>> +		opcode = G_CPL_OPCODE(ntohl(p->opcode_qid));
>> +		if (opcode != CPL_SGE_EGR_UPDATE) {
>> +			dev_err(adapter->pdev_dev, "unexpected FW4/CPL %#x on FW event queue\n"
>> +				, opcode);
>> +			break;
>> +		}
>> +		cpl = (void *)p;
>> +		/*FALLTHROUGH*/
> 
>     Rather pointless comment at end of *switch*. Adn you forgot to add 
> spaced before */ and after /*.
> 
>> +	}
>> +
>>   	case CPL_SGE_EGR_UPDATE: {
>>   		/*
>>   		 * We've received an Egress Queue Status Update message.  We
> [...]
> 
> WBR, Sergei
> 

Hello Sergei,

Thank you for your comments. I will take care and address them in future.

Thanks,
Vipul

  reply	other threads:[~2013-04-30  6:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-29 14:04 [PATCH net 0/3] Bug fixes for cxgb4 and cxgb4vf Vipul Pandya
2013-04-29 14:04 ` [PATCH net 1/3] cxgb4: Fix pci_device_id structure initialization with correct PF number Vipul Pandya
2013-04-29 14:04 ` [PATCH net 2/3] cxgb4: Support CPL_SGE_EGR_UPDATEs encapsulated in a CPL_FW4_MSG Vipul Pandya
2013-04-29 14:04 ` [PATCH net 3/3] cxgb4vf: " Vipul Pandya
2013-04-29 18:55   ` Sergei Shtylyov
2013-04-30  6:46     ` Vipul Pandya [this message]
2013-04-29 14:49 ` [PATCH net 0/3] Bug fixes for cxgb4 and cxgb4vf Vipul Pandya
2013-04-29 19:25 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=517F68B5.6010206@chelsio.com \
    --to=vipul@chelsio.com \
    --cc=abhishek@chelsio.com \
    --cc=davem@davemloft.net \
    --cc=divy@chelsio.com \
    --cc=dm@chelsio.com \
    --cc=leedom@chelsio.com \
    --cc=netdev@vger.kernel.org \
    --cc=sergei.shtylyov@cogentembedded.com \
    --cc=swise@opengridcomputing.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).