From: Daniel Borkmann <dborkman@redhat.com>
To: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Cc: e1000-devel@lists.sourceforge.net, netdev@vger.kernel.org,
Jesse Brandeburg <jesse.brandeburg@intel.com>,
gospo@redhat.com, davem@davemloft.net, sassmann@redhat.com
Subject: Re: [net v6 1/8] i40e: main driver core
Date: Sat, 07 Sep 2013 08:44:36 +0200 [thread overview]
Message-ID: <522ACB54.2050706@redhat.com> (raw)
In-Reply-To: <1378510875-10704-2-git-send-email-jeffrey.t.kirsher@intel.com>
[...]
+i40e_status i40e_allocate_dma_mem_d(struct i40e_hw *hw,
+ struct i40e_dma_mem *mem,
+ u64 size, u32 alignment)
+{
+ struct i40e_pf *pf = (struct i40e_pf *)hw->back;
+
+ if (!mem)
+ return I40E_ERR_PARAM;
+
+ mem->size = ALIGN(size, alignment);
+ mem->va = dma_zalloc_coherent(&pf->pdev->dev, mem->size,
+ &mem->pa, GFP_KERNEL);
+ if (mem->va)
+ return I40E_SUCCESS;
+
+ return I40E_ERR_NO_MEMORY;
+}
Nitpicking ... at some point in time i40e_status should be removed plus
I40E_ERR_PARAM, I40E_SUCCESS, I40E_ERR_NO_MEMORY and the like, as we have
int and -EINVAL, 0, -ENOMEM for that. ;-)
[...]
+i40e_status i40e_put_mac_in_vlan(struct i40e_vsi *vsi, u8 *macaddr,
+ bool is_vf, bool is_netdev)
+{
+ struct i40e_mac_filter *f, *add_f;
+
+ list_for_each_entry(f, &vsi->mac_filter_list, list) {
[...]
+ if (!add_f) {
+ dev_info(&vsi->back->pdev->dev, "Could not add filter %d for %pM\n",
+ f->vlan, f->macaddr);
+ return -ENOMEM;
+ }
+ }
+ }
+ return I40E_SUCCESS;
+}
Their usage seems also to be mixed anyway: -ENOMEM vs. I40E_SUCCESS.
[...]
+void i40e_vsi_reset_stats(struct i40e_vsi *vsi)
+{
+ struct rtnl_link_stats64 *ns;
+ int i;
+
+ if (!vsi)
+ return;
+
[...]
+static struct i40e_mac_filter *i40e_find_filter(struct i40e_vsi *vsi,
+ u8 *macaddr, s16 vlan,
+ bool is_vf, bool is_netdev)
+{
+ struct i40e_mac_filter *f;
+
+ if (!vsi || !macaddr)
+ return NULL;
[...]
Probably the code could also be scanned to remove such checks as well ...
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
next prev parent reply other threads:[~2013-09-07 6:44 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-06 23:41 [net v6 0/8][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
2013-09-06 23:41 ` [net v6 1/8] i40e: main driver core Jeff Kirsher
2013-09-07 6:44 ` Daniel Borkmann [this message]
2013-09-07 19:20 ` Brandeburg, Jesse
2013-09-07 23:01 ` Francois Romieu
2013-09-07 7:15 ` Daniel Borkmann
2013-09-07 19:27 ` Brandeburg, Jesse
2013-09-06 23:41 ` [net v6 2/8] i40e: transmit, receive, and napi Jeff Kirsher
2013-09-06 23:41 ` [net v6 3/8] i40e: driver ethtool core Jeff Kirsher
2013-09-06 23:41 ` [net v6 4/8] i40e: driver core headers Jeff Kirsher
2013-09-06 23:41 ` [net v6 5/8] i40e: implement virtual device interface Jeff Kirsher
2013-09-06 23:41 ` [net v6 6/8] i40e: init code and hardware support Jeff Kirsher
2013-09-06 23:41 ` [net v6 7/8] i40e: debugfs interface Jeff Kirsher
2013-09-06 23:41 ` [net v6 8/8] i40e: include i40e in kernel proper Jeff Kirsher
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=522ACB54.2050706@redhat.com \
--to=dborkman@redhat.com \
--cc=davem@davemloft.net \
--cc=e1000-devel@lists.sourceforge.net \
--cc=gospo@redhat.com \
--cc=jeffrey.t.kirsher@intel.com \
--cc=jesse.brandeburg@intel.com \
--cc=netdev@vger.kernel.org \
--cc=sassmann@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.