aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/ibm/ibmvnic.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2017-10-22 08:36:53 -0400
committerDavid S. Miller <davem@davemloft.net>2017-10-22 08:39:14 -0400
commitf8ddadc4db6c7b7029b6d0e0d9af24f74ad27ca2 (patch)
tree0a6432aba336bae42313613f4c891bcfce02bd4e /drivers/net/ethernet/ibm/ibmvnic.c
parentbdd091bab8c631bd2801af838e344fad34566410 (diff)
parentb5ac3beb5a9f0ef0ea64cd85faf94c0dc4de0e42 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
There were quite a few overlapping sets of changes here. Daniel's bug fix for off-by-ones in the new BPF branch instructions, along with the added allowances for "data_end > ptr + x" forms collided with the metadata additions. Along with those three changes came veritifer test cases, which in their final form I tried to group together properly. If I had just trimmed GIT's conflict tags as-is, this would have split up the meta tests unnecessarily. In the socketmap code, a set of preemption disabling changes overlapped with the rename of bpf_compute_data_end() to bpf_compute_data_pointers(). Changes were made to the mv88e6060.c driver set addr method which got removed in net-next. The hyperv transport socket layer had a locking change in 'net' which overlapped with a change of socket state macro usage in 'net-next'. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/ibm/ibmvnic.c')
-rw-r--r--drivers/net/ethernet/ibm/ibmvnic.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index b991703319f9..11eba8277132 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -1110,11 +1110,12 @@ static int build_hdr_data(u8 hdr_field, struct sk_buff *skb,
1110 * places them in a descriptor array, scrq_arr 1110 * places them in a descriptor array, scrq_arr
1111 */ 1111 */
1112 1112
1113static void create_hdr_descs(u8 hdr_field, u8 *hdr_data, int len, int *hdr_len, 1113static int create_hdr_descs(u8 hdr_field, u8 *hdr_data, int len, int *hdr_len,
1114 union sub_crq *scrq_arr) 1114 union sub_crq *scrq_arr)
1115{ 1115{
1116 union sub_crq hdr_desc; 1116 union sub_crq hdr_desc;
1117 int tmp_len = len; 1117 int tmp_len = len;
1118 int num_descs = 0;
1118 u8 *data, *cur; 1119 u8 *data, *cur;
1119 int tmp; 1120 int tmp;
1120 1121
@@ -1143,7 +1144,10 @@ static void create_hdr_descs(u8 hdr_field, u8 *hdr_data, int len, int *hdr_len,
1143 tmp_len -= tmp; 1144 tmp_len -= tmp;
1144 *scrq_arr = hdr_desc; 1145 *scrq_arr = hdr_desc;
1145 scrq_arr++; 1146 scrq_arr++;
1147 num_descs++;
1146 } 1148 }
1149
1150 return num_descs;
1147} 1151}
1148 1152
1149/** 1153/**
@@ -1161,16 +1165,12 @@ static void build_hdr_descs_arr(struct ibmvnic_tx_buff *txbuff,
1161 int *num_entries, u8 hdr_field) 1165 int *num_entries, u8 hdr_field)
1162{ 1166{
1163 int hdr_len[3] = {0, 0, 0}; 1167 int hdr_len[3] = {0, 0, 0};
1164 int tot_len, len; 1168 int tot_len;
1165 u8 *hdr_data = txbuff->hdr_data; 1169 u8 *hdr_data = txbuff->hdr_data;
1166 1170
1167 tot_len = build_hdr_data(hdr_field, txbuff->skb, hdr_len, 1171 tot_len = build_hdr_data(hdr_field, txbuff->skb, hdr_len,
1168 txbuff->hdr_data); 1172 txbuff->hdr_data);
1169 len = tot_len; 1173 *num_entries += create_hdr_descs(hdr_field, hdr_data, tot_len, hdr_len,
1170 len -= 24;
1171 if (len > 0)
1172 num_entries += len % 29 ? len / 29 + 1 : len / 29;
1173 create_hdr_descs(hdr_field, hdr_data, tot_len, hdr_len,
1174 txbuff->indir_arr + 1); 1174 txbuff->indir_arr + 1);
1175} 1175}
1176 1176